From 9a69133dbb122f359dbce85b1141ec717a1c8847 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Thu, 23 Nov 2023 10:57:16 +0100 Subject: [PATCH] Add settings script --- hypr/conf/monitor.conf | 2 +- .../conf/{monitor => monitors}/1920x1080.conf | 0 .../{monitor => monitors}/2560x1440@120.conf | 0 hypr/conf/{monitor => monitors}/default.conf | 0 hypr/settings/settings.sh | 122 ++++++++++++++++++ 5 files changed, 123 insertions(+), 1 deletion(-) rename hypr/conf/{monitor => monitors}/1920x1080.conf (100%) rename hypr/conf/{monitor => monitors}/2560x1440@120.conf (100%) rename hypr/conf/{monitor => monitors}/default.conf (100%) create mode 100755 hypr/settings/settings.sh diff --git a/hypr/conf/monitor.conf b/hypr/conf/monitor.conf index 140404b..6be3934 100644 --- a/hypr/conf/monitor.conf +++ b/hypr/conf/monitor.conf @@ -1 +1 @@ -source = ~/dotfiles/hypr/conf/monitor/default.conf +source = ~/dotfiles/hypr/conf/monitors/default.conf diff --git a/hypr/conf/monitor/1920x1080.conf b/hypr/conf/monitors/1920x1080.conf similarity index 100% rename from hypr/conf/monitor/1920x1080.conf rename to hypr/conf/monitors/1920x1080.conf diff --git a/hypr/conf/monitor/2560x1440@120.conf b/hypr/conf/monitors/2560x1440@120.conf similarity index 100% rename from hypr/conf/monitor/2560x1440@120.conf rename to hypr/conf/monitors/2560x1440@120.conf diff --git a/hypr/conf/monitor/default.conf b/hypr/conf/monitors/default.conf similarity index 100% rename from hypr/conf/monitor/default.conf rename to hypr/conf/monitors/default.conf diff --git a/hypr/settings/settings.sh b/hypr/settings/settings.sh new file mode 100755 index 0000000..ba34b72 --- /dev/null +++ b/hypr/settings/settings.sh @@ -0,0 +1,122 @@ +#!/bin/sh +_settingsDecoration() { + clear +cat <<"EOF" + ____ _ _ +| _ \ ___ ___ ___ _ __ __ _| |_(_) ___ _ __ ___ +| | | |/ _ \/ __/ _ \| '__/ _` | __| |/ _ \| '_ \/ __| +| |_| | __/ (_| (_) | | | (_| | |_| | (_) | | | \__ \ +|____/ \___|\___\___/|_| \__,_|\__|_|\___/|_| |_|___/ + +EOF + cur=$(cat ~/dotfiles/hypr/conf/decoration.conf) + echo "In use: ${cur##*/}" + echo "" + echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):" + sel=$(gum file ~/dotfiles/hypr/conf/decorations/) + if [ ! -z $sel ] ;then + echo "source = $sel" > ~/dotfiles/hypr/conf/decoration.conf + _settingsDecoration + fi + _settingsMenu +} + +_settingsWindow() { + clear +cat <<"EOF" +__ ___ _ +\ \ / (_)_ __ __| | _____ _____ + \ \ /\ / /| | '_ \ / _` |/ _ \ \ /\ / / __| + \ V V / | | | | | (_| | (_) \ V V /\__ \ + \_/\_/ |_|_| |_|\__,_|\___/ \_/\_/ |___/ + +EOF + cur=$(cat ~/dotfiles/hypr/conf/window.conf) + echo "In use: ${cur##*/}" + echo "" + echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):" + sel=$(gum file ~/dotfiles/hypr/conf/windows/) + if [ ! -z $sel ] ;then + echo "source = $sel" > ~/dotfiles/hypr/conf/window.conf + _settingsWindow + fi + _settingsMenu +} + +_settingsAnimation() { + clear +cat <<"EOF" + _ _ _ _ + / \ _ __ (_)_ __ ___ __ _| |_(_) ___ _ __ ___ + / _ \ | '_ \| | '_ ` _ \ / _` | __| |/ _ \| '_ \/ __| + / ___ \| | | | | | | | | | (_| | |_| | (_) | | | \__ \ +/_/ \_\_| |_|_|_| |_| |_|\__,_|\__|_|\___/|_| |_|___/ + +EOF + cur=$(cat ~/dotfiles/hypr/conf/animation.conf) + echo "In use: ${cur##*/}" + echo "" + echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):" + sel=$(gum file ~/dotfiles/hypr/conf/animations/) + if [ ! -z $sel ] ;then + echo "source = $sel" > ~/dotfiles/hypr/conf/animation.conf + _settingsAnimation + fi + _settingsMenu +} + +_settingsMonitor() { + clear +cat <<"EOF" + __ __ _ _ +| \/ | ___ _ __ (_) |_ ___ _ __ +| |\/| |/ _ \| '_ \| | __/ _ \| '__| +| | | | (_) | | | | | || (_) | | +|_| |_|\___/|_| |_|_|\__\___/|_| + +EOF + cur=$(cat ~/dotfiles/hypr/conf/monitor.conf) + echo "In use: ${cur##*/}" + echo "" + echo "Select a file to load (RETURN = Confirm, ESC = Cancel/Back):" + sel=$(gum file ~/dotfiles/hypr/conf/monitors/) + if [ ! -z $sel ] ;then + echo "source = $sel" > ~/dotfiles/hypr/conf/monitor.conf + fi + _settingsMenu +} + +_settingsMenu() { + clear +cat <<"EOF" + ____ _ _ _ +/ ___| ___| |_| |_(_)_ __ __ _ ___ +\___ \ / _ \ __| __| | '_ \ / _` / __| + ___) | __/ |_| |_| | | | | (_| \__ \ +|____/ \___|\__|\__|_|_| |_|\__, |___/ + |___/ + +EOF + menu=$(gum choose "Decorations" "Windows" "Animations" "Monitors" "EXIT") + case $menu in + [Decorations]* ) + _settingsDecoration + break;; + [Windows]* ) + _settingsWindow + break;; + [Animations]* ) + _settingsAnimation + break;; + [Monitors]* ) + _settingsMonitor + break;; + * ) + exit + ;; + esac +} + +_settingsMenu + +