Use preexisting toggles setup
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if a Hyprland flag is currently disabled (missing).
|
||||
|
||||
[[ ! -f "$HOME/.local/state/omarchy/flags/hypr/$1.conf" ]]
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if a Hyprland flag is currently enabled.
|
||||
|
||||
[[ -f "$HOME/.local/state/omarchy/flags/hypr/$1.conf" ]]
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle the internal laptop display on/off using the flag system.
|
||||
# Toggle the internal laptop display on/off.
|
||||
|
||||
if omarchy-hyprland-flag-missing internal-monitor-disable; then
|
||||
if omarchy-hyprland-toggle-disabled internal-monitor-disable; then
|
||||
ACTIVE_COUNT=$(hyprctl monitors -j | jq 'length')
|
||||
if [[ $ACTIVE_COUNT -le 1 ]]; then
|
||||
notify-send -u low " Can't disable the only active display"
|
||||
@@ -10,7 +10,7 @@ if omarchy-hyprland-flag-missing internal-monitor-disable; then
|
||||
fi
|
||||
fi
|
||||
|
||||
omarchy-hyprland-flag-toggle \
|
||||
omarchy-hyprland-toggle \
|
||||
--enabled-notification " Internal display off" \
|
||||
--disabled-notification " Internal display on" \
|
||||
internal-monitor-disable
|
||||
|
||||
@@ -14,14 +14,14 @@ while [[ $# -gt 1 ]]; do
|
||||
done
|
||||
|
||||
FLAG_NAME="$1"
|
||||
flag="$HOME/.local/state/omarchy/flags/hypr/$FLAG_NAME.conf"
|
||||
flag_source="$OMARCHY_PATH/default/hypr/flags/$FLAG_NAME.conf"
|
||||
FLAG="$HOME/.local/state/omarchy/toggles/hypr/$FLAG_NAME.conf"
|
||||
FLAG_SOURCE="$OMARCHY_PATH/default/hypr/toggles/$FLAG_NAME.conf"
|
||||
|
||||
if [[ -f $flag ]]; then
|
||||
rm $flag
|
||||
if [[ -f $FLAG ]]; then
|
||||
rm $FLAG
|
||||
[[ -n $DISABLED_NOTIFICATION ]] && notify-send -u low "$DISABLED_NOTIFICATION"
|
||||
elif [[ -f $flag_source ]]; then
|
||||
cp $flag_source $flag
|
||||
elif [[ -f $FLAG_SOURCE ]]; then
|
||||
cp $FLAG_SOURCE $FLAG
|
||||
[[ -n $ENABLED_NOTIFICATION ]] && notify-send -u low "$ENABLED_NOTIFICATION"
|
||||
else
|
||||
echo "Flag not found"
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if a Hyprland toggle is currently disabled (missing).
|
||||
|
||||
[[ ! -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]]
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if a Hyprland toggle is currently enabled.
|
||||
|
||||
[[ -f "$HOME/.local/state/omarchy/toggles/hypr/$1.conf" ]]
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
# Toggles the window gaps globally between no gaps and the default.
|
||||
|
||||
omarchy-hyprland-flag-toggle window-no-gaps
|
||||
omarchy-hyprland-toggle window-no-gaps
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle single-window square aspect ratio using the flag system.
|
||||
# Toggle single-window square aspect ratio.
|
||||
|
||||
omarchy-hyprland-flag-toggle \
|
||||
omarchy-hyprland-toggle \
|
||||
--enabled-notification " Enable single-window square aspect ratio" \
|
||||
--disabled-notification " Disable single-window square aspect ratio" \
|
||||
single-window-aspect-ratio
|
||||
|
||||
Reference in New Issue
Block a user