Extract omarchy-toggle-enabled and use this with the waybar to persist
This commit is contained in:
@@ -11,7 +11,7 @@ fi
|
|||||||
pgrep -f org.omarchy.screensaver && exit 0
|
pgrep -f org.omarchy.screensaver && exit 0
|
||||||
|
|
||||||
# Allow screensaver to be turned off but also force started
|
# Allow screensaver to be turned off but also force started
|
||||||
if [[ -f ~/.local/state/omarchy/toggles/screensaver-off ]] && [[ $1 != "force" ]]; then
|
if omarchy-toggle-enabled screensaver-off && [[ $1 != "force" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -277,7 +277,7 @@ show_setup_config_menu() {
|
|||||||
show_setup_system_menu() {
|
show_setup_system_menu() {
|
||||||
local options=""
|
local options=""
|
||||||
|
|
||||||
if [[ -f ~/.local/state/omarchy/toggles/suspend-off ]]; then
|
if omarchy-toggle-enabled suspend-off; then
|
||||||
options="$options Enable Suspend"
|
options="$options Enable Suspend"
|
||||||
else
|
else
|
||||||
options="$options Disable Suspend"
|
options="$options Disable Suspend"
|
||||||
@@ -579,7 +579,7 @@ show_about() {
|
|||||||
|
|
||||||
show_system_menu() {
|
show_system_menu() {
|
||||||
local options=" Screensaver\n Lock"
|
local options=" Screensaver\n Lock"
|
||||||
[[ ! -f ~/.local/state/omarchy/toggles/suspend-off ]] && options="$options\n Suspend"
|
! omarchy-toggle-enabled suspend-off && options="$options\n Suspend"
|
||||||
omarchy-hibernation-available && options="$options\n Hibernate"
|
omarchy-hibernation-available && options="$options\n Hibernate"
|
||||||
options="$options\n Logout\n Restart\n Shutdown"
|
options="$options\n Logout\n Restart\n Shutdown"
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,8 @@ VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json"
|
|||||||
set_theme() {
|
set_theme() {
|
||||||
local editor_cmd="$1"
|
local editor_cmd="$1"
|
||||||
local settings_path="$2"
|
local settings_path="$2"
|
||||||
local skip_flag="$3"
|
|
||||||
|
|
||||||
omarchy-cmd-present "$editor_cmd" && [[ ! -f $skip_flag ]] || return 0
|
omarchy-cmd-present "$editor_cmd" || return 0
|
||||||
|
|
||||||
if [[ -f $VS_CODE_THEME ]]; then
|
if [[ -f $VS_CODE_THEME ]]; then
|
||||||
theme_name=$(jq -r '.name' "$VS_CODE_THEME")
|
theme_name=$(jq -r '.name' "$VS_CODE_THEME")
|
||||||
@@ -34,7 +33,7 @@ set_theme() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_theme "code" "$HOME/.config/Code/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes"
|
! omarchy-toggle-enabled skip-vscode-theme-changes && set_theme "code" "$HOME/.config/Code/User/settings.json"
|
||||||
set_theme "code-insiders" "$HOME/.config/Code - Insiders/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-vscode-insiders-theme-changes"
|
! omarchy-toggle-enabled skip-vscode-insiders-theme-changes && set_theme "code-insiders" "$HOME/.config/Code - Insiders/User/settings.json"
|
||||||
set_theme "codium" "$HOME/.config/VSCodium/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-codium-theme-changes"
|
! omarchy-toggle-enabled skip-codium-theme-changes && set_theme "codium" "$HOME/.config/VSCodium/User/settings.json"
|
||||||
set_theme "cursor" "$HOME/.config/Cursor/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-cursor-theme-changes"
|
! omarchy-toggle-enabled skip-cursor-theme-changes && set_theme "cursor" "$HOME/.config/Cursor/User/settings.json"
|
||||||
|
|||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Check if a toggle is enabled (flag file exists)
|
||||||
|
[[ -f "$HOME/.local/state/omarchy/toggles/$1" ]]
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
omarchy-toggle \
|
||||||
|
--enabled-notification " Bar hidden" \
|
||||||
|
--disabled-notification " Bar visible" \
|
||||||
|
waybar-off
|
||||||
|
|
||||||
if pgrep -x waybar >/dev/null; then
|
if pgrep -x waybar >/dev/null; then
|
||||||
pkill -x waybar
|
pkill -x waybar
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
exec-once = uwsm-app -- hypridle
|
exec-once = uwsm-app -- hypridle
|
||||||
exec-once = uwsm-app -- mako
|
exec-once = uwsm-app -- mako
|
||||||
exec-once = uwsm-app -- waybar
|
exec-once = ! omarchy-toggle-enabled waybar-off && uwsm-app -- waybar
|
||||||
exec-once = uwsm-app -- fcitx5 --disable notificationitem
|
exec-once = uwsm-app -- fcitx5 --disable notificationitem
|
||||||
exec-once = uwsm-app -- swaybg -i ~/.config/omarchy/current/background -m fill
|
exec-once = uwsm-app -- swaybg -i ~/.config/omarchy/current/background -m fill
|
||||||
exec-once = uwsm-app -- swayosd-server
|
exec-once = uwsm-app -- swayosd-server
|
||||||
|
|||||||
Reference in New Issue
Block a user