You are not logged in.
Please help me configure the foot terminal in the labwc wayland composer.
It is necessary to bind "foot" to a hotkey and make sure that it always and everywhere opens half the screen in a translucent form when this key is pressed.
If possible, then divided into two parts vertically and one part horizontally, as in tmux (3 sessions).
Last edited by ridbo (2024-04-01 11:42:45)
Offline
Use the alpha option in foot.ini to set transparency, use labwc's window rules to place the terminal and use tmux to split it.
Jin, Jîyan, Azadî
Offline
Use the alpha option in foot.ini to set transparency, use labwc's window rules to place the terminal and use tmux to split it.
Is it possible to set this up without XWayland?
Offline
labwc is a wayland compositor (but has a hard dependency on xwayland) and foot is a wayland terminal - how do you infer an xwayland necessity in this specific case?
Offline
Use the alpha option in foot.ini to set transparency, use labwc's window rules to place the terminal and use tmux to split it.
I did it. But how can you make the foot disappear and appear when you press a hotkey?
I believe that it is probably possible to write a script that will check the position of the foot window and if the window is minimized, then the script expands it, and if it is in focus or expanded, then it is minimized.
Or can this be done some other way?
Offline
how can you make the foot disappear and appear when you press a hotkey?
With some shell duct tape
Place this in an executable file at /usr/local/bin/quake:
#!/bin/sh
pkill -f 'foot --title=quake' || foot --title=quake "$@"
Then add this to rc.xml:
<windowRules>
<windowRule identifier="foot">
<skipTaskbar>yes</skipTaskbar>
<action name="MoveTo" x="500" y="500" />
<action name="ToggleAlwaysOnTop" />
</windowRule>
</windowRules>
The MoveTo x & y co-ordinates are just examples, adjust them to your liking.
Unfortunately labwc's windowRule identifier doesn't seem to detect foot's custom title so the placement rule will apply to all instances of foot, which might not be what you want. The developer of labwc is a developer over at the BunsenLabs forums so perhaps consider taking this up with them. Tell them I said "hi" if you do.
Last edited by Head_on_a_Stick (2024-04-02 20:57:02)
Jin, Jîyan, Azadî
Offline
Place this in an executable file at /usr/local/bin/quake:
#!/bin/sh pkill -f 'foot --title=quake' || foot --title=quake
But I need the terminal session to be saved.
Ideally with tmux.
Offline
Jin, Jîyan, Azadî
Offline
if [ -x "$(command -v tmux)" ] && [ -n "${DISPLAY}" ] && [ -z "${TMUX}" ]; then
exec tmux new-session -A -s ${USER} >/dev/null 2>&1
fi
If you add this code to /etc/X11/xinit/xinitrc.d/ then X will not load
Offline
The context there is to run this from your bashrc (or whatever rc your shell is).
Offline
Thanks for answers!
Tell me also why in openbox I can’t configure the hot key: ` to drop out the terminal? Although it works fine in labwc.
<keybind key="`">
<action name="Execute">
<command>tdrop -a -h 45% alacritty</command>
</action>
</keybind>
Offline
What is "tdrop" and try "grave" as key.
Offline
What is "tdrop" and try "grave" as key.
tdrop is used to hide and show a terminal emulator on different desktops/workspaces:
Offline
Ok, first make sure you can bind the "grave" key to anything, in doubt just starting another alacritty.
Then tackle tdrop.
Don't forget to reload the openbox config after editing it.
Offline
Ok, first make sure you can bind the "grave" key to anything, in doubt just starting another alacritty.
Then tackle tdrop.
Don't forget to reload the openbox config after editing it.
Thank you! "grave" works
Offline
\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
(you'll likely have to shorten it…)
Offline
Is it possible to somehow hide or reveal the terminal without terminating the process?
#!/bin/sh
pkill -f 'foot --title=quake' || foot --title=quake
I suspect that without terminating the process, the terminal would start faster. Or is that not true?
Offline
https://www.reddit.com/r/swaywm/comment … _a_window/ - but that depends on whether labwc has a scratchpad or supports swaymsg at all.
Offline
https://www.reddit.com/r/swaywm/comment … _a_window/ - but that depends on whether labwc has a scratchpad or supports swaymsg at all.
As far as I understand from this topic, labwc does not support this
Offline
It's generally true that there's no standardized protocol.
Afaiu the labwc homepage they seek compatibility w/ sway which is why I suggested trying swaymsg.
But you'll have to try and in doubt ask upstream on the state of IPC support, https://archlinux.org/packages/extra/x86_64/ydotool/ won't work.
Offline
For foot try running this in ~/.config/labwc/autostart:
foot --server &
Then call footclient(1) in the toggle script.
And for an extra speed boost switch from bash to busybox ash :-)
Jin, Jîyan, Azadî
Offline
For foot try running this in ~/.config/labwc/autostart:
foot --server &
Then call footclient(1) in the toggle script.
And for an extra speed boost switch from bash to busybox ash :-)
So I did. But I meant so as not to kill the footclient process every time using pkill.
I'll try to figure it out with swaymsg, but for me it's already complicated.
I'm using zsh)
Offline
swaymsg will not work in labwc, since labwc does not support sway's IPC protocol. There are Iconify (a.k.a minimize) and Raise actions that you could use in labwc's rc.xml to hide/show a window, but it will still show up in the Alt-Tab list. I don't know of any generic way to completely hide a window (including from the Alt-Tab list) in labwc currently.
A lot of labwc discussion takes place on the GitHub site, and in my experience the developers are pretty friendly. You can start a discussion/ask a question there if you like: https://github.com/labwc/labwc/discussions
Offline
swaymsg will not work in labwc, since labwc does not support sway's IPC protocol. There are Iconify (a.k.a minimize) and Raise actions that you could use in labwc's rc.xml to hide/show a window, but it will still show up in the Alt-Tab list. I don't know of any generic way to completely hide a window (including from the Alt-Tab list) in labwc currently.
A lot of labwc discussion takes place on the GitHub site, and in my experience the developers are pretty friendly. You can start a discussion/ask a question there if you like: https://github.com/labwc/labwc/discussions
I found a script there:
echo '<openbox_pipe_menu id="window-list">'
wla=$(wlrctl toplevel list state:-minimized)
wlrctl toplevel list state:-minimized |
while read line;
do
appid=$(echo $line | cut -d ':' -f1)
apptitle=$(echo $line | cut -d ':' -f2-| sed '1s/.//' | sed 's/\&/\&/g')
echo "<item label="\""$appid $apptitle"\"">"
echo "<action name="\""Execute"\""><execute>"
echo "wlrctl window focus app_id:$appid `title:'$apptitle'` "
echo "</execute></action></item>"
done
if [ -z "$wla" ];
then
echo "<item label='No open windows'></item>"
fi
echo "<separator/>"
wlrctl toplevel list state:minimized |
while read line;
do
appid=$(echo $line | cut -d ':' -f1)
apptitle=$(echo $line | cut -d ':' -f2-| sed '1s/.//' )
echo "<item label="\""* $appid $apptitle"\"">"
echo "<action name="\""Execute"\""><execute>"
echo "wlrctl window focus app_id:$appid state:minimized `title:'$apptitle'`"
echo "</execute></action></item>"
done
echo '</openbox_pipe_menu>'
But I can't figure out how to use it. Can you help?
Offline
If you have a specific question, I can try to answer it.
Offline