From c4b4300e3c5b1303601af0b7f4e862b7a24a0f13 Mon Sep 17 00:00:00 2001 From: spinach <19keegandeppe@gmail.com> Date: Sat, 25 Feb 2023 16:06:52 -0500 Subject: [PATCH] custom dmenu replacement --- bin/rofi-dmenu | 2 +- launchers/dmenu.sh | 5 +- launchers/dropdown-text-files.rasi | 163 +++++++++++++++++++++++++++++ launchers/launcher.sh | 2 - 4 files changed, 166 insertions(+), 6 deletions(-) create mode 100644 launchers/dropdown-text-files.rasi diff --git a/bin/rofi-dmenu b/bin/rofi-dmenu index 026788f..de1b3ac 120000 --- a/bin/rofi-dmenu +++ b/bin/rofi-dmenu @@ -1 +1 @@ -launchers/dmenu.sh \ No newline at end of file +../launchers/dmenu.sh \ No newline at end of file diff --git a/launchers/dmenu.sh b/launchers/dmenu.sh index 298e709..c1001a5 100755 --- a/launchers/dmenu.sh +++ b/launchers/dmenu.sh @@ -12,14 +12,13 @@ ## fullscreen-transparent small-transparent dir="$HOME/.config/rofi/launchers" -theme='small-transparent' +theme='dropdown-text-files' # theme override if [[ -n "$1" ]] ; then theme="$1" fi -echo "$theme" ## Run rofi \ - -show dmenu \ + -show filebrowser \ -theme ${dir}/${theme}.rasi diff --git a/launchers/dropdown-text-files.rasi b/launchers/dropdown-text-files.rasi new file mode 100644 index 0000000..e4acb95 --- /dev/null +++ b/launchers/dropdown-text-files.rasi @@ -0,0 +1,163 @@ +/*****----- Configuration -----*****/ +configuration { + modi: "filebrowser"; + show-icons: true; +} + +/*****----- Global Properties -----*****/ +@import "../shared/colors.rasi" +@import "../shared/fonts.rasi" + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + fullscreen: false; + width: 750px; + 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: 10px; + margin: 0px; + padding: 10px; + 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: 10px; + border: 1px solid; + border-radius: 4px; + border-color: @selected; + background-color: @background; + 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: "Select Background"; + placeholder-color: inherit; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 1; + lines: 7; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 0px; + 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: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + orientation: horizontal; + cursor: pointer; +} +element normal.normal { + background-color: transparent; + text-color: @foreground; +} +element selected.normal { + border: 1px solid; + border-radius: 4px; + border-color: @selected; + background-color: @background; + text-color: @foreground; +} +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: 10px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: black / 10%; + text-color: @foreground; +} +textbox { + background-color: transparent; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; + highlight: none; +} diff --git a/launchers/launcher.sh b/launchers/launcher.sh index c2ca2a8..9ee3b5b 100755 --- a/launchers/launcher.sh +++ b/launchers/launcher.sh @@ -17,8 +17,6 @@ theme='small-transparent' if [[ -n "$1" ]] ; then theme="$1" fi - -echo "$theme" ## Run rofi \ -show drun \