Update keybinds and utility scripts. Add a window switcher.

This commit is contained in:
Mid Favila 2021-07-05 22:49:24 -03:00
parent f562af7d81
commit 67d9af2c0a
3 changed files with 66 additions and 0 deletions

View File

@ -21,9 +21,11 @@ ctrl + Pause ; p ; b
#Start a terminal
ctrl + Pause ; p ; t
xterm
#Lock the screen
ctrl + Pause ; shift + L
xset s activate
#Toggle whether the current window is fullscreen
ctrl + Pause ; w ; f
wmctrl -r :ACTIVE: -b toggle,fullscreen
@ -32,6 +34,10 @@ ctrl + Pause ; w ; f
ctrl + Pause ; w ; t
wmctrl -r :ACTIVE: -b toggle,maximized_horz,maximized_vert
#Switch between windows
ctrl + Pause ; shift + W
wmctrl -a "$(${FXDE_DIR}/fxde-core/scripts/winlist.sh|xprompt -i|sed 's/\(^ *\)//')"
#Switch between pages
ctrl + Pause ; g ; F1
wmctrl -s 0
@ -44,3 +50,29 @@ ctrl + Pause ; g ; F3
ctrl + Pause ; g ; F4
wmctrl -s 3
#Move frames to other pages
ctrl + Pause ; w ; F1
wmctrl -r :ACTIVE: -t 0
ctrl + Pause ; w ; F2
wmctrl -r :ACTIVE: -t 1
ctrl + Pause ; w ; F3
wmctrl -r :ACTIVE: -t 2
ctrl + Pause ; w ; F4
wmctrl -r :ACTIVE: -t 3
#Move frames
ctrl + Pause ; Right
wmctrl -r :ACTIVE: -e 0,+2,-1,-1,-1 #Move right
ctrl + Pause ; Left
wmctrl -r :ACTIVE: -e 0,-2,-1,-1,-1 #Move left
ctrl + Pause ; Up
wmctrl -r :ACTIVE: -e 0,-1,+2,-1,-1 #Move up
ctrl + Pause ; Down
wmctrl -r :ACTIVE: -e 0,-1,-2,-1,-1 #Move down

34
misc/winlist Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh -e
getxid()
{
if [ ${x} -gt 0 ]
then
sed ${x}!d /tmp/winlist.jnk|sed "s/commandante/ /g"|cut -d ' ' -f 1
else
exit
fi
}
getname()
{
if [ ${x} -gt 0 ]
then
sed ${x}!d /tmp/winlist.jnk|sed "s/commandante/ /g"|cut -d ' ' -f 3
else
exit
fi
}
#Get our window list
wmctrl -l > /tmp/winlist.jnk
#How many windows are we managing?
x=$(wc -l /tmp/winlist.jnk|cut -d ' ' -f1)
#Print the list of windows in a xprompt-compatible manner
while [ $x -gt 0 ]
do
printf "%s\t%d\n" "$(getname)" "${x}"
x=$((x-1))
done