Last active
October 28, 2023 03:55
-
-
Save avalonv/04aec5ff61991822efdb7b16ee8d0c21 to your computer and use it in GitHub Desktop.
i3_togglesticky
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# toggle sticky for focused window | |
# requires xdotool | |
state=enabled | |
mywindow=$(xdotool getactivewindow) | |
if [[ $state == 'enabled' ]]; then | |
i3-msg "[id=$mywindow] sticky disable" | |
sed -i '5s/.*/state=disabled/' $0 | |
else | |
i3-msg "[id=$mywindow] sticky enable" | |
sed -i '5s/.*/state=enabled/' $0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is no longer needed as i3 now natively supports
sticky toggle
(maybe it was available all along? maybe im dumb >.>)