Repository navigation
Conversation
…ini sets selection-target foot's selection-target defaults to primary. On a phone there's no middle click, so a touch selection or a search + Enter left nothing for Ctrl+Shift+V or another app to paste. Tried on the 8 Pro: with selection-target=both, search + Enter put the text on the clipboard. A user set up by hand (--adopt) keeps their foot.ini.
derekross
left a comment
There was a problem hiding this comment.
Thank you, Lef. This is a real gap and a tidy fix. Omarchy's foot.ini sets primary-paste=none and a phone has no middle click, so a selection in the terminal had nowhere to go. I ran the new step by hand on scratch homes with Omarchy 4.5's own foot.ini: the line lands right under [main], once; a symlinked file stays a link in both branches; and with a read-only file and no [main] nothing is written and the marker is taken back, as your last commit says.
Three things before I merge it:
-
The screenshot.
docs/screenshots/foot/touch-select.pngisn't used by any document, so it is evidence for the review rather than part of the docs, and a squash would keep its 279 kB for good. Please take it out of the branch and attach it to the pull request instead (drag it into the description). -
One login on your 8 Pro with the package built from this branch. The setting you tried by hand; the step hasn't run. Please post
pacman -Q omamobile-shell foot,uname -r, that~/.local/state/omarchy/done/omamobile-foot-selectionexists,grep -n -A1 '^\[main\]' ~/.config/foot/foot.ini,systemctl --user status omamobile-setup-user, and that a touch selection in a newly opened terminal pastes into another app. -
The version. You were right to leave it: seven open pull requests claim 0.2.134. I'll push the number to your branch when I merge.
One smaller thing, as you like: your last commit makes a failed write in the no-[main] branch leave the step for the next login, but the other two writes don't get that. If sed -i can't write (I tried a read-only directory), or mktemp fails, the script ends there with the marker set, so the step never runs again and the later steps are skipped for that login. The older steps around it behave the same, so I won't hold the PR for it; an if ! sed …; then rm -f the marker of the same shape would make the commit message true for all three.
On the colour of the selection: agreed that it is the theme's business and not this script's.
… runs again after a failed write
…also run again after a failure
cd55700 to
3078176
Compare
|
@derekross thanks, and thanks for running it on scratch homes. Fixed on the branch:
The shell's |
|
@derekross the run from the package, on my 8 Pro: Before the run I took out the Then in a newly opened foot I ran The screenshot is out of the branch; I'll drag it into the description. |
On my 8 Pro I couldn't get text out of foot. A touch selection works (hold still for a moment, then drag), and so does search mode (Ctrl+Shift+R, then Enter), but both only fill the primary selection, foot's default
selection-target=primary. On a phone there's no middle click to paste that, so Ctrl+Shift+V and other apps had nothing. Withselection-target=bothin foot.ini, search + Enter put the text on the clipboard and another paste got it.A touch selection on the phone (the grey band is the selection):
So omamobile-setup-user now adds
selection-target=bothto[main]in the user's foot.ini, once (omamobile-foot-selection), next to the existing foot touch step. It leaves the file alone when it already sets selection-target (with or without spaces around=), puts a[main]on top when the file has none (keys above the first section are[main]to foot anyway), follows a symlink instead of replacing it, and a user set up by hand with--adoptkeeps their foot.ini as it is.One thing I didn't put in: the selection is hard to see with the theme colours, it's #383838 on #222222 in mine, which is probably why I first thought touch select didn't work at all. An override in foot.ini fixed it for me, but it would win over every theme, so that's a theme question and not for setup-user.
Testing: test/setup-user.sh passes with new cases for an existing selection-target (two spellings) and a foot.ini without
[main], and omamobile-shell's test/all passes. The setting itself I tried on the phone by hand; the setup-user step hasn't run on a phone yet. No version bump here, since #894 takes 0.2.134; I'll set it after whichever lands first.