mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-29 04:00:42 +00:00
Add script to change window color on fake fullscreen
This commit is contained in:
parent
edece87bbc
commit
14f652a409
2 changed files with 23 additions and 1 deletions
22
home/.local/bin/scripts/gui/hyprland/toggle-fakefullscreen
Executable file
22
home/.local/bin/scripts/gui/hyprland/toggle-fakefullscreen
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
#ACTIVE_BORDER_COLOR="0xFF327BD1"
|
||||
ACTIVE_BORDER_COLOR="0xFFFF6600"
|
||||
DEFAULT_BORDER_COLOR="0xFFFFA500"
|
||||
|
||||
hyprctl dispatch fakefullscreen ""
|
||||
|
||||
fullscreen_status="$(hyprctl activewindow -j | jq '.fakeFullscreen')"
|
||||
if [ "$fullscreen_status" = "null" ]; then
|
||||
echo "Update your hyprland, 'fakeFullscreen' window property not found."
|
||||
exit 1
|
||||
elif [ "$fullscreen_status" = "true" ]; then
|
||||
window_address="$(hyprctl activewindow -j | jq -r '.address')"
|
||||
hyprctl setprop "address:$window_address" activebordercolor "$ACTIVE_BORDER_COLOR" lock
|
||||
elif [ "$fullscreen_status" = "false" ]; then
|
||||
window_address="$(hyprctl activewindow -j | jq -r '.address')"
|
||||
hyprctl setprop "address:$window_address" activebordercolor "$DEFAULT_BORDER_COLOR"
|
||||
else
|
||||
echo "Unexpected output from 'fakeFullscreen' window property: $fullscreen_status"
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue