From 2b799906a35a19cbab059dcac85ccdf91b6e889c Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Sun, 10 Dec 2023 19:17:04 +0100 Subject: [PATCH] New custom settings in settings script --- hypr/conf/custom.conf | 9 +++++++++ hypr/settings/settings.sh | 38 ++++++++++++++++++++++++++++++++++---- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/hypr/conf/custom.conf b/hypr/conf/custom.conf index e69de29..95955ac 100644 --- a/hypr/conf/custom.conf +++ b/hypr/conf/custom.conf @@ -0,0 +1,9 @@ +# Add your additional Hyprland configurations here +# +# This is an additional key binding +# bind = $mainMod CTRL, up, workspace, empty +# +# Example for xwayland +# xwayland { +# force_zero_scaling = true +# } \ No newline at end of file diff --git a/hypr/settings/settings.sh b/hypr/settings/settings.sh index 5146430..ec27af0 100755 --- a/hypr/settings/settings.sh +++ b/hypr/settings/settings.sh @@ -1,4 +1,33 @@ #!/bin/bash + +_settingsCustom() { + clear +cat <<"EOF" + ____ _ + / ___| _ ___| |_ ___ _ __ ___ +| | | | | / __| __/ _ \| '_ ` _ \ +| |__| |_| \__ \ || (_) | | | | | | + \____\__,_|___/\__\___/|_| |_| |_| + +EOF + echo "Press ESC to proceed." + echo "" + filevalue=$(gum write --show-line-numbers --height 15 --width 70 --value="$(cat ~/dotfiles/hypr/conf/custom.conf)") + clear +cat <<"EOF" + ____ _ + / ___| _ ___| |_ ___ _ __ ___ +| | | | | / __| __/ _ \| '_ ` _ \ +| |__| |_| \__ \ || (_) | | | | | | + \____\__,_|___/\__\___/|_| |_| |_| + +EOF + if gum confirm "Do you want to save your changes into ~/dotfiles/hypr/conf/custom.conf?" ;then + echo "$filevalue" > ~/dotfiles/hypr/conf/custom.conf + fi + _settingsMenu +} + _settingsDecoration() { clear cat <<"EOF" @@ -177,7 +206,7 @@ EOF echo "Version: $(cat ~/dotfiles/version)" echo "" fi - menu=$(gum choose "Decorations" "Windows" "Animations" "Monitors" "Environments" "Keybindings" "Windowrules" "EXIT") + menu=$(gum choose "Decorations" "Windows" "Animations" "Monitors" "Environments" "Keybindings" "Windowrules" "Custom" "EXIT") case $menu in Decorations) _settingsDecoration @@ -200,12 +229,13 @@ EOF Windowrules) _settingsWindowrule break;; + Custom) + _settingsCustom + break;; * ) exit ;; esac } -_settingsMenu - - +_settingsMenu \ No newline at end of file