upload
This commit is contained in:
16
bin/lookat
Executable file
16
bin/lookat
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# lookat(Desktop) - switch to desktop, if repeated switch back.
|
||||
# Replacement for GoToDesktop Openbox action.
|
||||
|
||||
LD_FILE=~/.cache/.lastdesk
|
||||
|
||||
curdesk=$(wmctrl -d |grep '*' | awk '{print $1}')
|
||||
todesk=$((${1} - 1))
|
||||
|
||||
if [[ "${curdesk}" == "${todesk}" ]];then
|
||||
todesk=$(< "$LD_FILE")
|
||||
else
|
||||
echo "${curdesk}" > "$LD_FILE"
|
||||
fi
|
||||
wmctrl -s "${todesk}"
|
||||
|
||||
Reference in New Issue
Block a user