add rofi config

This commit is contained in:
2026-06-11 19:38:59 +05:30
parent 72e90c145e
commit 13761018ae
28 changed files with 644 additions and 612 deletions

115
rofi/config.rasi Normal file
View File

@@ -0,0 +1,115 @@
configuration {
font: "Cartograph CF 12";
show-icons: true;
icon-theme: "Papirus";
}
@theme "rose_pine"
#window {
background-color: @background;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 5;
}
#mainbox {
border: 0;
padding: 5;
}
#message {
border: 1px dash 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 2px dash 0px 0px ;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
background-color: @background;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @background;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @background;
}
#element.alternate.normal {
background-color: @background;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @cya;
}
#prompt {
spacing: 0;
text-color: @grn;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em;
text-color: @grn;
}

51
rofi/launch.sh Executable file
View File

@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# Function to detect if the OS theme is dark
is_dark_theme() {
# Method 1: gsettings (GNOME/GTK color-scheme)
if command -v gsettings >/dev/null 2>&1; then
local scheme
scheme=$(gsettings get org.gnome.desktop.interface color-scheme 2>/dev/null | tr -d "'")
if [ "$scheme" = "prefer-dark" ]; then
return 0
elif [ "$scheme" = "prefer-light" ]; then
return 1
fi
fi
# Method 2: XDG Desktop Portal dbus query (desktop-agnostic portal)
if command -v dbus-send >/dev/null 2>&1; then
local dbus_val
dbus_val=$(dbus-send --print-reply --dest=org.freedesktop.portal.Desktop \
/org/freedesktop/portal/desktop \
org.freedesktop.portal.Settings.Read \
string:'org.freedesktop.appearance' string:'color-scheme' 2>/dev/null)
if echo "$dbus_val" | grep -q "uint32 1"; then
return 0 # Dark
elif echo "$dbus_val" | grep -q "uint32 2"; then
return 1 # Light
fi
fi
# Method 3: Fallback check on GTK theme name for "dark"
if command -v gsettings >/dev/null 2>&1; then
local gtk_theme
gtk_theme=$(gsettings get org.gnome.desktop.interface gtk-theme 2>/dev/null | tr -d "'" | tr '[:upper:]' '[:lower:]')
if [[ "$gtk_theme" =~ "dark" || "$gtk_theme" =~ "black" || "$gtk_theme" =~ "night" ]]; then
return 0
fi
fi
# Default fallback to dark theme
return 0
}
# Determine the correct theme based on the OS theme
if is_dark_theme; then
THEME="rose_pine"
else
THEME="rose_pine_dawn"
fi
# Launch rofi with the selected theme, forwarding any passed arguments
exec rofi -theme "$THEME" "$@"

187
rofi/themes/rose_pine.rasi Normal file
View File

@@ -0,0 +1,187 @@
/******************************************************************************
* ROFI Color theme
* Theme: Rosé Pine (C64 Style)
******************************************************************************/
* {
/* Rosé Pine Palette */
bg: #191724;
cur: #1f1d2e;
fgd: #e0def4;
cmt: #6e6a86;
cya: #9ccfd8;
grn: #31748f;
ora: #ebbcba;
pur: #c4a7e7;
red: #eb6f92;
yel: #f6c177;
foreground: @fgd;
background: @bg;
bordercolor: @ora;
separatorcolor: @grn;
normal-foreground: @foreground;
normal-background: @background;
alternate-normal-foreground: @foreground;
alternate-normal-background: @background;
selected-normal-foreground: @fgd;
selected-normal-background: @grn;
selected-foreground: @selected-normal-foreground;
selected-background: @selected-normal-background;
active-foreground: @grn;
active-background: @background;
alternate-active-foreground: @active-foreground;
alternate-active-background: @background;
selected-active-foreground: @bg;
selected-active-background: @grn;
urgent-foreground: @red;
urgent-background: @background;
alternate-urgent-foreground: @urgent-foreground;
alternate-urgent-background: @background;
selected-urgent-foreground: @bg;
selected-urgent-background: @red;
border-color: @bordercolor;
spacing: 2;
background-color: rgba ( 0, 0, 0, 0 % );
}
window {
font: "Cartograph CF 12";
background-color: @background;
border: 0;
padding: 5;
}
mainbox {
border: 0;
padding: 0;
margin: 0;
background-color: @background;
}
message {
border: 1px dash 0px dash ;
border-color: @separatorcolor;
padding: 1px ;
}
textbox {
text-color: @foreground;
}
listview {
fixed-height: 0;
border: 0px 0px 0px 0px ;
border-color: @separatorcolor;
spacing: 2px ;
scrollbar: false;
padding: 5px 5px 5px ;
}
element {
border: 0;
padding: 1px ;
}
element-text {
background-color: inherit;
text-color: inherit;
}
element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
scrollbar {
width: 0px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
mode-switcher {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 1px ;
}
case-indicator {
spacing: 0;
text-color: @normal-foreground;
}
entry {
spacing: 0;
text-color: @normal-foreground;
}
prompt {
spacing: 0;
text-color: @normal-foreground;
}
inputbar {
children: [ prompt, textbox-prompt-colon, entry, case-indicator ];
}
textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @normal-foreground;
}

View File

@@ -0,0 +1,187 @@
/******************************************************************************
* ROFI Color theme
* Theme: Rosé Pine Dawn (C64 Style)
******************************************************************************/
* {
/* Rosé Pine Dawn Palette */
bg: #faf4ed;
cur: #fffaf3;
fgd: #575279;
cmt: #9893a5;
cya: #56949f;
grn: #286983;
ora: #d7827e;
pur: #907aa9;
red: #b4637a;
yel: #ea9d34;
foreground: @fgd;
background: @bg;
bordercolor: @ora;
separatorcolor: @grn;
normal-foreground: @foreground;
normal-background: @background;
alternate-normal-foreground: @foreground;
alternate-normal-background: @background;
selected-normal-foreground: @foreground;
selected-normal-background: @grn;
selected-foreground: @selected-normal-foreground;
selected-background: @selected-normal-background;
active-foreground: @grn;
active-background: @background;
alternate-active-foreground: @active-foreground;
alternate-active-background: @background;
selected-active-foreground: @bg;
selected-active-background: @grn;
urgent-foreground: @red;
urgent-background: @background;
alternate-urgent-foreground: @urgent-foreground;
alternate-urgent-background: @background;
selected-urgent-foreground: @bg;
selected-urgent-background: @red;
border-color: @bordercolor;
spacing: 2;
background-color: rgba ( 0, 0, 0, 0 % );
}
window {
font: "Cartograph CF 12";
background-color: @background;
border: 0;
padding: 5;
}
mainbox {
border: 0;
padding: 0;
margin: 0;
background-color: @background;
}
message {
border: 1px dash 0px dash ;
border-color: @separatorcolor;
padding: 1px ;
}
textbox {
text-color: @foreground;
}
listview {
fixed-height: 0;
border: 0px 0px 0px 0px ;
border-color: @separatorcolor;
spacing: 2px ;
scrollbar: false;
padding: 5px 5px 5px ;
}
element {
border: 0;
padding: 1px ;
}
element-text {
background-color: inherit;
text-color: inherit;
}
element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
scrollbar {
width: 0px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
mode-switcher {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 1px ;
}
case-indicator {
spacing: 0;
text-color: @normal-foreground;
}
entry {
spacing: 0;
text-color: @normal-foreground;
}
prompt {
spacing: 0;
text-color: @normal-foreground;
}
inputbar {
children: [ prompt, textbox-prompt-colon, entry, case-indicator ];
}
textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @normal-foreground;
}