From 660093cff1b7e13d4cc2124db166aeec616e180c Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Mon, 20 Oct 2025 22:45:23 +0200 Subject: [PATCH] feat: rofi themes --- .gitignore | 2 +- rofi/config.rasi | 11 +++ rofi/theme.rasi | 154 ++++++++++++++++++++++++++++++++ utils/selectors/audio_output.sh | 2 +- 4 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 rofi/config.rasi create mode 100644 rofi/theme.rasi diff --git a/.gitignore b/.gitignore index 463b66e..f5fd7f8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ !nnn/ !polybar/ !ranger/ +!rofi/ !utils/ !sxhkd/ !wired/ @@ -20,4 +21,3 @@ !starship.toml !wp !README.md - diff --git a/rofi/config.rasi b/rofi/config.rasi new file mode 100644 index 0000000..d1d31c7 --- /dev/null +++ b/rofi/config.rasi @@ -0,0 +1,11 @@ +configuration { + modes: [ combi ]; + combi-modes: [ window, drun, run ]; +} + +@theme "gruvbox-light" + +entry, element-text { + text-color: red; + background-color: rgb(0,0,255); +} diff --git a/rofi/theme.rasi b/rofi/theme.rasi new file mode 100644 index 0000000..1969fb6 --- /dev/null +++ b/rofi/theme.rasi @@ -0,0 +1,154 @@ +/** + * Rofi default theme + **/ +* { + highlight: bold italic ; + background: #f8edeb; + background-alt: Red; + separatorcolor: #d6c4c4; + highlight: #246a73; + foreground: #141c21; + normal-background: var(background); + urgent-background: var(background); + active-background: var(background); + + normal-foreground: var(foreground); + urgent-foreground: var(foreground); + active-foreground: var(foreground); + + selected-normal-background: var(background-alt); + selected-urgent-background: var(background-alt); + selected-active-background: var(background-alt); + selected-normal-foreground: var(foreground); + selected-urgent-foreground: var(foreground); + selected-active-foreground: var(foreground); + + alternate-normal-background: var(background); + alternate-urgent-background: var(background); + alternate-active-background: var(background); + alternate-normal-foreground: var(foreground); + alternate-urgent-foreground: var(foreground); + alternate-active-foreground: var(foreground); + + scrollbar: true; + scrollbar-handle: #415a77; +} +window { + padding: 2; + background-color: var(background); + border: 2; + border-radius: 8px; + width: 14%; +} +mainbox { + padding: 0; + border: 0; +} +message { + padding: 1px ; + border-color: var(separatorcolor); + border: 2px 0px 0px ; +} +textbox { + highlight: var(highlight); + text-color: var(foreground); +} +listview { + padding: 2px 0px 0px ; + scrollbar: var(scrollbar); + border-color: var(separatorcolor); + spacing: 2px ; + border: 2px 0px 0px ; +} +element { + padding: 2px ; + border: 0; +} +element normal.normal { + background-color: var(normal-background); + text-color: var(normal-foreground); +} +element normal.urgent { + background-color: var(urgent-background); + text-color: var(urgent-foreground); +} +element normal.active { + background-color: var(active-background); + text-color: var(active-foreground); +} +element selected.normal { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); +} +element selected.urgent { + background-color: var(selected-urgent-background); + text-color: var(selected-urgent-foreground); +} +element selected.active { + background-color: var(selected-active-background); + text-color: var(selected-active-foreground); +} +element alternate.normal { + background-color: var(alternate-normal-background); + text-color: var(alternate-normal-foreground); +} +element alternate.urgent { + background-color: var(alternate-urgent-background); + text-color: var(alternate-urgent-foreground); +} +element alternate.active { + background-color: var(alternate-active-background); + text-color: var(alternate-active-foreground); +} +scrollbar { + width: 4px ; + padding: 0; + handle-width: 8px ; + border: 0; + handle-color: var(scrollbar-handle); +} +mode-switcher { + border-color: var(separatorcolor); + border: 2px 0px 0px ; +} +inputbar { + padding: 2px ; + spacing: 0; + text-color: var(normal-foreground); + children: [ "prompt","textbox-prompt-sep","entry","case-indicator" ]; +} +case-indicator { + spacing: 0; + text-color: var(normal-foreground); +} +entry { + background-color: var(background); + spacing: 0; + text-color: var(foreground); +} +prompt { + spacing: 0; + text-color: var(normal-foreground); +} +button { + spacing: 0; + text-color: var(normal-foreground); +} +button selected { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); +} +textbox-prompt-sep { + margin: 0px 0.3000em 0px 0px ; + expand: false; + str: ":"; + text-color: var(normal-foreground); +} +element-text { + background-color: var(background); + text-color: var(foreground); +} +element-icon { + background-color: inherit; + text-color: inherit; +} diff --git a/utils/selectors/audio_output.sh b/utils/selectors/audio_output.sh index 4bea01e..c8b61df 100644 --- a/utils/selectors/audio_output.sh +++ b/utils/selectors/audio_output.sh @@ -50,7 +50,7 @@ for sink in "${sink_list[@]}"; do menu_options="$menu_options$formal_name" done -chosen_option="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'Audio outputs' -width 12 -line-padding 3 -lines 6 <<< "$menu_options")" +chosen_option="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p 'Audio outputs' -width 1 -lines 5 -theme ~/.config/rofi/theme.rasi <<< "$menu_options")" [[ "$chosen_option" == "" ]] && exit 0