added stuff
This commit is contained in:
parent
e8d9044d2b
commit
9d0ebdfbd0
907 changed files with 70990 additions and 0 deletions
40
nyx/homes/notashelf/services/wayland/ags/bin/hyprctl_swallow
Executable file
40
nyx/homes/notashelf/services/wayland/ags/bin/hyprctl_swallow
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
# vim: syntax=bash
|
||||
|
||||
notifySend="notify-send"
|
||||
|
||||
getSwallowStatus() {
|
||||
output=$(hyprctl getoption misc:enable_swallow)
|
||||
if [[ $output == *"int: 1"* ]]; then
|
||||
status=false
|
||||
else
|
||||
status=true
|
||||
fi
|
||||
echo "{\"status\": $status}"
|
||||
}
|
||||
|
||||
switchSwallowStatus() {
|
||||
enable=$1
|
||||
if [ "$enable" = true ]; then
|
||||
statusMsg="Turned on swallowing"
|
||||
keyword="true"
|
||||
else
|
||||
statusMsg="Turned off swallowing"
|
||||
keyword="false"
|
||||
fi
|
||||
hyprctl keyword misc:enable_swallow $keyword
|
||||
$notifySend "Hyprland" "$statusMsg"
|
||||
}
|
||||
|
||||
if [ $# -gt 0 ] && [ "${1}" = "query" ]; then
|
||||
getSwallowStatus
|
||||
exit 0
|
||||
fi
|
||||
|
||||
output=$(hyprctl getoption misc:enable_swallow)
|
||||
|
||||
if [[ $output == *"int: 1"* ]]; then
|
||||
switchSwallowStatus false
|
||||
else
|
||||
switchSwallowStatus true
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue