Merge branch 'master' into master
This commit is contained in:
25
scripts/announce_workspace.sh
Executable file
25
scripts/announce_workspace.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
workSpace="$(i3-msg -t get_workspaces \
|
||||
| jq '.[] | select(.focused==true).name' \
|
||||
| cut -d"\"" -f2)"
|
||||
left=9
|
||||
right=0
|
||||
msg="Workspace ${workSpace}"
|
||||
if ! [[ "${workSpace}" =~ ^[0-9]+$ ]]; then
|
||||
right=9
|
||||
else
|
||||
if [[ ${workSpace} -eq 10 ]]; then
|
||||
left=0
|
||||
right=9
|
||||
elif [[ ${workSpace} -eq 5 ]]; then
|
||||
right=9
|
||||
elif [[ ${workSpace} -gt 5 ]]; then
|
||||
right=9
|
||||
((left-=${workSpace}))
|
||||
else
|
||||
((right+=${workSpace}))
|
||||
fi
|
||||
fi
|
||||
play -nqV0 synth pi fade 0 .25 .15 pad 0 1 reverb overdrive riaa norm -5 speed 1 remix v0.${left} v0.${right} &
|
||||
spd-say -P important -Cw "${msg}"
|
@ -20,7 +20,8 @@ def on_mode(self,event):
|
||||
system('play -qV0 "|sox -np synth .07 sq 400" "|sox -np synth .5 sq 800" fade h 0 .5 .5 norm -20 &')
|
||||
|
||||
def on_workspace_focus(self,i3):
|
||||
system('play -qnV0 synth pi fade 0 .25 .15 pad 0 1 reverb overdrive riaa norm -8 speed 1 &')
|
||||
#system('play -qnV0 synth pi fade 0 .25 .15 pad 0 1 reverb overdrive riaa norm -8 speed 1 &')
|
||||
pass
|
||||
|
||||
def on_workspace_move(self,i3):
|
||||
system('play -qnV0 synth pi fade 0 .25 .15 pad 0 1 reverb overdrive riaa norm -8 speed 1 reverse &')
|
||||
|
@ -1,10 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
select_window() {
|
||||
local window="$(yad --list --column "Select Window" "$@")"
|
||||
echo "${window%|}"
|
||||
}
|
||||
mapfile -t windowList < <(python3 -c '
|
||||
import i3ipc
|
||||
|
||||
i3-msg '[title="'$(i3-msg -t get_tree | jq -r "recurse(.nodes[]) | select(.window) | .name" | select_window)'"] focus'
|
||||
i3 = i3ipc.Connection()
|
||||
|
||||
exit 0
|
||||
for con in i3.get_tree():
|
||||
if con.window and con.parent.type != "dockarea":
|
||||
print(con.window)
|
||||
print(con.name)')
|
||||
id="$(yad --title "I38" --list --separator "" --column "id" --column "Select Window" --hide-column 1 --print-column 1 "${windowList[@]}")"
|
||||
if [[ -z "${id}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
i3-msg \[id="${id}"\] focus
|
||||
|
Reference in New Issue
Block a user