diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-03-01 02:43:02 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-03-01 02:43:02 +0900 |
| commit | f72311190587d83ce58a525db3b7af1adcb2fc13 (patch) | |
| tree | ac7c5d4ff0d1f0615d0c854af9cd01eac3f311c1 | |
| parent | 7b8857c6c8021a350939187730af0f3fe1c4afe5 (diff) | |
Introduction of using a separate file for Default apps, terminals, file managers, search engines...
| -rw-r--r-- | config/hypr/UserConfigs/01-UserDefaults.conf | 18 | ||||
| -rw-r--r-- | config/hypr/configs/Keybinds.conf | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/Kool_Quick_Settings.sh (renamed from config/hypr/UserScripts/Kool_Quick_Settings.sh) | 12 | ||||
| -rwxr-xr-x | config/hypr/scripts/RofiSearch.sh | 23 | ||||
| -rwxr-xr-x | copy.sh | 3 |
5 files changed, 45 insertions, 13 deletions
diff --git a/config/hypr/UserConfigs/01-UserDefaults.conf b/config/hypr/UserConfigs/01-UserDefaults.conf new file mode 100644 index 00000000..fcd45b74 --- /dev/null +++ b/config/hypr/UserConfigs/01-UserDefaults.conf @@ -0,0 +1,18 @@ +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # + +# This is a file where you put your own default apps, default search Engine etc + +# Set your default editor here +#env = EDITOR,vim #default editor + +# Define preferred text editor for the KooL Quick Settings Menu (SUPER SHIFT E) +$edit=${EDITOR:-nano} + +# Terminal +$term = kitty + +# File Manager +$files = thunar + +# Default Search Engine +$Search_Engine = "https://www.google.com/search?q={}"
\ No newline at end of file diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 4ad8e7ca..9a754929 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -9,6 +9,8 @@ $scriptsDir = $HOME/.config/hypr/scripts $UserConfigs = $HOME/.config/hypr/UserConfigs $UserScripts = $HOME/.config/hypr/UserScripts +bind = $mainMod SHIFT, E, exec, $scriptsDir/Kool_Quick_Settings.sh # Settings Menu KooL Hyprland Settings + bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0 bind = $mainMod, Q, killactive, #kill bind = $mainMod SHIFT, Q, exec, $scriptsDir/KillActiveProcess.sh # Kill active process diff --git a/config/hypr/UserScripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index 7b41512e..a09bced6 100755 --- a/config/hypr/UserScripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -2,9 +2,13 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Rofi menu for KooL Hyprland Quick Settings (SUPER SHIFT E) -# Define preferred text editor and terminal -edit=${EDITOR:-nano} -tty=kitty +# Modify this config file for default terminal and EDITOR +config_file="$HOME/.config/hypr/UserConfigs/01-UserDefaults.conf" + +tmp_config_file=$(mktemp) +sed 's/^\$//g; s/ = /=/g' "$config_file" > "$tmp_config_file" +source "$tmp_config_file" +# ##################################### # # variables configs="$HOME/.config/hypr/configs" @@ -72,7 +76,7 @@ main() { # Open the selected file in the terminal with the text editor if [ -n "$file" ]; then - $tty -e $edit "$file" + $term -e $edit "$file" fi } diff --git a/config/hypr/scripts/RofiSearch.sh b/config/hypr/scripts/RofiSearch.sh index e256253a..e4b4f6af 100755 --- a/config/hypr/scripts/RofiSearch.sh +++ b/config/hypr/scripts/RofiSearch.sh @@ -1,18 +1,25 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# Modified Script for Google Search -# Original Submitted by https://github.com/LeventKaanOguz +# For Searching via web browsers -# Opens rofi in dmenu mod and waits for input. Then pushes the input to the query of the URL. +# Modify this config file for default search engine +config_file="$HOME/.config/hypr/UserConfigs/01-UserDefaults.conf" +tmp_config_file=$(mktemp) +sed 's/^\$//g; s/ = /=/g' "$config_file" > "$tmp_config_file" +source "$tmp_config_file" +# ##################################### # + +# Rofi theme and message rofi_theme="$HOME/.config/rofi/config-search.rasi" -msg='‼️ **note** ‼️ search via default web browser' +msg='‼️ **note** ‼️ search via default web browser' + # Kill Rofi if already running before execution if pgrep -x "rofi" >/dev/null; then pkill rofi - #exit 0 fi -# Open rofi with a dmenu and pass the selected item to xdg-open for Google search -#echo "" | rofi -dmenu -config "$rofi_config" | xargs -I{} xdg-open "https://www.google.com/search?q={}" +# Open Rofi and pass the selected query to xdg-open for Google search +echo "" | rofi -dmenu -config "$rofi_theme" -mesg "$msg" | xargs -I{} xdg-open $Search_Engine -echo "" | rofi -dmenu -config $rofi_theme -mesg "$msg" | xargs -I{} xdg-open "https://www.google.com/search?q={}" +# Clean up temporary file after sourcing +rm "$tmp_config_file"
\ No newline at end of file @@ -257,7 +257,7 @@ printf "\n%.0s" {1..1} # Function to modify the ENVariables.conf file update_editor() { local editor=$1 - sed -i "s/#env = EDITOR,.*/env = EDITOR,$editor #default editor/" config/hypr/UserConfigs/ENVariables.conf + sed -i "s/#env = EDITOR,.*/env = EDITOR,$editor #default editor/" config/hypr/UserConfigs/01-UserDefaults.conf echo "${OK} Default editor set to ${MAGENTA}$editor${RESET}." 2>&1 | tee -a "$LOG" } @@ -700,6 +700,7 @@ printf "\n%.0s" {1..1} # Restoring UserConfigs and UserScripts DIRH="hypr" FILES_TO_RESTORE=( + 01-UserDefaults.conf "ENVariables.conf" "LaptopDisplay.conf" "Laptops.conf" |
