From d404c8b6b94d973334a1136223fbf5c412083bdb Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 10 Feb 2025 01:16:17 +0900 Subject: Initial upload of various rofi themes --- config/hypr/UserConfigs/UserKeybinds.conf | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config/hypr/UserConfigs/UserKeybinds.conf') diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index 3975f60f..ebcd2e6d 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -23,6 +23,8 @@ bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview' bind = $mainMod, Return, exec, $term #terminal bind = $mainMod, T, exec, $files #file manager +bind = $mainMod CTRL, R, exec, $scriptsDir/RofiThemeSelector.sh # modified Rofi Theme Selector + bind = $mainMod ALT, C, exec, $UserScripts/RofiCalc.sh # calculator (qalculate) # pyprland -- cgit v1.2.3 From 34ec8fe040c036b4c6f5d426a7bad66ebddfc8f2 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 12 Feb 2025 00:54:00 +0900 Subject: Updated New rofi themes --- assets/rofi/themes/KooL_style-1.rasi | 2 +- assets/rofi/themes/KooL_style-10-Fancy.rasi | 12 +++++------ .../themes/KooL_style-11-Win11-list-light.rasi | 2 +- assets/rofi/themes/KooL_style-2-Dark.rasi | 8 ++++---- assets/rofi/themes/KooL_style-2-Light.rasi | 6 +++--- assets/rofi/themes/KooL_style-3-FullScreen-v1.rasi | 2 +- assets/rofi/themes/KooL_style-3-Fullscreen-v2.rasi | 2 +- assets/rofi/themes/KooL_style-4.rasi | 6 +++--- assets/rofi/themes/KooL_style-5.rasi | 4 ++-- assets/rofi/themes/KooL_style-6.rasi | 3 +-- assets/rofi/themes/KooL_style-8.rasi | 23 +++++++++++++-------- assets/rofi/themes/KooL_style-9.rasi | 22 +++++++++++++++++++- config/hypr/UserConfigs/UserKeybinds.conf | 12 +++++------ config/hypr/UserScripts/00-Readme | 0 config/hypr/UserScripts/RofiCalc.sh | 2 +- config/hypr/configs/Keybinds.conf | 24 ++++++++++++++-------- config/rofi/config-calc.rasi | 1 + config/rofi/config-search.rasi | 4 +--- 18 files changed, 81 insertions(+), 54 deletions(-) mode change 100755 => 100644 config/hypr/UserScripts/00-Readme (limited to 'config/hypr/UserConfigs/UserKeybinds.conf') diff --git a/assets/rofi/themes/KooL_style-1.rasi b/assets/rofi/themes/KooL_style-1.rasi index 786e5b2f..556c86a1 100644 --- a/assets/rofi/themes/KooL_style-1.rasi +++ b/assets/rofi/themes/KooL_style-1.rasi @@ -213,7 +213,7 @@ element-icon { cursor: inherit; } element-text { - font: "JetBrainsMono Nerd Font SemiBold 11"; + font: "JetBrainsMono Nerd Font SemiBold 12"; background-color: transparent; text-color: inherit; cursor: inherit; diff --git a/assets/rofi/themes/KooL_style-10-Fancy.rasi b/assets/rofi/themes/KooL_style-10-Fancy.rasi index 80203b6f..8da2e0e7 100644 --- a/assets/rofi/themes/KooL_style-10-Fancy.rasi +++ b/assets/rofi/themes/KooL_style-10-Fancy.rasi @@ -66,7 +66,6 @@ window { children: [ inputbar, message, wrapper-mode-switcher, listview , pagerbox ]; } - pagerbox { expand: false; orientation: horizontal; @@ -229,6 +228,7 @@ sidebar { inputbar { text-color: @normal-foreground; padding: 0px 0px 0.5em; + children: [ wrapper ]; } case-indicator { text-color: @normal-foreground; @@ -237,9 +237,8 @@ case-indicator { wrapper { orientation: horizontal; text-color: black; - background-color: white / 70%; + background-color: white / 75%; border-color: grey; - border: 2px; border-radius: 5px; padding: 4px; @@ -270,12 +269,13 @@ icon-k { entry { enabled: true; expand: true; + background-color: white / 75%; placeholder: " 🖥️ Search "; vertical-align: 0.5; + border-radius: 5px; + padding: 4px; } -inputbar { - children: [ wrapper ]; -} + error-message { background-color: darkred/10%; diff --git a/assets/rofi/themes/KooL_style-11-Win11-list-light.rasi b/assets/rofi/themes/KooL_style-11-Win11-list-light.rasi index 65809c4d..75da3b6e 100644 --- a/assets/rofi/themes/KooL_style-11-Win11-list-light.rasi +++ b/assets/rofi/themes/KooL_style-11-Win11-list-light.rasi @@ -12,8 +12,8 @@ configuration { me-select-entry: "MouseSecondary"; me-accept-entry: "MousePrimary"; } - /*****----- Global Properties -----*****/ + * { font: "JetBrainsMono Nerd Font SemiBold 13"; diff --git a/assets/rofi/themes/KooL_style-2-Dark.rasi b/assets/rofi/themes/KooL_style-2-Dark.rasi index 934ea657..de16d833 100644 --- a/assets/rofi/themes/KooL_style-2-Dark.rasi +++ b/assets/rofi/themes/KooL_style-2-Dark.rasi @@ -64,14 +64,14 @@ inputbar { border: 0px 0px 2px 0px; border-radius: 0px; border-color: gray/20%; - background-color: transparent; + background-color: black/50%; children: [ "entry" ]; } entry { enabled: true; - background-color: transparent; - text-color: dimgray; + background-color: black/50%; + text-color: white/75%; cursor: text; placeholder: "Type to search"; placeholder-color: inherit; @@ -148,7 +148,7 @@ mode-switcher{ text-color: white; } button { - font: "JetBrainsMono Nerd Font SemiBold 10"; + font: "JetBrainsMono Nerd Font SemiBold 12"; padding: 6px; border: 0px solid; border-radius: 100%; diff --git a/assets/rofi/themes/KooL_style-2-Light.rasi b/assets/rofi/themes/KooL_style-2-Light.rasi index 3cd9266d..74eb8e32 100644 --- a/assets/rofi/themes/KooL_style-2-Light.rasi +++ b/assets/rofi/themes/KooL_style-2-Light.rasi @@ -41,7 +41,7 @@ window { padding: 0px; border-radius: 12px; cursor: "default"; - background-color: transparent; + background-color: inherit; } /*****----- Main Box -----*****/ @@ -60,7 +60,7 @@ inputbar { enabled: true; spacing: 0px; margin: 0px; - padding: 0px 0px 10px 0px; + padding: 0px 10px 10px 0px; border: 0px 0px 2px 0px; border-radius: 0px; border-color: gray/20%; @@ -70,7 +70,7 @@ inputbar { entry { enabled: true; - background-color: transparent; + background-color: inherit; text-color: black; cursor: text; placeholder: "Type to search"; diff --git a/assets/rofi/themes/KooL_style-3-FullScreen-v1.rasi b/assets/rofi/themes/KooL_style-3-FullScreen-v1.rasi index 7ca3d4bf..d9b31251 100644 --- a/assets/rofi/themes/KooL_style-3-FullScreen-v1.rasi +++ b/assets/rofi/themes/KooL_style-3-FullScreen-v1.rasi @@ -1,5 +1,5 @@ /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ -/* KooL Hyprland v2.3.10 (latest) - Default Config */ +/* KooL Hyprland Full Screen Style 3 v1 */ /* ---- Configuration ---- */ diff --git a/assets/rofi/themes/KooL_style-3-Fullscreen-v2.rasi b/assets/rofi/themes/KooL_style-3-Fullscreen-v2.rasi index 6f1a3cef..7584b542 100644 --- a/assets/rofi/themes/KooL_style-3-Fullscreen-v2.rasi +++ b/assets/rofi/themes/KooL_style-3-Fullscreen-v2.rasi @@ -1,5 +1,5 @@ /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ - +/* KooL Hyprland Rofi Style 3 - Full screen v2 */ /* credit: https://github.com/adi1090x/rofi */ /*****----- Configuration -----*****/ diff --git a/assets/rofi/themes/KooL_style-4.rasi b/assets/rofi/themes/KooL_style-4.rasi index fb25db61..7f4f0d4e 100644 --- a/assets/rofi/themes/KooL_style-4.rasi +++ b/assets/rofi/themes/KooL_style-4.rasi @@ -1,5 +1,5 @@ /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ - +/* KooL Hyprland Rofi Style 4 */ /* credit: https://github.com/adi1090x/rofi */ /*****----- Configuration -----*****/ @@ -89,7 +89,7 @@ mainbox { border: 0px solid; border-radius: 0px 0px 0px 0px; border-color: @border-color; - background-color: transparent; + background-color: inherit; children: [ "inputbar", "message", "custombox" ]; } @@ -132,7 +132,7 @@ textbox-prompt-colon { entry { enabled: true; padding: 5px 0px; - background-color: inherit; + background-color: @alternate-background; text-color: @foreground; cursor: text; placeholder: "Search..."; diff --git a/assets/rofi/themes/KooL_style-5.rasi b/assets/rofi/themes/KooL_style-5.rasi index 234567bc..bb70d0f8 100644 --- a/assets/rofi/themes/KooL_style-5.rasi +++ b/assets/rofi/themes/KooL_style-5.rasi @@ -118,7 +118,7 @@ entry { cursor: text; placeholder: " Search"; placeholder-color: inherit; - background-color: transparent; + background-color: @background; } /* ---- Mode Switcher ---- */ @@ -230,7 +230,7 @@ element-icon { } element-text { - font: "JetBrainsMono Nerd Font SemiBold 10"; + font: "JetBrainsMono Nerd Font SemiBold 12"; background-color: transparent; text-color: @foreground; cursor: inherit; diff --git a/assets/rofi/themes/KooL_style-6.rasi b/assets/rofi/themes/KooL_style-6.rasi index f6b1307b..30028218 100644 --- a/assets/rofi/themes/KooL_style-6.rasi +++ b/assets/rofi/themes/KooL_style-6.rasi @@ -1,5 +1,5 @@ /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ -/* KooL Hyprland v2.2.10 (old) - Default Config */ +/* KooL Hyprland Rofi Style 6 */ /* ---- Configuration ---- */ @@ -199,7 +199,6 @@ element-icon { } element-text { background-color: transparent; - font: "Fira Code SemiBold 12"; text-color: inherit; cursor: inherit; vertical-align: 0.5; diff --git a/assets/rofi/themes/KooL_style-8.rasi b/assets/rofi/themes/KooL_style-8.rasi index 00e5c9cf..b74f801f 100644 --- a/assets/rofi/themes/KooL_style-8.rasi +++ b/assets/rofi/themes/KooL_style-8.rasi @@ -218,16 +218,21 @@ element-text { } /* ---- Message ---- */ -error-message { - text-color: @foreground; - background-color: @background; - text-transform: capitalize; - children: [ "textbox" ]; +message { + background-color: transparent; + border: 0px; } - textbox { - text-color: inherit; - background-color: inherit; + padding: 12px; + border-radius: 10px; + background-color: @background; + text-color: @foreground; vertical-align: 0.5; - horizontal-align: 0.5; + horizontal-align: 0.0; +} +error-message { + padding: 12px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; } diff --git a/assets/rofi/themes/KooL_style-9.rasi b/assets/rofi/themes/KooL_style-9.rasi index d09e58e2..a74e64eb 100644 --- a/assets/rofi/themes/KooL_style-9.rasi +++ b/assets/rofi/themes/KooL_style-9.rasi @@ -132,7 +132,7 @@ scrollbar { /* ---- Elements ---- */ element { - font: "JetBrainsMono Nerd Font SemiBold 11"; + font: "JetBrainsMono Nerd Font SemiBold 12"; background-color: @BG; text-color: @FG; orientation: horizontal; @@ -188,3 +188,23 @@ element selected.active { background-color: @BGA; color: @FG; } + +/* ---- Message ---- */ +message { + background-color: transparent; + border: 0px; +} +textbox { + padding: 12px; + border-radius: 10px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} +error-message { + padding: 12px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} \ No newline at end of file diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index ebcd2e6d..a615ef68 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -13,21 +13,19 @@ $UserScripts = $HOME/.config/hypr/UserScripts # rofi App launcher #bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Super Key to Launch rofi menu -bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window #Main Menu +bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Main Menu (APP Launcher) -bind = $mainMod CTRL, F, fullscreen, 1 # fake full screen +bind = $mainMod, B, exec, xdg-open "http:// &" # default browser -# ags overview -bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview' +bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview' # ags desktop overview bind = $mainMod, Return, exec, $term #terminal -bind = $mainMod, T, exec, $files #file manager +bind = $mainMod, E, exec, $files #file manager bind = $mainMod CTRL, R, exec, $scriptsDir/RofiThemeSelector.sh # modified Rofi Theme Selector - bind = $mainMod ALT, C, exec, $UserScripts/RofiCalc.sh # calculator (qalculate) -# pyprland +# pyprland (This is not available in Debian and Ubuntu) bind = $mainMod SHIFT, Return, exec, pypr toggle term # Dropdown terminal bind = $mainMod, Z, exec, pypr zoom # Toggle Desktop Zoom diff --git a/config/hypr/UserScripts/00-Readme b/config/hypr/UserScripts/00-Readme old mode 100755 new mode 100644 diff --git a/config/hypr/UserScripts/RofiCalc.sh b/config/hypr/UserScripts/RofiCalc.sh index 7bef4b6c..4b3b8b69 100755 --- a/config/hypr/UserScripts/RofiCalc.sh +++ b/config/hypr/UserScripts/RofiCalc.sh @@ -16,7 +16,7 @@ while true; do result=$( rofi -i -dmenu \ -config $rofi_theme \ - -mesg "$result = $calc_result" + -mesg "$result = $calc_result" ) if [ $? -ne 0 ]; then diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 2ea3bfa3..7cacae40 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -10,12 +10,18 @@ $configs = $HOME/.config/hypr/configs $UserConfigs = $HOME/.config/hypr/UserConfigs $UserScripts = $HOME/.config/hypr/UserScripts + bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0 -bind = $mainMod, Q, killactive, -bind = $mainMod, F, fullscreen -bind = $mainMod SHIFT, Q, exec, $scriptsDir/KillActiveProcess.sh -bind = $mainMod SHIFT, F, togglefloating, -bind = $mainMod ALT, F, exec, hyprctl dispatch workspaceopt allfloat +bind = $mainMod, Q, killactive, #kill +bind = $mainMod SHIFT, Q, exec, $scriptsDir/KillActiveProcess.sh # Kill active process +bind = $mainMod SHIFT, F, fullscreen # whole full screen +bind = $mainMod CTRL, F, fullscreen, 1 # fake full screen +bind = $mainMod, SPACE, togglefloating, #Float Mode +bind = $mainMod ALT, SPACE, exec, hyprctl dispatch workspaceopt allfloat #All Float Mode + +#bind = $mainMod, SPACE, exec, $scriptsDir/Float.sh # float mode +#bind = $mainMod ALT, SPACE, exec, $scriptsDir/Float.sh --allfloat # all float mode + bind = CTRL ALT, L, exec, $scriptsDir/LockScreen.sh # screen lock bind = CTRL ALT, P, exec, $scriptsDir/Wlogout.sh # power menu @@ -24,24 +30,24 @@ bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh # help file bind = $mainMod ALT, R, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, rofi bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh # emoji menu bind = $mainMod, S, exec, $scriptsDir/RofiSearch.sh # Google search using rofi -bind = $mainMod SHIFT, B, exec, $scriptsDir/ChangeBlur.sh # Toggle blur settings +bind = $mainMod ALT, O, exec, $scriptsDir/ChangeBlur.sh # Toggle blur settings bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # Toggle animations ON/OFF bind = $mainMod ALT, L, exec, $scriptsDir/ChangeLayout.sh # Toggle Master or Dwindle Layout bind = $mainMod ALT, V, exec, $scriptsDir/ClipManager.sh # Clipboard Manager bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC notification panel # FEATURES / EXTRAS (UserScripts) -bind = $mainMod, E, exec, $UserScripts/QuickEdit.sh # Quick Edit Hyprland Settings +bind = $mainMod SHIFT, E, exec, $UserScripts/QuickEdit.sh # Quick Edit Hyprland Settings bind = $mainMod SHIFT, M, exec, $UserScripts/RofiBeats.sh # online music using rofi bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to apply bind = $mainMod SHIFT, W, exec, $UserScripts/WallpaperEffects.sh # Wallpaper Effects by imagemagick bind = CTRL ALT, W, exec, $UserScripts/WallpaperRandom.sh # Random wallpapers -bind = $mainMod ALT, O, exec, hyprctl setprop active opaque toggle # disable opacity on active window +bind = $mainMod CTRL, O, exec, hyprctl setprop active opaque toggle # disable opacity on active window bind = $mainMod SHIFT, K, exec, $scriptsDir/KeyBinds.sh # search keybinds via rofi bind = $mainMod SHIFT, A, exec, $scriptsDir/Animations.sh #hyprland animations menu # Waybar / Bar related -bind = $mainMod, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show waybar +bind = $mainMod CTRL ALT, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show waybar bind = $mainMod CTRL, B, exec, $scriptsDir/WaybarStyles.sh # Waybar Styles Menu bind = $mainMod ALT, B, exec, $scriptsDir/WaybarLayout.sh # Waybar Layout Menu diff --git a/config/rofi/config-calc.rasi b/config/rofi/config-calc.rasi index 61be7642..60169c31 100644 --- a/config/rofi/config-calc.rasi +++ b/config/rofi/config-calc.rasi @@ -7,6 +7,7 @@ /* ---- Mainbox ---- */ mainbox { children: [ "entry", "message" ]; + height: inherit; } diff --git a/config/rofi/config-search.rasi b/config/rofi/config-search.rasi index 08600b30..a2ff66ee 100644 --- a/config/rofi/config-search.rasi +++ b/config/rofi/config-search.rasi @@ -7,13 +7,11 @@ window { width: 40%; height: inherit; - background-color: black/25%; y-offset: 10px; location: north; children: [ "entry" ]; border: 2px; border-color: white/25%; - border-radius: 20px; } /* ---- Entry ---- */ @@ -21,5 +19,5 @@ entry { placeholder: " 🔎 Google Search via web browser"; padding: 15px; border: 0px; - text-color: white; + border-radius: 12px; } -- cgit v1.2.3 From d48e1e15a05e220306c81279abe86263aa5aeb85 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Thu, 13 Feb 2025 13:38:06 +0900 Subject: most of the added features and keybinds are moved to User Keybinds. Giving more flexibility for users --- config/hypr/UserConfigs/UserKeybinds.conf | 47 ++++++++++++++++++++++++------- config/hypr/UserConfigs/WindowRules.conf | 4 +++ config/hypr/configs/Keybinds.conf | 45 ++++------------------------- 3 files changed, 46 insertions(+), 50 deletions(-) (limited to 'config/hypr/UserConfigs/UserKeybinds.conf') diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index a615ef68..feb54c22 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -5,33 +5,60 @@ # See https://wiki.hyprland.org/Configuring/Keywords/ for more settings and variables # See also Laptops.conf for laptops keybinds +# /* ---- ✴️ Variables ✴️ ---- */ # $mainMod = SUPER $files = thunar $term = kitty $scriptsDir = $HOME/.config/hypr/scripts $UserScripts = $HOME/.config/hypr/UserScripts -# rofi App launcher +# common shortcuts #bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Super Key to Launch rofi menu bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Main Menu (APP Launcher) - -bind = $mainMod, B, exec, xdg-open "http:// &" # default browser - -bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview' # ags desktop overview - +bind = $mainMod, B, exec, xdg-open "http:// &" # default browser +bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview' # desktop overview (if installed) bind = $mainMod, Return, exec, $term #terminal bind = $mainMod, E, exec, $files #file manager + +# FEATURES / EXTRAS +bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh # help / cheat sheet +bind = $mainMod ALT, R, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, rofi +bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh # emoji menu +bind = $mainMod, S, exec, $scriptsDir/RofiSearch.sh # Google search using rofi +bind = $mainMod ALT, O, exec, $scriptsDir/ChangeBlur.sh # Toggle blur settings +bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # Toggle animations ON/OFF +bind = $mainMod ALT, L, exec, $scriptsDir/ChangeLayout.sh # Toggle Master or Dwindle Layout +bind = $mainMod ALT, V, exec, $scriptsDir/ClipManager.sh # Clipboard Manager bind = $mainMod CTRL, R, exec, $scriptsDir/RofiThemeSelector.sh # modified Rofi Theme Selector + +bind = $mainMod SHIFT, F, fullscreen # whole full screen +bind = $mainMod CTRL, F, fullscreen, 1 # fake full screen +bind = $mainMod, SPACE, togglefloating, #Float Mode +bind = $mainMod ALT, SPACE, exec, hyprctl dispatch workspaceopt allfloat #All Float Mode + +# Waybar / Bar related +bind = $mainMod CTRL ALT, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show waybar +bind = $mainMod CTRL, B, exec, $scriptsDir/WaybarStyles.sh # Waybar Styles Menu +bind = $mainMod ALT, B, exec, $scriptsDir/WaybarLayout.sh # Waybar Layout Menu + +# FEATURES / EXTRAS (UserScripts) +bind = $mainMod SHIFT, E, exec, $UserScripts/QuickEdit.sh # Quick Edit Hyprland Settings +bind = $mainMod SHIFT, M, exec, $UserScripts/RofiBeats.sh # online music using rofi +bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to apply +bind = $mainMod SHIFT, W, exec, $UserScripts/WallpaperEffects.sh # Wallpaper Effects by imagemagick +bind = CTRL ALT, W, exec, $UserScripts/WallpaperRandom.sh # Random wallpapers +bind = $mainMod CTRL, O, exec, hyprctl setprop active opaque toggle # disable opacity on active window +bind = $mainMod SHIFT, K, exec, $scriptsDir/KeyBinds.sh # search keybinds via rofi +bind = $mainMod SHIFT, A, exec, $scriptsDir/Animations.sh #hyprland animations menu +bind = $mainMod SHIFT, O, exec, $UserScripts/ZshChangeTheme.sh # Change oh-my-zsh theme +bindn = ALT_L, SHIFT_L, exec, $scriptsDir/SwitchKeyboardLayout.sh # Change keyboard layout bind = $mainMod ALT, C, exec, $UserScripts/RofiCalc.sh # calculator (qalculate) # pyprland (This is not available in Debian and Ubuntu) -bind = $mainMod SHIFT, Return, exec, pypr toggle term # Dropdown terminal +bind = $mainMod SHIFT, Return, exec, pypr toggle term # Dropdown terminal not avail Debian and Ubuntu bind = $mainMod, Z, exec, pypr zoom # Toggle Desktop Zoom -# User Added Keybinds -bind = $mainMod SHIFT, O, exec, $UserScripts/ZshChangeTheme.sh # Change oh-my-zsh theme -bindn = ALT_L, SHIFT_L, exec, $scriptsDir/SwitchKeyboardLayout.sh # Change keyboard layout # For passthrough keyboard into a VM # bind = $mainMod ALT, P, submap, passthru diff --git a/config/hypr/UserConfigs/WindowRules.conf b/config/hypr/UserConfigs/WindowRules.conf index f4729d32..96f1adf4 100644 --- a/config/hypr/UserConfigs/WindowRules.conf +++ b/config/hypr/UserConfigs/WindowRules.conf @@ -11,6 +11,7 @@ windowrulev2 = tag +browser, class:^([Mm]icrosoft-edge(-stable|-beta|-dev|-unsta windowrulev2 = tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$ windowrulev2 = tag +browser, class:^([Tt]horium-browser|[Cc]achy-browser)$ windowrulev2 = tag +browser, class:^(zen-alpha)$ +windowrulev2 = tag +notif, class:^(swaync-control-center|swaync-notification-window|swaync-client|class)$ # terminal tags windowrulev2 = tag +terminal, class:^(Alacritty|kitty|kitty-dropterm)$ @@ -176,6 +177,9 @@ windowrulev2 = fullscreen, tag:games* # LAYER RULES layerrule = blur, rofi layerrule = ignorezero, rofi +layerrule = blur, notifications +layerrule = ignorezero, notifications +#layerrule = ignorealpha 0.5, tag:notif* #layerrule = ignorezero, class:^([Rr]ofi)$ #layerrule = blur, class:^([Rr]ofi)$ diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 7cacae40..d4205abf 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -2,59 +2,20 @@ # Default Keybinds # visit https://wiki.hyprland.org/Configuring/Binds/ for more info +# /* ---- ✴️ Variables ✴️ ---- */ # $mainMod = SUPER # Default $scriptsDir = $HOME/.config/hypr/scripts -$configs = $HOME/.config/hypr/configs -# User $UserConfigs = $HOME/.config/hypr/UserConfigs $UserScripts = $HOME/.config/hypr/UserScripts - 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 -bind = $mainMod SHIFT, F, fullscreen # whole full screen -bind = $mainMod CTRL, F, fullscreen, 1 # fake full screen -bind = $mainMod, SPACE, togglefloating, #Float Mode -bind = $mainMod ALT, SPACE, exec, hyprctl dispatch workspaceopt allfloat #All Float Mode - -#bind = $mainMod, SPACE, exec, $scriptsDir/Float.sh # float mode -#bind = $mainMod ALT, SPACE, exec, $scriptsDir/Float.sh --allfloat # all float mode - bind = CTRL ALT, L, exec, $scriptsDir/LockScreen.sh # screen lock bind = CTRL ALT, P, exec, $scriptsDir/Wlogout.sh # power menu - -# FEATURES / EXTRAS -bind = $mainMod, H, exec, $scriptsDir/KeyHints.sh # help file -bind = $mainMod ALT, R, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, rofi -bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh # emoji menu -bind = $mainMod, S, exec, $scriptsDir/RofiSearch.sh # Google search using rofi -bind = $mainMod ALT, O, exec, $scriptsDir/ChangeBlur.sh # Toggle blur settings -bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # Toggle animations ON/OFF -bind = $mainMod ALT, L, exec, $scriptsDir/ChangeLayout.sh # Toggle Master or Dwindle Layout -bind = $mainMod ALT, V, exec, $scriptsDir/ClipManager.sh # Clipboard Manager bind = $mainMod SHIFT, N, exec, swaync-client -t -sw # swayNC notification panel -# FEATURES / EXTRAS (UserScripts) -bind = $mainMod SHIFT, E, exec, $UserScripts/QuickEdit.sh # Quick Edit Hyprland Settings -bind = $mainMod SHIFT, M, exec, $UserScripts/RofiBeats.sh # online music using rofi -bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to apply -bind = $mainMod SHIFT, W, exec, $UserScripts/WallpaperEffects.sh # Wallpaper Effects by imagemagick -bind = CTRL ALT, W, exec, $UserScripts/WallpaperRandom.sh # Random wallpapers -bind = $mainMod CTRL, O, exec, hyprctl setprop active opaque toggle # disable opacity on active window -bind = $mainMod SHIFT, K, exec, $scriptsDir/KeyBinds.sh # search keybinds via rofi -bind = $mainMod SHIFT, A, exec, $scriptsDir/Animations.sh #hyprland animations menu - -# Waybar / Bar related -bind = $mainMod CTRL ALT, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show waybar -bind = $mainMod CTRL, B, exec, $scriptsDir/WaybarStyles.sh # Waybar Styles Menu -bind = $mainMod ALT, B, exec, $scriptsDir/WaybarLayout.sh # Waybar Layout Menu - -# Dwindle Layout -bind = $mainMod SHIFT, I, togglesplit # only works on dwindle layout -bind = $mainMod, P, pseudo, # dwindle - # Master Layout bind = $mainMod CTRL, D, layoutmsg, removemaster bind = $mainMod, I, layoutmsg, addmaster @@ -62,6 +23,10 @@ bind = $mainMod, J, layoutmsg, cyclenext bind = $mainMod, K, layoutmsg, cycleprev bind = $mainMod CTRL, Return, layoutmsg, swapwithmaster +# Dwindle Layout +bind = $mainMod SHIFT, I, togglesplit # only works on dwindle layout +bind = $mainMod, P, pseudo, # dwindle + # Works on either layout (Master or Dwindle) bind = $mainMod, M, exec, hyprctl dispatch splitratio 0.3 -- cgit v1.2.3 From b5dc4f9991df5ef5f5e8c4e191a863d8aeb4cdaf Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sat, 15 Feb 2025 00:42:41 +0900 Subject: updated rofi configs. Added CTRL SHIFT R to launch modified rofi-theme-selector --- assets/rofi/themes/KooL_style-10-Fancy-v2.rasi | 166 +++++++++++++++ .../themes/KooL_style-11-Win11-list-light.rasi | 15 +- assets/rofi/themes/KooL_style-12-TOP-Docu.rasi | 149 ++++++++++++++ assets/rofi/themes/KooL_style-2-Dark.rasi | 10 +- assets/rofi/themes/KooL_style-2-Light.rasi | 8 +- config/hypr/UserConfigs/UserKeybinds.conf | 1 + config/hypr/scripts/RofiThemeSelector-modified.sh | 226 +++++++++++++++++++++ 7 files changed, 562 insertions(+), 13 deletions(-) create mode 100644 assets/rofi/themes/KooL_style-10-Fancy-v2.rasi create mode 100644 assets/rofi/themes/KooL_style-12-TOP-Docu.rasi create mode 100755 config/hypr/scripts/RofiThemeSelector-modified.sh (limited to 'config/hypr/UserConfigs/UserKeybinds.conf') diff --git a/assets/rofi/themes/KooL_style-10-Fancy-v2.rasi b/assets/rofi/themes/KooL_style-10-Fancy-v2.rasi new file mode 100644 index 00000000..845cc5f2 --- /dev/null +++ b/assets/rofi/themes/KooL_style-10-Fancy-v2.rasi @@ -0,0 +1,166 @@ +/** + * Edited by: Dave Davenport + * User: Rasi + * Copyright: Rasmus Steinke + */ + +/* global settings and color variables */ +* { + blue: #A7c6E2; + blue-trans: #A7c6e2aa; + darkblue: #005F87; + green: #00330088; + black: #000000; + grey: #444444; + orange: #FFD391; + dark-orange: #FFA664; + light-grey: #F5F5F5; + medium-grey: #D0D0D0; + dark-grey: #002B36; + urgent: #D75F00; + active: #005F87; + transparent: #000000aa; + spacing: 0em; + padding: 0px; + background-color: white; + line-style: "none"; +} + +prompt-box { + background-color : transparent; +} + +prompt { + background-color : transparent; + text-color : white; +} + +window { + border : 2px; + border-radius : 12px; + border-color : black; + background-color : transparent; + color : @grey; +} +mainbox { + background-color : @blue-trans; + color : @grey; + spacing : 0%; +} + +listview { + // Looks. + border-radius : 10px; + border : 5px; + padding : 20px; + margin : 20px 30px 30px 30px; + background-color : @orange; + // Enable scrollbar + scrollbar : false; + scrollbar-width : 5px; + fixed-height : true; + reverse : false; + color : #000000; + spacing : 0.3em; +} +scrollbar { + color: @black; + background-color: @blue; + padding: 1px; +} +element { + border: 0px; + padding: 0px; + margin: 0px; + spacing: 0.5em; + color: @black; + background-color: @blue; + children: [ element-icon, element-text ]; +} + +element normal.normal { + color: @black; + background-color: @orange; +} +element normal.urgent { + color: @urgent; + background-color: @light-grey; +} +element normal.active { + color: @active; + background-color: @light-grey; +} +element selected.normal { + border-radius: 0px; + color: @black; + background-color: @dark-orange; +} +element selected.urgent { + color: @light-grey; + background-color: @urgent; +} +element selected.active { + color: @light-grey; + background-color: @active; +} +element alternate.normal { + color: @black; + background-color: @orange; +} +element alternate.urgent { + color: @urgent; + background-color: @medium-grey; +} +element alternate.active { + color: @active; + background-color: @medium-grey; +} +inputbar { + spacing : 5px; + background-color : #88003300; + border : 0px 0px 2px 0px; + border-radius : 0px; + padding : 5px 10px 5px 35px; + background-color : #00330088; + color : @black; + end : false; +} + +separator { + background-color : @blue; + color : #00000000; +} +prompt normal.normal { + background-color : #00000000; + color : #ffffff; + padding : 0px; +} +entry normal.normal { + background-color : #00000000; + color : #ffffff; + padding : 0px; +} +case-indicator normal.normal { + background-color : #00000000; + color : #ffffff; + padding : 0px; +} + +message { + margin : 30px; + padding : 20px 30px 20px 20px; + padding : 20px ; + border-radius : 10px; + border : 5px; +} + +prompt-colon { + spacing : 0; + enabled : false; +} + +element-text, element-icon { + background-color : inherit; + text-color : inherit; + foreground-color : inherit; +} diff --git a/assets/rofi/themes/KooL_style-11-Win11-list-light.rasi b/assets/rofi/themes/KooL_style-11-Win11-list-light.rasi index 0e2600f1..e6437b29 100644 --- a/assets/rofi/themes/KooL_style-11-Win11-list-light.rasi +++ b/assets/rofi/themes/KooL_style-11-Win11-list-light.rasi @@ -6,14 +6,14 @@ /* ---- Configuration ---- */ configuration { - dpi: 1; + dpi: 1; show-icons: true; hover-select: true; me-select-entry: "MouseSecondary"; me-accept-entry: "MousePrimary"; } -/*****----- Global Properties -----*****/ +/*****----- Global Properties -----*****/ * { bg0 : #ffffff80; bg1 : #f9f9f9bf; @@ -81,7 +81,6 @@ entry { placeholder-color : @fg1; } - listview { columns : 2; spacing : 8px; @@ -133,9 +132,9 @@ error-message { } textbox { - padding : 10px; - background-color : @bg0; - text-color : @fg0; - vertical-align : 0.5; - horizontal-align : 0.5; + padding : 10px; + background-color : @bg0; + text-color : @fg0; + vertical-align : 0.5; + horizontal-align : 0.5; } diff --git a/assets/rofi/themes/KooL_style-12-TOP-Docu.rasi b/assets/rofi/themes/KooL_style-12-TOP-Docu.rasi new file mode 100644 index 00000000..3e80c81a --- /dev/null +++ b/assets/rofi/themes/KooL_style-12-TOP-Docu.rasi @@ -0,0 +1,149 @@ +/* ---- 💫 https://github.com/JaKooLit 💫 ---- */ +/* KooL Hyprland Rofi Style 12 - TOP - Docu */ +/* Credit to DaveDavenport. I have only some few things changed */ + +/** + * ROFI Documentation theme. + * User: Qball + * Copyright: Dave Davenport + */ + +configuration { + modi: "drun,run,filebrowser"; + show-icons: true; + display-drun: "Apps"; + display-run: "Run"; + display-filebrowser: "Files"; + display-window: "Windows"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; + dpi: 1; + hover-select: true; + me-select-entry: "MouseSecondary"; + me-accept-entry: "MousePrimary"; +} + +/* ---- Global Properties ---- */ +* { + background-color: transparent; + text-color: white; +} +entry { + border: 2px 0px; + border-color: darkgrey; + background-color: grey; + padding: 4px; + placeholder: "🔎 Search"; + placeholder-color: darkgrey; + cursor: text; +} + +/*****-- Elements Font Size -----*****/ +element-text { + font: "JetBrainsMono Nerd Font SemiBold 12"; + +} +inputbar { + spacing: 0; + children: [ icon-keyboard, entry, mode-switcher ]; +} + +mode-switcher { + spacing: 10px; + border: 2px; + border-radius: 0px 4px 4px 0px; + border-color: darkgrey; + background-color: darkgrey; +} + +button { + padding: 0px 60px 0px 60px; + background-color: grey; + border-color: darkgrey; + cursor: pointer; +} + +button selected { + background-color: white/20%; + text-color: black; +} + +icon-keyboard { + border: 2px 0px 2px 2px; + border-radius: 4px 0px 0px 4px; + border-color: darkgrey; + background-color: grey; + padding: 0px 10px 0px 10px; + expand: false; + size: 1.2em; + filename: "keyboard"; +} + +window { + anchor: north; + location: north; + width: 100%; + background-color: black / 50%; + padding: 1em; + border-color: black; + border: 0em 0.2em 0.2em; + chilren: [ inputbar, message, listview ]; +} + +mainbox { + spacing: 1em; +} + + +listview { + lines: 4; + columns: 6; + spacing: 1em; + fixed-columns: true; +} + +element { + orientation: vertical; + border: 2px; + border-radius: 4px ; + border-color: darkgrey; + background-color: grey; + cursor: pointer; + padding: 4px; +} + +element selected { + background-color: white/20%; + text-color: black; +} + + +element-icon { + cursor: inherit; +} + +element-text { + horizontal-align: 0.5; + cursor: inherit; +} + +/* ---- Message ---- */ +message { + background-color: transparent; + border: 0px; +} +textbox { + margin: 10px; + padding: 12px; + border-radius: 10px; + background-color: black / 50%; + text-color: white; + vertical-align: 0.5; + horizontal-align: 0.5; +} +error-message { + padding: 12px; + border-radius: 20px; + background-color: black / 50%; + text-color: white; +} \ No newline at end of file diff --git a/assets/rofi/themes/KooL_style-2-Dark.rasi b/assets/rofi/themes/KooL_style-2-Dark.rasi index 1925203b..5c8381f7 100644 --- a/assets/rofi/themes/KooL_style-2-Dark.rasi +++ b/assets/rofi/themes/KooL_style-2-Dark.rasi @@ -3,7 +3,7 @@ /* Source: https://github.com/adi1090x/rofi */ -/*****----- Configuration -----*****/ +/* ****----- Configuration -----**** */ configuration { modi: "drun,filebrowser,window"; show-icons: true; @@ -11,14 +11,18 @@ configuration { display-run: "RUN"; display-filebrowser: "FILES"; display-window: "WINDOW"; - drun-display-format: "{name}\n[({generic})]"; - window-format: "Class : {c}\nWorkspace : {w}"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; dpi: 1; hover-select: true; me-select-entry: "MouseSecondary"; me-accept-entry: "MousePrimary"; } +/*****----- Global Properties -----*****/ +* { + +} /*****-- Elements Font Size -----*****/ element-text { font: "JetBrainsMono Nerd Font SemiBold 12"; diff --git a/assets/rofi/themes/KooL_style-2-Light.rasi b/assets/rofi/themes/KooL_style-2-Light.rasi index 118b6e54..08b58d15 100644 --- a/assets/rofi/themes/KooL_style-2-Light.rasi +++ b/assets/rofi/themes/KooL_style-2-Light.rasi @@ -11,14 +11,18 @@ configuration { display-run: "RUN"; display-filebrowser: "FILES"; display-window: "WINDOW"; - drun-display-format: "{name}\n[({generic})]"; - window-format: "Class : {c}\nWorkspace : {w}"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; dpi: 1; hover-select: true; me-select-entry: "MouseSecondary"; me-accept-entry: "MousePrimary"; } +/*****----- Global Properties -----*****/ +* { + +} /*****-- Elements Font Size -----*****/ element-text { font: "JetBrainsMono Nerd Font SemiBold 12"; diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index feb54c22..862ffa45 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -31,6 +31,7 @@ bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # Toggle animations ON/O bind = $mainMod ALT, L, exec, $scriptsDir/ChangeLayout.sh # Toggle Master or Dwindle Layout bind = $mainMod ALT, V, exec, $scriptsDir/ClipManager.sh # Clipboard Manager bind = $mainMod CTRL, R, exec, $scriptsDir/RofiThemeSelector.sh # modified Rofi Theme Selector +bind = $mainMod CTRL SHIFT, R, exec, $scriptsDir/RofiThemeSelector-modified.sh # modified Rofi Theme Selector bind = $mainMod SHIFT, F, fullscreen # whole full screen bind = $mainMod CTRL, F, fullscreen, 1 # fake full screen diff --git a/config/hypr/scripts/RofiThemeSelector-modified.sh b/config/hypr/scripts/RofiThemeSelector-modified.sh new file mode 100755 index 00000000..e4d476c3 --- /dev/null +++ b/config/hypr/scripts/RofiThemeSelector-modified.sh @@ -0,0 +1,226 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# A modified version of Rofi-Theme-Selector, concentrating only on ~/.local and also, applying only 10 @themes in ~/.config/rofi/config.rasi +# as opposed to continous adding of //@theme + +# This code is released in public domain by Dave Davenport + +iDIR="$HOME/.config/swaync/images" + + +OS="linux" + +ROFI=$(command -v rofi) +SED=$(command -v sed) +MKTEMP=$(command -v mktemp) +NOTIFY_SEND=$(command -v notify-send) + +if [ -z "${SED}" ] +then + echo "Did not find 'sed', script cannot continue." + exit 1 +fi +if [ -z "${MKTEMP}" ] +then + echo "Did not find 'mktemp', script cannot continue." + exit 1 +fi +if [ -z "${ROFI}" ] +then + echo "Did not find rofi, there is no point to continue." + exit 1 +fi +if [ -z "${NOTIFY_SEND}" ] +then + echo "Did not find 'notify-send', notifications won't work." +fi + +TMP_CONFIG_FILE=$(${MKTEMP}).rasi +rofi_theme_dir="${HOME}/.local/share/rofi/themes" +rofi_config_file="${XDG_CONFIG_HOME:-${HOME}/.config}/rofi/config.rasi" + +## +# Array with parts to the found themes. +# And array with the printable name. +## +declare -a themes +declare -a theme_names + +## +# Function that tries to find all installed rofi themes. +# This fills in #themes array and formats a displayable string #theme_names +## +find_themes() +{ + DIRS="${HOME}/.local/share" + OLDIFS=${IFS} + IFS=: + # Add user dir. + DIRS+=":${XDG_CONFIG_HOME:-${HOME}/.config}" + for p in ${DIRS}; do + p=${p%/} + TD=${p}/rofi/themes + if [ -n "${p}" ] && [ -d "${TD}" ] + then + echo "Checking themes in: ${TD}" + for file in ${TD}/*.rasi + do + if [ -f "${file}" ] + then + themes+=("${file}") + FN=$(basename "${file}") + NAME=${FN%.*} # Extract the file name without extension + theme_names+=("${NAME}") # Only add the base file name + fi + done + fi + done + IFS=${OLDIFS} +} + +## +# Function to add or update theme in the config.rasi +## +add_theme_to_config() { + local theme_name="$1" + local theme_path="$rofi_theme_dir/$theme_name" + + # if config in $HOME to write as $HOME + if [[ "$theme_path" == $HOME/* ]]; then + theme_path_with_tilde="~${theme_path#$HOME}" + else + theme_path_with_tilde="$theme_path" + fi + + # If no @theme is in the file, add it + if ! grep -q '^\s*@theme' "$rofi_config_file"; then + echo -e "\n\n@theme \"$theme_path_with_tilde\"" >> "$rofi_config_file" + echo "Added @theme \"$theme_path_with_tilde\" to $rofi_config_file" + else + $SED -i "s/^\(\s*@theme.*\)/\/\/\1/" "$rofi_config_file" + echo -e "@theme \"$theme_path_with_tilde\"" >> "$rofi_config_file" + echo "Updated @theme line to $theme_path_with_tilde" + fi + + # Ensure no more than max # of lines with //@theme lines + max_line="9" + total_lines=$(grep -c '^\s*//@theme' "$rofi_config_file") + + if [ "$total_lines" -gt "$max_line" ]; then + excess=$((total_lines - max_line)) + # Remove the oldest or the very top //@theme lines + for i in $(seq 1 "$excess"); do + $SED -i '0,/^\s*\/\/@theme/ { /^\s*\/\/@theme/ {d; q; }}' "$rofi_config_file" + done + echo "Removed excess //@theme lines" + fi +} + +## +# Create a copy of rofi config +## +create_config_copy() +{ + ${ROFI} -dump-config > "${TMP_CONFIG_FILE}" + # remove theme entry. + ${SED} -i 's/^\s*theme:\s\+".*"\s*;//g' "${TMP_CONFIG_FILE}" +} + +### +# Print the list out so it can be displayed by rofi. +## +create_theme_list() +{ + OLDIFS=${IFS} + IFS='|' + for themen in ${theme_names[@]} + do + echo "${themen}" + done + IFS=${OLDIFS} +} + +## +# Thee indicate what entry is selected. +## +declare -i SELECTED + +select_theme() +{ + local MORE_FLAGS=(-dmenu -format i -no-custom -p "Theme" -markup -config "${TMP_CONFIG_FILE}" -i) + MORE_FLAGS+=(-kb-custom-1 "Alt-a") + MORE_FLAGS+=(-u 2,3 -a 4,5 ) + local CUR="default" + while true + do + declare -i RTR + declare -i RES + local MESG="""You can preview themes by hitting Enter. +Alt-a to accept the new theme. +Escape to cancel +Current theme: ${CUR} +When setting a new theme this will override previous theme settings. +Please update your config file if you have local modifications.""" + THEME_FLAG= + if [ -n "${SELECTED}" ] + then + THEME_FLAG="-theme ${themes[${SELECTED}]}" + fi + RES=$( create_theme_list | ${ROFI} ${THEME_FLAG} ${MORE_FLAGS[@]} -cycle -selected-row "${SELECTED}" -mesg "${MESG}") + RTR=$? + if [ "${RTR}" = 10 ] + then + return 0; + elif [ "${RTR}" = 1 ] + then + return 1; + elif [ "${RTR}" = 65 ] + then + return 1; + fi + CUR=${theme_names[${RES}]} + SELECTED=${RES} + done +} + +############################################################################################################ +# Actual program execution +########################################################################################################### +## +# Find all themes +## +find_themes + +## +# Do check if there are themes. +## +if [ ${#themes[@]} = 0 ] +then + ${ROFI} -e "No themes found." + exit 0 +fi + +## +# Create copy of config to play with in preview +## +create_config_copy + +## +# Show the themes to user. +## +if select_theme && [ -n "${SELECTED}" ] +then + # Apply the selected theme + add_theme_to_config "${theme_names[${SELECTED}]}" + + # Send notification with the selected theme name + selection="${theme_names[${SELECTED}]}" + if [ -n "$NOTIFY_SEND" ]; then + notify-send -u low -i "$iDIR/ja.png" "Rofi Theme" "applied: $selection" + fi +fi + +## +# Remove temp. config. +## +rm -- "${TMP_CONFIG_FILE}" -- cgit v1.2.3