From 1a85eac1bb6eb62db79e0cb950d37b54de5456e4 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 8 Nov 2024 00:21:01 +0100 Subject: [PATCH] rofi with theme swticher --- .config/hypr/conf.d/keybinds.conf | 4 +- .config/hypr/hyprland.conf | 2 +- .config/rofi/colors/latte.rasi | 16 ++ .config/rofi/colors/macchiato.rasi | 16 ++ .config/rofi/fonts.rasi | 12 ++ .config/rofi/launcher.rasi | 171 +++++++++++++++++++++ .config/rofi/launchers/type-2/current.rasi | 171 +++++++++++++++++++++ .config/rofi/theme.rasi | 16 ++ .config/rofi/window.rasi | 151 ++++++++++++++++++ 9 files changed, 556 insertions(+), 3 deletions(-) create mode 100644 .config/rofi/colors/latte.rasi create mode 100644 .config/rofi/colors/macchiato.rasi create mode 100644 .config/rofi/fonts.rasi create mode 100644 .config/rofi/launcher.rasi create mode 100644 .config/rofi/launchers/type-2/current.rasi create mode 100644 .config/rofi/theme.rasi create mode 100644 .config/rofi/window.rasi diff --git a/.config/hypr/conf.d/keybinds.conf b/.config/hypr/conf.d/keybinds.conf index edd2a82..b94b114 100644 --- a/.config/hypr/conf.d/keybinds.conf +++ b/.config/hypr/conf.d/keybinds.conf @@ -2,9 +2,9 @@ bind = $mainMod SHIFT, F, fullscreenstate, -1 2 bind = CTRL ALT, T, exec, $terminal bind = $mainMod SHIFT, L, exec, hyprlock -bind = ALT, TAB, exec, rofi -show window -theme ~/.config/rofi/launchers/type-2/style-15.rasi +bind = ALT, TAB, exec, rofi -show window -theme ~/.config/rofi/window.rasi bind = , XF86Calculator, exec, gnome-calculator -bind = SUPER, space, exec, ~/.config/rofi/launchers/type-2/launcher.sh +bind = $mainMod, space, exec, rofi -show drun -theme ~/.config/rofi/launcher.rasi binde =, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ binde =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- bind =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 0f765ae..8f52fb8 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -96,7 +96,7 @@ general { border_size = 2 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - col.active_border = $blue $sky 45deg + col.active_border = $lavender $blue 45deg col.inactive_border = $surface0 # Set to true enable resizing windows by clicking and dragging on borders and gaps diff --git a/.config/rofi/colors/latte.rasi b/.config/rofi/colors/latte.rasi new file mode 100644 index 0000000..4ec7b27 --- /dev/null +++ b/.config/rofi/colors/latte.rasi @@ -0,0 +1,16 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Colors + **/ + +* { + background: #eff1f5; + background-alt: #e6e9ef; + foreground: #9ca0b0; + selected: #1e66f5; + active: #40a02b; + urgent: #d20f39; +} diff --git a/.config/rofi/colors/macchiato.rasi b/.config/rofi/colors/macchiato.rasi new file mode 100644 index 0000000..f2e45d6 --- /dev/null +++ b/.config/rofi/colors/macchiato.rasi @@ -0,0 +1,16 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Colors + **/ + +* { + background: #24273a; + background-alt: #1e2030; + foreground: #6c7086; + selected: #8aadf4; + active: #a6da95; + urgent: #ed8796; +} diff --git a/.config/rofi/fonts.rasi b/.config/rofi/fonts.rasi new file mode 100644 index 0000000..50499c9 --- /dev/null +++ b/.config/rofi/fonts.rasi @@ -0,0 +1,12 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Fonts + * + **/ + +* { + font: "Iosevka Nerd Font 10"; +} diff --git a/.config/rofi/launcher.rasi b/.config/rofi/launcher.rasi new file mode 100644 index 0000000..7f305d1 --- /dev/null +++ b/.config/rofi/launcher.rasi @@ -0,0 +1,171 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + +/*****----- Configuration -----*****/ +configuration { + modi: "drun"; + show-icons: true; + display-drun: ""; + drun-display-format: "{name}"; +} + +/*****----- Global Properties -----*****/ +@import "~/.config/rofi/theme.rasi" +@import "~/.config/rofi/fonts.rasi" + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 700px; + x-offset: 0px; + y-offset: 0px; + + enabled: true; + margin: 0px; + padding: 0px; + border: 2px; + border-radius: 12px; + border-color: @selected; + background-color: @background; + cursor: "default"; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 20px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @selected; + background-color: transparent; + children: [ "inputbar", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 15px; + border: 0px solid; + border-radius: 12px; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; + children: [ "prompt", "entry" ]; +} + +prompt { + enabled: true; + background-color: inherit; + text-color: inherit; +} +textbox-prompt-colon { + enabled: true; + expand: false; + str: "::"; + background-color: inherit; + text-color: inherit; +} +entry { + enabled: true; + background-color: inherit; + text-color: inherit; + cursor: text; + placeholder: "Search..."; + placeholder-color: inherit; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 2; + lines: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @selected; + border-radius: 0px; + background-color: @background-alt; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 5px; + border: 0px solid; + border-radius: 12px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element normal.normal { + background-color: @background; + text-color: @foreground; +} +element selected.normal { + background-color: @selected; + text-color: @background; +} +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} +element-text { + background-color: transparent; + text-color: inherit; + highlight: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +error-message { + padding: 15px; + border: 2px solid; + border-radius: 12px; + border-color: @selected; + background-color: @background; + text-color: @foreground; +} +textbox { + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; + highlight: none; +} diff --git a/.config/rofi/launchers/type-2/current.rasi b/.config/rofi/launchers/type-2/current.rasi new file mode 100644 index 0000000..0655417 --- /dev/null +++ b/.config/rofi/launchers/type-2/current.rasi @@ -0,0 +1,171 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + +/*****----- Configuration -----*****/ +configuration { + modi: "drun"; + show-icons: true; + display-drun: ""; + drun-display-format: "{name}"; +} + +/*****----- Global Properties -----*****/ +@import "~/.config/rofi/colors/current.rasi" +@import "shared/fonts.rasi" + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 700px; + x-offset: 0px; + y-offset: 0px; + + enabled: true; + margin: 0px; + padding: 0px; + border: 2px; + border-radius: 12px; + border-color: @selected; + background-color: @background; + cursor: "default"; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 20px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @selected; + background-color: transparent; + children: [ "inputbar", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 15px; + border: 0px solid; + border-radius: 12px; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; + children: [ "prompt", "entry" ]; +} + +prompt { + enabled: true; + background-color: inherit; + text-color: inherit; +} +textbox-prompt-colon { + enabled: true; + expand: false; + str: "::"; + background-color: inherit; + text-color: inherit; +} +entry { + enabled: true; + background-color: inherit; + text-color: inherit; + cursor: text; + placeholder: "Search..."; + placeholder-color: inherit; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 2; + lines: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @selected; + border-radius: 0px; + background-color: @background-alt; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 5px; + border: 0px solid; + border-radius: 12px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element normal.normal { + background-color: @background; + text-color: @foreground; +} +element selected.normal { + background-color: @selected; + text-color: @background; +} +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} +element-text { + background-color: transparent; + text-color: inherit; + highlight: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +error-message { + padding: 15px; + border: 2px solid; + border-radius: 12px; + border-color: @selected; + background-color: @background; + text-color: @foreground; +} +textbox { + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; + highlight: none; +} diff --git a/.config/rofi/theme.rasi b/.config/rofi/theme.rasi new file mode 100644 index 0000000..f2e45d6 --- /dev/null +++ b/.config/rofi/theme.rasi @@ -0,0 +1,16 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Colors + **/ + +* { + background: #24273a; + background-alt: #1e2030; + foreground: #6c7086; + selected: #8aadf4; + active: #a6da95; + urgent: #ed8796; +} diff --git a/.config/rofi/window.rasi b/.config/rofi/window.rasi new file mode 100644 index 0000000..2154d4b --- /dev/null +++ b/.config/rofi/window.rasi @@ -0,0 +1,151 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + +/*****----- Configuration -----*****/ +configuration { + modi: "drun"; + show-icons: true; + display-drun: " Applications"; + drun-display-format: "{name}"; +} + +/*****----- Global Properties -----*****/ +@import "~/.config/rofi/theme.rasi" +@import "~/.config/rofi/fonts.rasi" + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 450px; + x-offset: 0px; + y-offset: 0px; + + enabled: true; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background; + cursor: "default"; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @selected; + background-color: transparent; + children: [ "listview", "entry" ]; +} + +/*****----- Inputbar -----*****/ +entry { + enabled: true; + expand: false; + padding: 20px 0px; + background-color: @selected; + text-color: @background; + cursor: text; + placeholder: "Search..."; + placeholder-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 3; + lines: 3; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 0px; + margin: 0px; + padding: 20px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @selected; + border-radius: 0px; + background-color: @background-alt; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 15px; + margin: 0px; + padding: 20px 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + orientation: vertical; + cursor: pointer; +} +element normal.normal { + background-color: @background; + text-color: @foreground; +} +element selected.normal { + background-color: @background-alt; + text-color: @foreground; +} +element-icon { + background-color: transparent; + text-color: inherit; + size: 64px; + cursor: inherit; +} +element-text { + background-color: transparent; + text-color: inherit; + highlight: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +/*****----- Message -----*****/ +error-message { + padding: 15px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background; + text-color: @foreground; +} +textbox { + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; + highlight: none; +}