mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-06 04:50:13 +01:00
bspwm: Add dropdown.sh
This commit makes it possible to toggle any terminal you want with super + backslash. If the terminal doesn't exist already, it will be created for you.
This commit is contained in:
parent
f3d129362e
commit
3ebc47ca28
19
bspwm/.config/sxhkd/dropdown.sh
Normal file
19
bspwm/.config/sxhkd/dropdown.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||||
|
# Copyright (C) 2018 Donovan Glover
|
||||||
|
|
||||||
|
c='URxvt' # Class
|
||||||
|
i='dropdown' # Instance
|
||||||
|
x='urxvtc -name' # Executable
|
||||||
|
|
||||||
|
# Note: This solution will not work with termite since it registers two ids.
|
||||||
|
# See https://github.com/thestinger/termite/issues/634 for more information.
|
||||||
|
|
||||||
|
id=$(xdo id -n $i)
|
||||||
|
|
||||||
|
bspc rule -r $c:$i
|
||||||
|
bspc rule -a $c:$i sticky=on state=floating rectangle=3400x1200+220+200
|
||||||
|
|
||||||
|
([ -z "$id" ]) && ($x $i) ||
|
||||||
|
([[ $(xprop -id "$id" | awk '/window state: / {print $3}') == 'Withdrawn' ]] &&
|
||||||
|
xdo show -n $i || xdo hide -n $i)
|
@ -13,6 +13,10 @@ super + p
|
|||||||
super + {_,shift} + Return
|
super + {_,shift} + Return
|
||||||
{termite -e "tmux new-session; set status",urxvtc}
|
{termite -e "tmux new-session; set status",urxvtc}
|
||||||
|
|
||||||
|
# Toggle a dropdown terminal
|
||||||
|
super + backslash
|
||||||
|
~/.config/sxhkd/dropdown.sh
|
||||||
|
|
||||||
# toggle polybar: top_padding depends on the height you set in polybar/config
|
# toggle polybar: top_padding depends on the height you set in polybar/config
|
||||||
super + o
|
super + o
|
||||||
(xdotool search --class --onlyvisible "Polybar" && \
|
(xdotool search --class --onlyvisible "Polybar" && \
|
||||||
|
Loading…
Reference in New Issue
Block a user