Lots of scripts
This commit is contained in:
@@ -57,11 +57,10 @@ open_in_editor() {
|
||||
}
|
||||
|
||||
show_trigger_menu() {
|
||||
case $(menu "Trigger" " Capture\n Share\n Toggle\n Hardware") in
|
||||
case $(menu "Trigger" " Capture\n Share\n Toggle") in
|
||||
*Capture*) show_capture_menu ;;
|
||||
*Share*) show_share_menu ;;
|
||||
*Toggle*) show_toggle_menu ;;
|
||||
*Hardware*) show_hardware_menu ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -120,200 +119,135 @@ show_screenrecord_menu() {
|
||||
esac
|
||||
}
|
||||
|
||||
# show_share_menu() {
|
||||
# case $(menu "Share" " Clipboard\n File \n Folder") in
|
||||
# *Clipboard*) station-cmd-share clipboard ;;
|
||||
# *File*) terminal bash -c "station-cmd-share file" ;;
|
||||
# *Folder*) terminal bash -c "station-cmd-share folder" ;;
|
||||
# *) back_to show_trigger_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# 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*) station-toggle-screensaver ;;
|
||||
# *Nightlight*) station-toggle-nightlight ;;
|
||||
# *Idle*) station-toggle-idle ;;
|
||||
# *Bar*) station-toggle-waybar ;;
|
||||
# *Layout*) station-hyprland-workspace-layout-toggle ;;
|
||||
# *Ratio*) station-hyprland-window-single-square-aspect-toggle ;;
|
||||
# *Gaps*) station-hyprland-window-gaps-toggle ;;
|
||||
# *Scaling*) station-hyprland-monitor-scaling-cycle ;;
|
||||
# *) back_to show_trigger_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_hardware_menu() {
|
||||
# case $(menu "Toggle" " Hybrid GPU") in
|
||||
# *"Hybrid GPU"*) present_terminal station-toggle-hybrid-gpu ;;
|
||||
# *) show_trigger_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_style_menu() {
|
||||
# case $(menu "Style" " Background\n Hyprland\n Screensaver") in
|
||||
# *Background*) show_background_menu ;;
|
||||
# *Hyprland*) open_in_editor ~/.config/hypr/looknfeel.conf ;;
|
||||
# *Screensaver*) open_in_editor ~/.config/station/branding/screensaver.txt ;;
|
||||
# *) show_main_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_background_menu() {
|
||||
# station-launch-walker -m menus:stationBackgroundSelector --width 800 --minheight 400
|
||||
# }
|
||||
#
|
||||
# show_setup_menu() {
|
||||
# local options=" Audio\n Wifi\n Bluetooth\n Power Profile\n System Sleep\n Monitors"
|
||||
# [[ -f ~/.config/hypr/bindings.conf ]] && options="$options\n Keybindings"
|
||||
# [[ -f ~/.config/hypr/input.conf ]] && options="$options\n Input"
|
||||
# options="$options\n DNS\n Security\n Config"
|
||||
#
|
||||
# case $(menu "Setup" "$options") in
|
||||
# *Audio*) station-launch-audio ;;
|
||||
# *Wifi*) station-launch-wifi ;;
|
||||
# *Bluetooth*) station-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 ;;
|
||||
# *DNS*) present_terminal station-setup-dns ;;
|
||||
# *Security*) show_setup_security_menu ;;
|
||||
# *Config*) show_setup_config_menu ;;
|
||||
# *) show_main_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_setup_power_menu() {
|
||||
# profile=$(menu "Power Profile" "$(station-powerprofiles-list)" "" "$(powerprofilesctl get)")
|
||||
#
|
||||
# if [[ $profile == "CNCLD" || -z $profile ]]; then
|
||||
# back_to show_setup_menu
|
||||
# else
|
||||
# powerprofilesctl set "$profile"
|
||||
# fi
|
||||
# }
|
||||
#
|
||||
# show_setup_security_menu() {
|
||||
# case $(menu "Setup" " Fingerprint\n Fido2") in
|
||||
# *Fingerprint*) present_terminal station-setup-fingerprint ;;
|
||||
# *Fido2*) present_terminal station-setup-fido2 ;;
|
||||
# *) show_setup_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# 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 && station-restart-hypridle ;;
|
||||
# *Hyprlock*) open_in_editor ~/.config/hypr/hyprlock.conf ;;
|
||||
# *Hyprsunset*) open_in_editor ~/.config/hypr/hyprsunset.conf && station-restart-hyprsunset ;;
|
||||
# *Swayosd*) open_in_editor ~/.config/swayosd/config.toml && station-restart-swayosd ;;
|
||||
# *Walker*) open_in_editor ~/.config/walker/config.toml && station-restart-walker ;;
|
||||
# *Waybar*) open_in_editor ~/.config/waybar/config.jsonc && station-restart-waybar ;;
|
||||
# *XCompose*) open_in_editor ~/.config/xcompose && station-restart-xcompose ;;
|
||||
# *) show_setup_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_setup_system_menu() {
|
||||
# local options=""
|
||||
#
|
||||
# if [[ -f ~/.local/state/station/toggles/suspend-off ]]; then
|
||||
# options="$options Enable Suspend"
|
||||
# else
|
||||
# options="$options Disable Suspend"
|
||||
# fi
|
||||
#
|
||||
# if station-hibernation-available; then
|
||||
# options="$options\n Disable Hibernate"
|
||||
# else
|
||||
# options="$options\n Enable Hibernate"
|
||||
# fi
|
||||
#
|
||||
# case $(menu "System" "$options") in
|
||||
# *Suspend*) station-toggle-suspend ;;
|
||||
# *"Enable Hibernate"*) present_terminal station-hibernation-setup ;;
|
||||
# *"Disable Hibernate"*) present_terminal station-hibernation-remove ;;
|
||||
# *) show_setup_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_update_menu() {
|
||||
# case $(menu "Update" " Config\n Process\n Hardware\n Firmware\n Password\n Timezone\n Time") in
|
||||
# *Config*) show_update_config_menu ;;
|
||||
# *Process*) show_update_process_menu ;;
|
||||
# *Hardware*) show_update_hardware_menu ;;
|
||||
# *Firmware*) present_terminal station-update-firmware ;;
|
||||
# *Timezone*) present_terminal station-tz-select ;;
|
||||
# *Time*) present_terminal station-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*) station-restart-hypridle ;;
|
||||
# *Hyprsunset*) station-restart-hyprsunset ;;
|
||||
# *Swayosd*) station-restart-swayosd ;;
|
||||
# *Walker*) station-restart-walker ;;
|
||||
# *Waybar*) station-restart-waybar ;;
|
||||
# *) show_update_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_update_config_menu() {
|
||||
# case $(menu "Use default config" " Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n Plymouth\n Swayosd\n Tmux\n Walker\n Waybar") in
|
||||
# *Hyprland*) present_terminal station-refresh-hyprland ;;
|
||||
# *Hypridle*) present_terminal station-refresh-hypridle ;;
|
||||
# *Hyprlock*) present_terminal station-refresh-hyprlock ;;
|
||||
# *Hyprsunset*) present_terminal station-refresh-hyprsunset ;;
|
||||
# *Plymouth*) present_terminal station-refresh-plymouth ;;
|
||||
# *Swayosd*) present_terminal station-refresh-swayosd ;;
|
||||
# *Tmux*) present_terminal station-refresh-tmux ;;
|
||||
# *Walker*) present_terminal station-refresh-walker ;;
|
||||
# *Waybar*) present_terminal station-refresh-waybar ;;
|
||||
# *) show_update_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_update_hardware_menu() {
|
||||
# case $(menu "Restart" " Audio\n Wi-Fi\n Bluetooth") in
|
||||
# *Audio*) present_terminal station-restart-pipewire ;;
|
||||
# *Wi-Fi*) present_terminal station-restart-wifi ;;
|
||||
# *Bluetooth*) present_terminal station-restart-bluetooth ;;
|
||||
# *) show_update_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_update_password_menu() {
|
||||
# case $(menu "Update Password" " Drive Encryption\n User") in
|
||||
# *Drive*) present_terminal station-drive-set-password ;;
|
||||
# *User*) present_terminal passwd ;;
|
||||
# *) show_update_menu ;;
|
||||
# esac
|
||||
# }
|
||||
#
|
||||
# show_system_menu() {
|
||||
# local options=" Screensaver\n Lock\n Suspend"
|
||||
# station-hibernation-available && options="$options\n Hibernate"
|
||||
# options="$options\n Logout\n Restart\n Shutdown"
|
||||
#
|
||||
# case $(menu "System" "$options") in
|
||||
# *Screensaver*) station-launch-screensaver force ;;
|
||||
# *Lock*) station-lock-screen ;;
|
||||
# *Suspend*) systemctl suspend ;;
|
||||
# *Hibernate*) systemctl hibernate ;;
|
||||
# *Logout*) station-system-logout ;;
|
||||
# *Restart*) station-system-reboot ;;
|
||||
# *Shutdown*) station-system-shutdown ;;
|
||||
# *) back_to show_main_menu ;;
|
||||
# esac
|
||||
# }
|
||||
show_share_menu() {
|
||||
case $(menu "Share" " Clipboard\n File \n Folder") in
|
||||
*Clipboard*) station-cmd-share clipboard ;;
|
||||
*File*) terminal bash -c "station-cmd-share file" ;;
|
||||
*Folder*) terminal bash -c "station-cmd-share folder" ;;
|
||||
*) back_to show_trigger_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
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*) station-toggle-screensaver ;;
|
||||
*Nightlight*) station-toggle-nightlight ;;
|
||||
*Idle*) station-toggle-idle ;;
|
||||
*Bar*) station-toggle-waybar ;;
|
||||
*Layout*) station-hyprland-workspace-layout-toggle ;;
|
||||
*Ratio*) station-hyprland-window-single-square-aspect-toggle ;;
|
||||
*Gaps*) station-hyprland-window-gaps-toggle ;;
|
||||
*Scaling*) station-hyprland-monitor-scaling-cycle ;;
|
||||
*) back_to show_trigger_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_background_menu() {
|
||||
station-launch-walker -m menus:stationBackgroundSelector --width 800 --minheight 400
|
||||
}
|
||||
|
||||
show_setup_menu() {
|
||||
local options=" Audio\n Wifi\n Bluetooth\n Power Profile\n Monitors"
|
||||
[[ -f ~/.config/hypr/bindings.conf ]] && options="$options\n Keybindings"
|
||||
[[ -f ~/.config/hypr/input.conf ]] && options="$options\n Input"
|
||||
options="$options\n Config"
|
||||
|
||||
case $(menu "Setup" "$options") in
|
||||
*Audio*) station-launch-audio ;;
|
||||
*Wifi*) station-launch-wifi ;;
|
||||
*Bluetooth*) station-launch-bluetooth ;;
|
||||
*Power*) show_setup_power_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 ;;
|
||||
*Config*) show_setup_config_menu ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_setup_power_menu() {
|
||||
profile=$(menu "Power Profile" "$(station-powerprofiles-list)" "" "$(powerprofilesctl get)")
|
||||
|
||||
if [[ $profile == "CNCLD" || -z $profile ]]; then
|
||||
back_to show_setup_menu
|
||||
else
|
||||
powerprofilesctl set "$profile"
|
||||
fi
|
||||
}
|
||||
|
||||
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 && station-restart-app hypridle ;;
|
||||
*Hyprlock*) open_in_editor ~/.config/hypr/hyprlock.conf ;;
|
||||
*Hyprsunset*) open_in_editor ~/.config/hypr/hyprsunset.conf && station-restart-app hyprsunset ;;
|
||||
*Swayosd*) open_in_editor ~/.config/swayosd/config.toml && station-restart-app swayosd-server ;;
|
||||
*Walker*) open_in_editor ~/.config/walker/config.toml && station-restart-walker ;;
|
||||
*Waybar*) open_in_editor ~/.config/waybar/config.jsonc && station-restart-app waybar ;;
|
||||
*XCompose*) open_in_editor ~/.config/xcompose && station-restart-app fcitx5 --disable notificationitem ;;
|
||||
*) show_setup_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_update_menu() {
|
||||
case $(menu "Update" " Station\n Process\n Hardware\n Firmware\n Password\n Timezone\n Time") in
|
||||
*Station*) present_terminal station-update-system ;;
|
||||
*Process*) show_update_process_menu ;;
|
||||
*Hardware*) show_update_hardware_menu ;;
|
||||
*Firmware*) present_terminal station-update-firmware ;;
|
||||
*Timezone*) present_terminal station-tz-select ;;
|
||||
*Time*) present_terminal station-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*) station-restart-app hypridle ;;
|
||||
*Hyprsunset*) station-restart-app hyprsunset ;;
|
||||
*Swayosd*) station-restart-app swayosd-server ;;
|
||||
*Walker*) station-restart-walker ;;
|
||||
*Waybar*) station-restart-app waybar ;;
|
||||
*) show_update_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_update_hardware_menu() {
|
||||
case $(menu "Restart" " Audio\n Wi-Fi\n Bluetooth") in
|
||||
*Audio*) present_terminal station-restart-pipewire ;;
|
||||
*Wi-Fi*) present_terminal station-restart-wifi ;;
|
||||
*Bluetooth*) present_terminal station-restart-bluetooth ;;
|
||||
*) show_update_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_update_password_menu() {
|
||||
case $(menu "Update Password" " Drive Encryption\n User") in
|
||||
*Drive*) present_terminal station-drive-set-password ;;
|
||||
*User*) present_terminal passwd ;;
|
||||
*) show_update_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_system_menu() {
|
||||
local options=" Screensaver\n Lock\n Suspend"
|
||||
station-hibernation-available && options="$options\n Hibernate"
|
||||
options="$options\n Logout\n Restart\n Shutdown"
|
||||
|
||||
case $(menu "System" "$options") in
|
||||
*Screensaver*) station-launch-screensaver force ;;
|
||||
*Lock*) station-lock-screen ;;
|
||||
*Suspend*) systemctl suspend ;;
|
||||
*Hibernate*) systemctl hibernate ;;
|
||||
*Logout*) station-system-logout ;;
|
||||
*Restart*) station-system-reboot ;;
|
||||
*Shutdown*) station-system-shutdown ;;
|
||||
*) back_to show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_main_menu() {
|
||||
go_to_menu "$(menu "Go" " Apps\n Trigger\n Setup\n Update\n About\n System")"
|
||||
@@ -323,16 +257,10 @@ go_to_menu() {
|
||||
case "${1,,}" in
|
||||
*apps*) walker -p "Launch…" ;;
|
||||
*trigger*) show_trigger_menu ;;
|
||||
# *toggle*) show_toggle_menu ;;
|
||||
# *share*) show_share_menu ;;
|
||||
# *background*) show_background_menu ;;
|
||||
# *capture*) show_capture_menu ;;
|
||||
# *theme*) show_theme_menu ;;
|
||||
# *screenrecord*) show_screenrecord_menu ;;
|
||||
# *setup*) show_setup_menu ;;
|
||||
# *power*) show_setup_power_menu ;;
|
||||
# *update*) show_update_menu ;;
|
||||
# *system*) show_system_menu ;;
|
||||
*background*) show_background_menu ;;
|
||||
*setup*) show_setup_menu ;;
|
||||
*update*) show_update_menu ;;
|
||||
*system*) show_system_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user