From 235d240a81938bbbc4970fd7daf8bcc7cde10ffe Mon Sep 17 00:00:00 2001 From: druckdev Date: Wed, 8 Sep 2021 14:44:06 +0200 Subject: [PATCH] rofi: Migrate to new theme format Since needed with/after rofi 1.7.0. --- .config/rofi/config.rasi | 78 ++------------------------- .config/rofi/powermenu.sh | 4 +- .config/rofi/themes/app-launcher.rasi | 69 ++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 77 deletions(-) create mode 100644 .config/rofi/themes/app-launcher.rasi diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index 298a462..3320a61 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -18,81 +18,9 @@ configuration { kb-mode-previous: "Control+h,Shift+Left,Control+ISO_Left_Tab"; kb-row-down: "Control+j,Down,Control+n"; kb-row-up: "Control+k,Up,Control+p,ISO_Left_Tab"; + kb-mode-complete: ""; kb-mode-next: "Control+l,Shift+Right,Control+Tab"; } -* { - columns: 1; - background-color: #00000065; - border-color: #00000000; - text-color: #EFEFEF; -} - -#window { - border: 0; - border-radius: 4px; - padding: 30; - width: 40%; - height: 60%; -} - -#scrollbar { - handle-color: #00a0e6; - border-color: #00a0e6; -} - -#mainbox { - background-color: #00000000; - children: [inputbar, listview]; - spacing: 10px; - /*margin: 20%;*/ - padding: 7px 0; - border: 1px; - border-color: @base0D; -} - -#listview { - background-color: #00000000; - fixed-height: 0; - border: 0px; - spacing: 5px; - scrollbar: true; - padding: 10px 10px 0px; -} - -#element { - background-color: #00000000; - border: 0; - border-radius: 15px; - padding: 3 0 3 4 ; -} - -#element selected { - background-color: #00a0e6; - text-color: #EFEFEF; -} - -#inputbar { - children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; - background-color: #00000000; -} - -#case-indicator { - background-color: #00000000; - spacing: 0; -} -#entry { - background-color: #00000000; - spacing: 0; -} -#prompt { - background-color: #00000000; - spacing: 0; -} - -#textbox-prompt-colon { - background-color: #00000000; - expand: false; - str: ":"; - margin: 0px 0.3em 0em 0em ; -} +/* Load $XDG_CONFIG_HOME/rofi/themes/app-launcher.rasi */ +@theme "app-launcher" diff --git a/.config/rofi/powermenu.sh b/.config/rofi/powermenu.sh index 10bdbe3..7b85354 100755 --- a/.config/rofi/powermenu.sh +++ b/.config/rofi/powermenu.sh @@ -16,8 +16,8 @@ declare -a rofi_args rofi_args=( -no-config -theme /usr/share/rofi/themes/android_notification.rasi - -lines ${#entries[@]} - -width 12 + -theme-str "#listview { lines: ${#entries[@]}; fixed-height: false; }" + -theme-str "#window { width: 12%; }" -location 3 -yoffset 32 -dmenu diff --git a/.config/rofi/themes/app-launcher.rasi b/.config/rofi/themes/app-launcher.rasi new file mode 100644 index 0000000..9ea2df4 --- /dev/null +++ b/.config/rofi/themes/app-launcher.rasi @@ -0,0 +1,69 @@ +// vi: ft=css + +* { + columns: 1; + font: "mono 18"; + background-color: #00000000; + border-color: #00000000; + text-color: #EFEFEF; +} + +#window { + border: 0; + border-radius: 4px; + padding: 30; + width: 40%; + height: 60%; +} + +#scrollbar { + handle-color: #00a0e6b0; + border-color: #00a0e6b0; +} + +#mainbox { + children: [inputbar, listview]; + spacing: 10px; + padding: 7px 0; + border: 1px; + border-color: @base0D; +} + +#listview { + fixed-height: 0; + border: 0px; + spacing: 5px; + scrollbar: true; + padding: 10px 10px 0px; +} + +#element { + border: 0; + border-radius: 15px; + padding: 3 0 3 4 ; +} + +#element selected { + background-color: #00a0e6b0; + text-color: #EFEFEF; +} + +#inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} + +#case-indicator { + spacing: 0; +} +#entry { + spacing: 0; +} +#prompt { + spacing: 0; +} + +#textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em ; +}