diff --git a/base/base.rasi b/base/base.rasi new file mode 100644 index 0000000..7ff252a --- /dev/null +++ b/base/base.rasi @@ -0,0 +1,3 @@ +* { + font: "Hack Nerd Font 12"; +} diff --git a/bin/rofi-launcher b/bin/rofi-launcher deleted file mode 120000 index 99fea20..0000000 --- a/bin/rofi-launcher +++ /dev/null @@ -1 +0,0 @@ -../launchers/launcher.sh \ No newline at end of file diff --git a/dmenu/dropdown-text.rasi b/dmenu/dropdown-text.rasi deleted file mode 100644 index 4eac621..0000000 --- a/dmenu/dropdown-text.rasi +++ /dev/null @@ -1,159 +0,0 @@ - -/*****----- Configuration -----*****/ - -/*****----- 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: "Search"; - 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/dmenu/search.sh b/dmenu/search.sh deleted file mode 100755 index d14c08d..0000000 --- a/dmenu/search.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# -## Rofi : Launcher (Modi Drun, Run, File Browser, Window) -# ## Available Styles -# -## dropdown-transparent dropdown-text -## fullscreen-transparent small-transparent - -dir="$HOME/.config/rofi/dmenu" -theme='dropdown-text' - -## Run -rofi \ - -dmenu \ - -i \ - -p "$1" \ - -theme ${dir}/${theme}.rasi diff --git a/launcher/rofi.sh b/launcher/rofi.sh new file mode 100755 index 0000000..b0662f4 --- /dev/null +++ b/launcher/rofi.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -euo pipefail + +ROFI_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/rofi" +THEME="${1:-small-transparent}" # first arg +MODE="${2:-drun}" # second arg + +THEME_FILE="${ROFI_DIR}/themes/${THEME}.rasi" +CONFIG_FILE="${ROFI_DIR}/config/config.rasi" + +# Optional: allow extra rofi args after mode/theme +shift $(( $# > 0 ? 1 : 0 )) || true +shift $(( $# > 0 ? 1 : 0 )) || true + +if [[ "$MODE" == "dmenu" ]] ; then + exec rofi \ + -config "${CONFIG_FILE}" \ + -theme "${THEME_FILE}" \ + -dmenu \ + "$@" + +else + exec rofi \ + -config "${CONFIG_FILE}" \ + -theme "${THEME_FILE}" \ + -show "${MODE}" \ + "$@" +fi diff --git a/launchers/launcher.sh b/launchers/launcher.sh deleted file mode 100755 index 9ee3b5b..0000000 --- a/launchers/launcher.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -## Author : Aditya Shakya (adi1090x) -## Github : @adi1090x -## Modified : spinach -# -## Rofi : Launcher (Modi Drun, Run, File Browser, Window) -# -## Available Styles -# -## dropdown-transparent dropdown-text -## fullscreen-transparent small-transparent - -dir="$HOME/.config/rofi/launchers" -theme='small-transparent' -# theme override -if [[ -n "$1" ]] ; then - theme="$1" -fi -## Run -rofi \ - -show drun \ - -theme ${dir}/${theme}.rasi diff --git a/colors/onedark.rasi b/palette/onedark.rasi similarity index 100% rename from colors/onedark.rasi rename to palette/onedark.rasi diff --git a/shared/colors.rasi b/shared/colors.rasi deleted file mode 100644 index 1a56152..0000000 --- a/shared/colors.rasi +++ /dev/null @@ -1,8 +0,0 @@ -/** - * - * Author : Aditya Shakya (adi1090x) - * Github : @adi1090x - * Modified: spinach - **/ - -@import "~/.config/rofi/colors/onedark.rasi" diff --git a/shared/fonts.rasi b/shared/fonts.rasi deleted file mode 100644 index b900849..0000000 --- a/shared/fonts.rasi +++ /dev/null @@ -1,10 +0,0 @@ -/** - * - * Author : Aditya Shakya (adi1090x) - * Github : @adi1090x - * Modified : spinach - **/ - -* { - font: "Hack Nerd Font 12"; -} diff --git a/launchers/dropdown-icon.rasi b/themes/dropdown-icon.rasi similarity index 97% rename from launchers/dropdown-icon.rasi rename to themes/dropdown-icon.rasi index 434bee8..12f8ab2 100644 --- a/launchers/dropdown-icon.rasi +++ b/themes/dropdown-icon.rasi @@ -16,8 +16,8 @@ configuration { } /*****----- Global Properties -----*****/ -@import "../shared/colors.rasi" -@import "../shared/fonts.rasi" +@import "../palette/onedark.rasi" +@import "../base/base.rasi" /*****----- Main Window -----*****/ window { diff --git a/launchers/dropdown-text.rasi b/themes/dropdown-text.rasi similarity index 97% rename from launchers/dropdown-text.rasi rename to themes/dropdown-text.rasi index be75df7..38d9314 100644 --- a/launchers/dropdown-text.rasi +++ b/themes/dropdown-text.rasi @@ -16,8 +16,8 @@ configuration { } /*****----- Global Properties -----*****/ -@import "../shared/colors.rasi" -@import "../shared/fonts.rasi" +@import "../palette/onedark.rasi" +@import "../base/base.rasi" /*****----- Main Window -----*****/ window { diff --git a/launchers/fullscreen-transparent.rasi b/themes/fullscreen-transparent.rasi similarity index 97% rename from launchers/fullscreen-transparent.rasi rename to themes/fullscreen-transparent.rasi index 3df8f16..c953d49 100644 --- a/launchers/fullscreen-transparent.rasi +++ b/themes/fullscreen-transparent.rasi @@ -16,8 +16,8 @@ configuration { } /*****----- Global Properties -----*****/ -@import "../shared/colors.rasi" -@import "../shared/fonts.rasi" +@import "../palette/onedark.rasi" +@import "../base/base.rasi" /*****----- Main Window -----*****/ window { diff --git a/launchers/small-transparent.rasi b/themes/small-transparent.rasi similarity index 97% rename from launchers/small-transparent.rasi rename to themes/small-transparent.rasi index fbd6ec8..c7ca756 100644 --- a/launchers/small-transparent.rasi +++ b/themes/small-transparent.rasi @@ -16,8 +16,8 @@ configuration { } /*****----- Global Properties -----*****/ -@import "../shared/colors.rasi" -@import "../shared/fonts.rasi" +@import "../palette/onedark.rasi" +@import "../base/base.rasi" /*****----- Main Window -----*****/ window { diff --git a/launchers/style-6.rasi b/themes/style-6.rasi similarity index 97% rename from launchers/style-6.rasi rename to themes/style-6.rasi index d7a59d8..f032e79 100644 --- a/launchers/style-6.rasi +++ b/themes/style-6.rasi @@ -16,8 +16,8 @@ configuration { } /*****----- Global Properties -----*****/ -@import "../shared/colors.rasi" -@import "../shared/fonts.rasi" +@import "../palette/onedark.rasi" +@import "../base/base.rasi" /*****----- Main Window -----*****/ window {