porting launchers and themes to more general solution, moving away from shared

This commit is contained in:
spinach 2026-01-13 18:14:59 -05:00
parent eda5bf9f74
commit 111ddfda2c
14 changed files with 42 additions and 228 deletions

3
base/base.rasi Normal file
View File

@ -0,0 +1,3 @@
* {
font: "Hack Nerd Font 12";
}

View File

@ -1 +0,0 @@
../launchers/launcher.sh

View File

@ -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;
}

View File

@ -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

29
launcher/rofi.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -1,8 +0,0 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
* Modified: spinach
**/
@import "~/.config/rofi/colors/onedark.rasi"

View File

@ -1,10 +0,0 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
* Modified : spinach
**/
* {
font: "Hack Nerd Font 12";
}

View File

@ -16,8 +16,8 @@ configuration {
} }
/*****----- Global Properties -----*****/ /*****----- Global Properties -----*****/
@import "../shared/colors.rasi" @import "../palette/onedark.rasi"
@import "../shared/fonts.rasi" @import "../base/base.rasi"
/*****----- Main Window -----*****/ /*****----- Main Window -----*****/
window { window {

View File

@ -16,8 +16,8 @@ configuration {
} }
/*****----- Global Properties -----*****/ /*****----- Global Properties -----*****/
@import "../shared/colors.rasi" @import "../palette/onedark.rasi"
@import "../shared/fonts.rasi" @import "../base/base.rasi"
/*****----- Main Window -----*****/ /*****----- Main Window -----*****/
window { window {

View File

@ -16,8 +16,8 @@ configuration {
} }
/*****----- Global Properties -----*****/ /*****----- Global Properties -----*****/
@import "../shared/colors.rasi" @import "../palette/onedark.rasi"
@import "../shared/fonts.rasi" @import "../base/base.rasi"
/*****----- Main Window -----*****/ /*****----- Main Window -----*****/
window { window {

View File

@ -16,8 +16,8 @@ configuration {
} }
/*****----- Global Properties -----*****/ /*****----- Global Properties -----*****/
@import "../shared/colors.rasi" @import "../palette/onedark.rasi"
@import "../shared/fonts.rasi" @import "../base/base.rasi"
/*****----- Main Window -----*****/ /*****----- Main Window -----*****/
window { window {

View File

@ -16,8 +16,8 @@ configuration {
} }
/*****----- Global Properties -----*****/ /*****----- Global Properties -----*****/
@import "../shared/colors.rasi" @import "../palette/onedark.rasi"
@import "../shared/fonts.rasi" @import "../base/base.rasi"
/*****----- Main Window -----*****/ /*****----- Main Window -----*****/
window { window {