fix(system): enable uwsm and fix session detection to allow VM login
- Enable programs.uwsm for session management. - Improve SDDM theme session detection logic to be case-insensitive and more robust. - Perform a global cleanup of 'Nnomarchy' and 'org.nnomarchy' typos across all scripts and configurations.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Launch the Nnomarchy Menu or takes a parameter to jump straight to a submenu.
|
||||
# Launch the Nomarchy Menu or takes a parameter to jump straight to a submenu.
|
||||
|
||||
export PATH="$HOME/.local/share/nnomarchy/bin:$PATH"
|
||||
export PATH="$HOME/.local/share/nomarchy/bin:$PATH"
|
||||
|
||||
# Set to true when going directly to a submenu, so we can exit directly
|
||||
BACK_TO_EXIT=false
|
||||
@@ -42,30 +42,30 @@ menu() {
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "$options" | nnomarchy-launch-walker --dmenu --width 295 --minheight 1 --maxheight 630 -p "$prompt…" "${args[@]}" 2>/dev/null
|
||||
echo -e "$options" | nomarchy-launch-walker --dmenu --width 295 --minheight 1 --maxheight 630 -p "$prompt…" "${args[@]}" 2>/dev/null
|
||||
}
|
||||
|
||||
terminal() {
|
||||
xdg-terminal-exec --app-id=org.nnomarchy.terminal "$@"
|
||||
xdg-terminal-exec --app-id=org.nomarchy.terminal "$@"
|
||||
}
|
||||
|
||||
present_terminal() {
|
||||
nnomarchy-launch-floating-terminal-with-presentation $1
|
||||
nomarchy-launch-floating-terminal-with-presentation $1
|
||||
}
|
||||
|
||||
open_in_editor() {
|
||||
notify-send -u low "Editing config file" "$1"
|
||||
nnomarchy-launch-editor "$1"
|
||||
nomarchy-launch-editor "$1"
|
||||
}
|
||||
|
||||
show_learn_menu() {
|
||||
case $(menu "Learn" " Keybindings\n Nnomarchy\n Hyprland\n Arch\n Neovim\n Bash") in
|
||||
*Keybindings*) nnomarchy-menu-keybindings ;;
|
||||
*Nnomarchy*) nnomarchy-launch-webapp "https://learn.omacom.io/2/the-nnomarchy-manual" ;;
|
||||
*Hyprland*) nnomarchy-launch-webapp "https://wiki.hypr.land/" ;;
|
||||
*Arch*) nnomarchy-launch-webapp "https://wiki.archlinux.org/title/Main_page" ;;
|
||||
*Bash*) nnomarchy-launch-webapp "https://devhints.io/bash" ;;
|
||||
*Neovim*) nnomarchy-launch-webapp "https://www.lazyvim.org/keymaps" ;;
|
||||
case $(menu "Learn" " Keybindings\n Nomarchy\n Hyprland\n Arch\n Neovim\n Bash") in
|
||||
*Keybindings*) nomarchy-menu-keybindings ;;
|
||||
*Nomarchy*) nomarchy-launch-webapp "https://learn.omacom.io/2/the-nomarchy-manual" ;;
|
||||
*Hyprland*) nomarchy-launch-webapp "https://wiki.hypr.land/" ;;
|
||||
*Arch*) nomarchy-launch-webapp "https://wiki.archlinux.org/title/Main_page" ;;
|
||||
*Bash*) nomarchy-launch-webapp "https://devhints.io/bash" ;;
|
||||
*Neovim*) nomarchy-launch-webapp "https://www.lazyvim.org/keymaps" ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -82,7 +82,7 @@ show_trigger_menu() {
|
||||
|
||||
show_capture_menu() {
|
||||
case $(menu "Capture" " Screenshot\n Screenrecord\n Color") in
|
||||
*Screenshot*) nnomarchy-cmd-screenshot ;;
|
||||
*Screenshot*) nomarchy-cmd-screenshot ;;
|
||||
*Screenrecord*) show_screenrecord_menu ;;
|
||||
*Color*) pkill hyprpicker || hyprpicker -a ;;
|
||||
*) back_to show_trigger_menu ;;
|
||||
@@ -117,18 +117,18 @@ show_webcam_select_menu() {
|
||||
}
|
||||
|
||||
show_screenrecord_menu() {
|
||||
nnomarchy-cmd-screenrecord --stop-recording && exit 0
|
||||
nomarchy-cmd-screenrecord --stop-recording && exit 0
|
||||
|
||||
case $(menu "Screenrecord" " With no audio\n With desktop audio\n With desktop + microphone audio\n With desktop + microphone audio + webcam") in
|
||||
*"With no audio") nnomarchy-cmd-screenrecord ;;
|
||||
*"With desktop audio") nnomarchy-cmd-screenrecord --with-desktop-audio ;;
|
||||
*"With desktop + microphone audio") nnomarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio ;;
|
||||
*"With no audio") nomarchy-cmd-screenrecord ;;
|
||||
*"With desktop audio") nomarchy-cmd-screenrecord --with-desktop-audio ;;
|
||||
*"With desktop + microphone audio") nomarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio ;;
|
||||
*"With desktop + microphone audio + webcam")
|
||||
local device=$(show_webcam_select_menu) || {
|
||||
back_to show_capture_menu
|
||||
return
|
||||
}
|
||||
nnomarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio --with-webcam --webcam-device="$device"
|
||||
nomarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio --with-webcam --webcam-device="$device"
|
||||
;;
|
||||
*) back_to show_capture_menu ;;
|
||||
esac
|
||||
@@ -136,9 +136,9 @@ show_screenrecord_menu() {
|
||||
|
||||
show_share_menu() {
|
||||
case $(menu "Share" " Clipboard\n File \n Folder") in
|
||||
*Clipboard*) nnomarchy-cmd-share clipboard ;;
|
||||
*File*) terminal bash -c "nnomarchy-cmd-share file" ;;
|
||||
*Folder*) terminal bash -c "nnomarchy-cmd-share folder" ;;
|
||||
*Clipboard*) nomarchy-cmd-share clipboard ;;
|
||||
*File*) terminal bash -c "nomarchy-cmd-share file" ;;
|
||||
*Folder*) terminal bash -c "nomarchy-cmd-share folder" ;;
|
||||
*) back_to show_trigger_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -146,21 +146,21 @@ show_share_menu() {
|
||||
show_toggle_menu() {
|
||||
case $(menu "Toggle" " Screensaver\n Nightlight\n Idle Lock\n Top Bar\n Workspace Layout\n Window Gaps\n 1-Window Ratio\n Display Scaling") in
|
||||
|
||||
*Screensaver*) nnomarchy-toggle-screensaver ;;
|
||||
*Nightlight*) nnomarchy-toggle-nightlight ;;
|
||||
*Idle*) nnomarchy-toggle-idle ;;
|
||||
*Bar*) nnomarchy-toggle-waybar ;;
|
||||
*Layout*) nnomarchy-hyprland-workspace-layout-toggle ;;
|
||||
*Ratio*) nnomarchy-hyprland-window-single-square-aspect-toggle ;;
|
||||
*Gaps*) nnomarchy-hyprland-window-gaps-toggle ;;
|
||||
*Scaling*) nnomarchy-hyprland-monitor-scaling-cycle ;;
|
||||
*Screensaver*) nomarchy-toggle-screensaver ;;
|
||||
*Nightlight*) nomarchy-toggle-nightlight ;;
|
||||
*Idle*) nomarchy-toggle-idle ;;
|
||||
*Bar*) nomarchy-toggle-waybar ;;
|
||||
*Layout*) nomarchy-hyprland-workspace-layout-toggle ;;
|
||||
*Ratio*) nomarchy-hyprland-window-single-square-aspect-toggle ;;
|
||||
*Gaps*) nomarchy-hyprland-window-gaps-toggle ;;
|
||||
*Scaling*) nomarchy-hyprland-monitor-scaling-cycle ;;
|
||||
*) back_to show_trigger_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_hardware_menu() {
|
||||
case $(menu "Toggle" " Hybrid GPU") in
|
||||
*"Hybrid GPU"*) present_terminal nnomarchy-toggle-hybrid-gpu ;;
|
||||
*"Hybrid GPU"*) present_terminal nomarchy-toggle-hybrid-gpu ;;
|
||||
*) show_trigger_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -171,26 +171,26 @@ show_style_menu() {
|
||||
*Font*) show_font_menu ;;
|
||||
*Background*) show_background_menu ;;
|
||||
*Hyprland*) open_in_editor ~/.config/hypr/looknfeel.conf ;;
|
||||
*Screensaver*) open_in_editor ~/.config/nnomarchy/branding/screensaver.txt ;;
|
||||
*About*) open_in_editor ~/.config/nnomarchy/branding/about.txt ;;
|
||||
*Screensaver*) open_in_editor ~/.config/nomarchy/branding/screensaver.txt ;;
|
||||
*About*) open_in_editor ~/.config/nomarchy/branding/about.txt ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_theme_menu() {
|
||||
nnomarchy-launch-walker -m menus:nnomarchythemes --width 800 --minheight 400
|
||||
nomarchy-launch-walker -m menus:nomarchythemes --width 800 --minheight 400
|
||||
}
|
||||
|
||||
show_background_menu() {
|
||||
nnomarchy-launch-walker -m menus:nnomarchyBackgroundSelector --width 800 --minheight 400
|
||||
nomarchy-launch-walker -m menus:nomarchyBackgroundSelector --width 800 --minheight 400
|
||||
}
|
||||
|
||||
show_font_menu() {
|
||||
theme=$(menu "Font" "$(nnomarchy-font-list)" "--width 350" "$(nnomarchy-font-current)")
|
||||
theme=$(menu "Font" "$(nomarchy-font-list)" "--width 350" "$(nomarchy-font-current)")
|
||||
if [[ $theme == "CNCLD" || -z $theme ]]; then
|
||||
back_to show_style_menu
|
||||
else
|
||||
nnomarchy-font-set "$theme"
|
||||
nomarchy-font-set "$theme"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -202,16 +202,16 @@ show_setup_menu() {
|
||||
options="$options\n DNS\n Security\n Config"
|
||||
|
||||
case $(menu "Setup" "$options") in
|
||||
*Audio*) nnomarchy-launch-audio ;;
|
||||
*Wifi*) nnomarchy-launch-wifi ;;
|
||||
*Bluetooth*) nnomarchy-launch-bluetooth ;;
|
||||
*Audio*) nomarchy-launch-audio ;;
|
||||
*Wifi*) nomarchy-launch-wifi ;;
|
||||
*Bluetooth*) nomarchy-launch-bluetooth ;;
|
||||
*Power*) show_setup_power_menu ;;
|
||||
*System*) show_setup_system_menu ;;
|
||||
*Monitors*) open_in_editor ~/.config/hypr/monitors.conf ;;
|
||||
*Keybindings*) open_in_editor ~/.config/hypr/bindings.conf ;;
|
||||
*Input*) open_in_editor ~/.config/hypr/input.conf ;;
|
||||
*Key\ Remapping*) nnomarchy-setup-makima && open_in_editor "$HOME/.config/makima/AT Translated Set 2 keyboard.toml" && nnomarchy-restart-makima ;;
|
||||
*DNS*) present_terminal nnomarchy-setup-dns ;;
|
||||
*Key\ Remapping*) nomarchy-setup-makima && open_in_editor "$HOME/.config/makima/AT Translated Set 2 keyboard.toml" && nomarchy-restart-makima ;;
|
||||
*DNS*) present_terminal nomarchy-setup-dns ;;
|
||||
*Security*) show_setup_security_menu ;;
|
||||
*Config*) show_setup_config_menu ;;
|
||||
*) show_main_menu ;;
|
||||
@@ -219,7 +219,7 @@ show_setup_menu() {
|
||||
}
|
||||
|
||||
show_setup_power_menu() {
|
||||
profile=$(menu "Power Profile" "$(nnomarchy-powerprofiles-list)" "" "$(powerprofilesctl get)")
|
||||
profile=$(menu "Power Profile" "$(nomarchy-powerprofiles-list)" "" "$(powerprofilesctl get)")
|
||||
|
||||
if [[ $profile == "CNCLD" || -z $profile ]]; then
|
||||
back_to show_setup_menu
|
||||
@@ -230,8 +230,8 @@ show_setup_power_menu() {
|
||||
|
||||
show_setup_security_menu() {
|
||||
case $(menu "Setup" " Fingerprint\n Fido2") in
|
||||
*Fingerprint*) present_terminal nnomarchy-setup-fingerprint ;;
|
||||
*Fido2*) present_terminal nnomarchy-setup-fido2 ;;
|
||||
*Fingerprint*) present_terminal nomarchy-setup-fingerprint ;;
|
||||
*Fido2*) present_terminal nomarchy-setup-fido2 ;;
|
||||
*) show_setup_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -240,13 +240,13 @@ show_setup_config_menu() {
|
||||
case $(menu "Setup" " Defaults\n Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n Swayosd\n Walker\n Waybar\n XCompose") in
|
||||
*Defaults*) open_in_editor ~/.config/uwsm/default ;;
|
||||
*Hyprland*) open_in_editor ~/.config/hypr/hyprland.conf ;;
|
||||
*Hypridle*) open_in_editor ~/.config/hypr/hypridle.conf && nnomarchy-restart-hypridle ;;
|
||||
*Hypridle*) open_in_editor ~/.config/hypr/hypridle.conf && nomarchy-restart-hypridle ;;
|
||||
*Hyprlock*) open_in_editor ~/.config/hypr/hyprlock.conf ;;
|
||||
*Hyprsunset*) open_in_editor ~/.config/hypr/hyprsunset.conf && nnomarchy-restart-hyprsunset ;;
|
||||
*Swayosd*) open_in_editor ~/.config/swayosd/config.toml && nnomarchy-restart-swayosd ;;
|
||||
*Walker*) open_in_editor ~/.config/walker/config.toml && nnomarchy-restart-walker ;;
|
||||
*Waybar*) open_in_editor ~/.config/waybar/config.jsonc && nnomarchy-restart-waybar ;;
|
||||
*XCompose*) open_in_editor ~/.XCompose && nnomarchy-restart-xcompose ;;
|
||||
*Hyprsunset*) open_in_editor ~/.config/hypr/hyprsunset.conf && nomarchy-restart-hyprsunset ;;
|
||||
*Swayosd*) open_in_editor ~/.config/swayosd/config.toml && nomarchy-restart-swayosd ;;
|
||||
*Walker*) open_in_editor ~/.config/walker/config.toml && nomarchy-restart-walker ;;
|
||||
*Waybar*) open_in_editor ~/.config/waybar/config.jsonc && nomarchy-restart-waybar ;;
|
||||
*XCompose*) open_in_editor ~/.XCompose && nomarchy-restart-xcompose ;;
|
||||
*) show_setup_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -260,16 +260,16 @@ show_setup_system_menu() {
|
||||
options="$options Disable Suspend"
|
||||
fi
|
||||
|
||||
if nnomarchy-hibernation-available; then
|
||||
if nomarchy-hibernation-available; then
|
||||
options="$options\n Disable Hibernate"
|
||||
else
|
||||
options="$options\n Enable Hibernate"
|
||||
fi
|
||||
|
||||
case $(menu "System" "$options") in
|
||||
*Suspend*) nnomarchy-toggle-suspend ;;
|
||||
*"Enable Hibernate"*) present_terminal nnomarchy-hibernation-setup ;;
|
||||
*"Disable Hibernate"*) present_terminal nnomarchy-hibernation-remove ;;
|
||||
*Suspend*) nomarchy-toggle-suspend ;;
|
||||
*"Enable Hibernate"*) present_terminal nomarchy-hibernation-setup ;;
|
||||
*"Disable Hibernate"*) present_terminal nomarchy-hibernation-remove ;;
|
||||
*) show_setup_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -277,25 +277,25 @@ show_setup_system_menu() {
|
||||
|
||||
|
||||
show_update_menu() {
|
||||
case $(menu "Update" " Nnomarchy\n Extra Themes\n Process\n Hardware\n Firmware\n Password\n Timezone\n Time") in
|
||||
*Nnomarchy*) present_terminal nnomarchy-update ;;
|
||||
*Themes*) present_terminal nnomarchy-theme-update ;;
|
||||
case $(menu "Update" " Nomarchy\n Extra Themes\n Process\n Hardware\n Firmware\n Password\n Timezone\n Time") in
|
||||
*Nomarchy*) present_terminal nomarchy-update ;;
|
||||
*Themes*) present_terminal nomarchy-theme-update ;;
|
||||
*Process*) show_update_process_menu ;;
|
||||
*Hardware*) show_update_hardware_menu ;;
|
||||
*Firmware*) present_terminal nnomarchy-update-firmware ;;
|
||||
*Timezone*) present_terminal nnomarchy-tz-select ;;
|
||||
*Time*) present_terminal nnomarchy-update-time ;;
|
||||
*Firmware*) present_terminal nomarchy-update-firmware ;;
|
||||
*Timezone*) present_terminal nomarchy-tz-select ;;
|
||||
*Time*) present_terminal nomarchy-update-time ;;
|
||||
*Password*) show_update_password_menu ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
show_update_process_menu() {
|
||||
case $(menu "Restart" " Hypridle\n Hyprsunset\n Swayosd\n Walker\n Waybar") in
|
||||
*Hypridle*) nnomarchy-restart-hypridle ;;
|
||||
*Hyprsunset*) nnomarchy-restart-hyprsunset ;;
|
||||
*Swayosd*) nnomarchy-restart-swayosd ;;
|
||||
*Walker*) nnomarchy-restart-walker ;;
|
||||
*Waybar*) nnomarchy-restart-waybar ;;
|
||||
*Hypridle*) nomarchy-restart-hypridle ;;
|
||||
*Hyprsunset*) nomarchy-restart-hyprsunset ;;
|
||||
*Swayosd*) nomarchy-restart-swayosd ;;
|
||||
*Walker*) nomarchy-restart-walker ;;
|
||||
*Waybar*) nomarchy-restart-waybar ;;
|
||||
*) show_update_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -304,39 +304,39 @@ show_update_process_menu() {
|
||||
|
||||
show_update_hardware_menu() {
|
||||
case $(menu "Restart" " Audio\n Wi-Fi\n Bluetooth") in
|
||||
*Audio*) present_terminal nnomarchy-restart-pipewire ;;
|
||||
*Wi-Fi*) present_terminal nnomarchy-restart-wifi ;;
|
||||
*Bluetooth*) present_terminal nnomarchy-restart-bluetooth ;;
|
||||
*Audio*) present_terminal nomarchy-restart-pipewire ;;
|
||||
*Wi-Fi*) present_terminal nomarchy-restart-wifi ;;
|
||||
*Bluetooth*) present_terminal nomarchy-restart-bluetooth ;;
|
||||
*) show_update_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_update_password_menu() {
|
||||
case $(menu "Update Password" " Drive Encryption\n User") in
|
||||
*Drive*) present_terminal nnomarchy-drive-set-password ;;
|
||||
*Drive*) present_terminal nomarchy-drive-set-password ;;
|
||||
*User*) present_terminal passwd ;;
|
||||
*) show_update_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_about() {
|
||||
nnomarchy-launch-about
|
||||
nomarchy-launch-about
|
||||
}
|
||||
|
||||
show_system_menu() {
|
||||
local options=" Screensaver\n Lock"
|
||||
[[ $NNOMARCHY_TOGGLE_SUSPEND != "false" ]] && options="$options\n Suspend"
|
||||
nnomarchy-hibernation-available && options="$options\n Hibernate"
|
||||
nomarchy-hibernation-available && options="$options\n Hibernate"
|
||||
options="$options\n Logout\n Restart\n Shutdown"
|
||||
|
||||
case $(menu "System" "$options") in
|
||||
*Screensaver*) nnomarchy-launch-screensaver force ;;
|
||||
*Lock*) nnomarchy-lock-screen ;;
|
||||
*Screensaver*) nomarchy-launch-screensaver force ;;
|
||||
*Lock*) nomarchy-lock-screen ;;
|
||||
*Suspend*) systemctl suspend ;;
|
||||
*Hibernate*) systemctl hibernate ;;
|
||||
*Logout*) nnomarchy-system-logout ;;
|
||||
*Restart*) nnomarchy-system-reboot ;;
|
||||
*Shutdown*) nnomarchy-system-shutdown ;;
|
||||
*Logout*) nomarchy-system-logout ;;
|
||||
*Restart*) nomarchy-system-reboot ;;
|
||||
*Shutdown*) nomarchy-system-shutdown ;;
|
||||
*) back_to show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -366,7 +366,7 @@ go_to_menu() {
|
||||
}
|
||||
|
||||
# Allow user extensions and overrides
|
||||
USER_EXTENSIONS="$HOME/.config/nnomarchy/extensions/menu.sh"
|
||||
USER_EXTENSIONS="$HOME/.config/nomarchy/extensions/menu.sh"
|
||||
[[ -f $USER_EXTENSIONS ]] && source "$USER_EXTENSIONS"
|
||||
|
||||
toggle_existing_menu
|
||||
|
||||
Reference in New Issue
Block a user