DRY rofi applet themes via shared base
Extract common applet pattern (no-icon dmenu layout) into applet.rasi. Reduce clipboard, vpn, cpugov, volume, and bluetooth themes to pure overrides — eliminates ~380 lines of duplication. Also fixes broken fonts.rasi import in bluetooth.rasi.
This commit is contained in:
parent
eb1db750c9
commit
ee5940dec1
39
defaults/xdg/rofi/themes/applet.rasi
Normal file
39
defaults/xdg/rofi/themes/applet.rasi
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* ABOUTME: Shared base theme for simple list applets (clipboard, vpn, cpugov, volume, bluetooth).
|
||||||
|
* ABOUTME: Provides no-icon dmenu layout — individual themes override window size and listview lines.
|
||||||
|
**/
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
modi: "drun";
|
||||||
|
show-icons: false;
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
}
|
||||||
|
|
||||||
|
@import "../config.rasi"
|
||||||
|
@import "../colors.rasi"
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
children: [ "message", "listview", "inputbar" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
enabled: true;
|
||||||
|
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
columns: 1;
|
||||||
|
lines: 8;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: true;
|
||||||
|
scrollbar: false;
|
||||||
|
layout: vertical;
|
||||||
|
reverse: false;
|
||||||
|
fixed-height: true;
|
||||||
|
fixed-columns: true;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
size: 0px;
|
||||||
|
}
|
||||||
@ -1,295 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
*
|
* ABOUTME: Rofi theme for Bluetooth device manager applet.
|
||||||
* Author : Aditya Shakya (adi1090x)
|
* ABOUTME: Hides inputbar since bluetooth script manages its own prompts via -p flag.
|
||||||
* Github : @adi1090x
|
|
||||||
*
|
|
||||||
* Rofi Theme File
|
|
||||||
* Rofi Version: 1.7.3
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
/*****----- Configuration -----*****/
|
@import "applet.rasi"
|
||||||
configuration {
|
|
||||||
modi: "";
|
|
||||||
show-icons: false;
|
|
||||||
drun-display-format: "{name}";
|
|
||||||
window-format: "{w} · {c} · {t}";
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****----- Global Properties -----*****/
|
|
||||||
@import "../colors.rasi"
|
|
||||||
@import "../fonts.rasi"
|
|
||||||
|
|
||||||
* {
|
|
||||||
border-colour: var(border);
|
|
||||||
handle-colour: var(selected);
|
|
||||||
background-colour: var(background);
|
|
||||||
foreground-colour: var(foreground);
|
|
||||||
alternate-background: var(background-alt);
|
|
||||||
normal-background: var(background);
|
|
||||||
normal-foreground: var(foreground);
|
|
||||||
urgent-background: var(urgent);
|
|
||||||
urgent-foreground: var(background);
|
|
||||||
active-background: var(active);
|
|
||||||
active-foreground: var(background);
|
|
||||||
selected-normal-background: var(selected);
|
|
||||||
selected-normal-foreground: var(background);
|
|
||||||
selected-urgent-background: var(active);
|
|
||||||
selected-urgent-foreground: var(background);
|
|
||||||
selected-active-background: var(urgent);
|
|
||||||
selected-active-foreground: var(background);
|
|
||||||
alternate-normal-background: var(background);
|
|
||||||
alternate-normal-foreground: var(foreground);
|
|
||||||
alternate-urgent-background: var(urgent);
|
|
||||||
alternate-urgent-foreground: var(background);
|
|
||||||
alternate-active-background: var(active);
|
|
||||||
alternate-active-foreground: var(background);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****----- Main Window -----*****/
|
|
||||||
window {
|
|
||||||
/* properties for window widget */
|
|
||||||
transparency: "real";
|
|
||||||
location: center;
|
|
||||||
anchor: center;
|
|
||||||
fullscreen: false;
|
|
||||||
width: 600px;
|
|
||||||
x-offset: 0px;
|
|
||||||
y-offset: 0px;
|
|
||||||
|
|
||||||
/* properties for all widgets */
|
|
||||||
enabled: true;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
border: 1px solid;
|
|
||||||
border-radius: 10px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
cursor: "default";
|
|
||||||
/* Backgroud Colors */
|
|
||||||
background-color: @background-colour;
|
|
||||||
/* Backgroud Image */
|
|
||||||
//background-image: url("/path/to/image.png", none);
|
|
||||||
/* Simple Linear Gradient */
|
|
||||||
//background-image: linear-gradient(red, orange, pink, purple);
|
|
||||||
/* Directional Linear Gradient */
|
|
||||||
//background-image: linear-gradient(to bottom, pink, yellow, magenta);
|
|
||||||
/* Angle Linear Gradient */
|
|
||||||
//background-image: linear-gradient(45, cyan, purple, indigo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****----- Main Box -----*****/
|
|
||||||
mainbox {
|
|
||||||
enabled: true;
|
|
||||||
spacing: 10px;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 30px;
|
|
||||||
border: 0px solid;
|
|
||||||
border-radius: 0px 0px 0px 0px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: transparent;
|
|
||||||
children: [ "message", "listview", "inputbar" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****----- Inputbar -----*****/
|
|
||||||
inputbar {
|
inputbar {
|
||||||
enabled: false;
|
enabled: false;
|
||||||
spacing: 10px;
|
|
||||||
margin: 0;
|
|
||||||
padding: 20px 0px 0;
|
|
||||||
border: 0px solid;
|
|
||||||
border-radius: 0px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: transparent;
|
|
||||||
text-color: @foreground-colour;
|
|
||||||
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
prompt {
|
|
||||||
enabled: true;
|
|
||||||
background-color: inherit;
|
|
||||||
text-color: inherit;
|
|
||||||
}
|
|
||||||
textbox-prompt-colon {
|
|
||||||
enabled: true;
|
|
||||||
padding: 5px 0px 0px 15px;
|
|
||||||
expand: false;
|
|
||||||
font: "UbuntuSans Nerd Font 14";
|
|
||||||
str: "";
|
|
||||||
background-color: inherit;
|
|
||||||
text-color: inherit;
|
|
||||||
}
|
|
||||||
entry {
|
|
||||||
enabled: true;
|
|
||||||
padding: 5px 0px;
|
|
||||||
background-color: inherit;
|
|
||||||
text-color: inherit;
|
|
||||||
cursor: text;
|
|
||||||
placeholder: "...";
|
|
||||||
placeholder-color: inherit;
|
|
||||||
}
|
|
||||||
num-filtered-rows {
|
|
||||||
enabled: true;
|
|
||||||
expand: false;
|
|
||||||
background-color: inherit;
|
|
||||||
text-color: inherit;
|
|
||||||
}
|
|
||||||
textbox-num-sep {
|
|
||||||
enabled: true;
|
|
||||||
expand: false;
|
|
||||||
str: "/";
|
|
||||||
background-color: inherit;
|
|
||||||
text-color: inherit;
|
|
||||||
}
|
|
||||||
num-rows {
|
|
||||||
enabled: true;
|
|
||||||
expand: false;
|
|
||||||
background-color: inherit;
|
|
||||||
text-color: inherit;
|
|
||||||
}
|
|
||||||
case-indicator {
|
|
||||||
enabled: true;
|
|
||||||
background-color: inherit;
|
|
||||||
text-color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****----- Listview -----*****/
|
|
||||||
listview {
|
|
||||||
enabled: true;
|
|
||||||
columns: 1;
|
|
||||||
lines: 8;
|
|
||||||
cycle: true;
|
|
||||||
dynamic: true;
|
|
||||||
scrollbar: false;
|
|
||||||
layout: vertical;
|
|
||||||
reverse: false;
|
|
||||||
fixed-height: true;
|
|
||||||
fixed-columns: true;
|
|
||||||
|
|
||||||
spacing: 5px;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
border: 0px solid;
|
|
||||||
border-radius: 0px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: transparent;
|
|
||||||
text-color: @foreground-colour;
|
|
||||||
cursor: "default";
|
|
||||||
}
|
|
||||||
scrollbar {
|
|
||||||
handle-width: 5px;
|
|
||||||
handle-color: @handle-colour;
|
|
||||||
border-radius: 10px;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****----- Elements -----*****/
|
|
||||||
element {
|
|
||||||
enabled: true;
|
|
||||||
spacing: 10px;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 5px 10px;
|
|
||||||
border: 0px solid;
|
|
||||||
border-radius: 10px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: transparent;
|
|
||||||
text-color: @foreground-colour;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
element normal.normal {
|
|
||||||
background-color: transparent;
|
|
||||||
text-color: var(normal-foreground);
|
|
||||||
}
|
|
||||||
element normal.urgent {
|
|
||||||
background-color: var(urgent-background);
|
|
||||||
text-color: var(urgent-foreground);
|
|
||||||
}
|
|
||||||
element normal.active {
|
|
||||||
background-color: var(normal-foreground);
|
|
||||||
text-color: var(normal-background);
|
|
||||||
}
|
|
||||||
element selected.normal {
|
|
||||||
background-color: var(selected-normal-background);
|
|
||||||
text-color: var(normal-foreground);
|
|
||||||
}
|
|
||||||
element selected.urgent {
|
|
||||||
background-color: var(selected-urgent-background);
|
|
||||||
text-color: var(normal-background);
|
|
||||||
}
|
|
||||||
element selected.active {
|
|
||||||
background-color: var(selected-active-background);
|
|
||||||
text-color: var(normal-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
element-icon {
|
|
||||||
background-color: transparent;
|
|
||||||
text-color: inherit;
|
|
||||||
size: 24px;
|
|
||||||
cursor: inherit;
|
|
||||||
}
|
|
||||||
element-text {
|
|
||||||
background-color: transparent;
|
|
||||||
text-color: inherit;
|
|
||||||
highlight: inherit;
|
|
||||||
cursor: inherit;
|
|
||||||
vertical-align: 0.5;
|
|
||||||
horizontal-align: 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****----- Mode Switcher -----*****/
|
|
||||||
mode-switcher{
|
|
||||||
enabled: true;
|
|
||||||
spacing: 10px;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
border: 0px solid;
|
|
||||||
border-radius: 0px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: transparent;
|
|
||||||
text-color: @foreground-colour;
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
padding: 7px 15px 7px 10px;
|
|
||||||
border: 0px solid;
|
|
||||||
border-radius: 100%;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: @alternate-background;
|
|
||||||
text-color: inherit;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
button selected {
|
|
||||||
background-color: var(selected-normal-background);
|
|
||||||
text-color: var(selected-normal-foreground);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****----- Message -----*****/
|
|
||||||
message {
|
|
||||||
enabled: true;
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
border: 0px solid;
|
|
||||||
border-radius: 0px 0px 0px 0px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: transparent;
|
|
||||||
text-color: @foreground-colour;
|
|
||||||
}
|
|
||||||
textbox {
|
|
||||||
padding: 8px 10px;
|
|
||||||
border: 0px solid;
|
|
||||||
border-radius: 10px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: @alternate-background;
|
|
||||||
text-color: @foreground-colour;
|
|
||||||
vertical-align: 0.5;
|
|
||||||
horizontal-align: 0.0;
|
|
||||||
highlight: none;
|
|
||||||
placeholder-color: @foreground-colour;
|
|
||||||
blink: true;
|
|
||||||
markup: true;
|
|
||||||
}
|
|
||||||
error-message {
|
|
||||||
padding: 10px;
|
|
||||||
border: 2px solid;
|
|
||||||
border-radius: 10px;
|
|
||||||
border-color: @border-colour;
|
|
||||||
background-color: @background-colour;
|
|
||||||
text-color: @foreground-colour;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,44 +1,14 @@
|
|||||||
configuration {
|
/**
|
||||||
modi: "drun";
|
* ABOUTME: Rofi theme for clipboard history applet.
|
||||||
show-icons: false;
|
* ABOUTME: Wider window and more lines for browsing clipboard entries.
|
||||||
drun-display-format: "{name}";
|
**/
|
||||||
}
|
|
||||||
|
|
||||||
@import "../config.rasi"
|
|
||||||
@import "../colors.rasi"
|
|
||||||
|
|
||||||
|
@import "applet.rasi"
|
||||||
|
|
||||||
window {
|
window {
|
||||||
enabled: true;
|
|
||||||
cursor: "default";
|
|
||||||
width: 600px;
|
width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mainbox {
|
|
||||||
children: [ "message", "listview", "inputbar" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inputbar {
|
|
||||||
enabled: true;
|
|
||||||
|
|
||||||
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
listview {
|
listview {
|
||||||
enabled: true;
|
|
||||||
columns: 1;
|
|
||||||
lines: 10;
|
lines: 10;
|
||||||
cycle: true;
|
|
||||||
dynamic: true;
|
|
||||||
scrollbar: false;
|
|
||||||
layout: vertical;
|
|
||||||
reverse: false;
|
|
||||||
fixed-height: true;
|
|
||||||
fixed-columns: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
element-icon {
|
|
||||||
size: 0px;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,45 +1,11 @@
|
|||||||
configuration {
|
/**
|
||||||
modi: "drun";
|
* ABOUTME: Rofi theme for CPU governor switcher applet.
|
||||||
show-icons: false;
|
* ABOUTME: Compact window for performance/powersave/reset modes.
|
||||||
drun-display-format: "{name}";
|
**/
|
||||||
}
|
|
||||||
|
|
||||||
@import "../config.rasi"
|
|
||||||
@import "../colors.rasi"
|
|
||||||
|
|
||||||
|
@import "applet.rasi"
|
||||||
|
|
||||||
window {
|
window {
|
||||||
enabled: true;
|
|
||||||
cursor: "default";
|
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
mainbox {
|
|
||||||
children: [ "message", "listview", "inputbar" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inputbar {
|
|
||||||
enabled: true;
|
|
||||||
|
|
||||||
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
listview {
|
|
||||||
enabled: true;
|
|
||||||
columns: 1;
|
|
||||||
lines: 8;
|
|
||||||
cycle: true;
|
|
||||||
dynamic: true;
|
|
||||||
scrollbar: false;
|
|
||||||
layout: vertical;
|
|
||||||
reverse: false;
|
|
||||||
fixed-height: true;
|
|
||||||
fixed-columns: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
element-icon {
|
|
||||||
size: 0px;
|
|
||||||
}
|
}
|
||||||
@ -1,43 +1,6 @@
|
|||||||
configuration {
|
/**
|
||||||
modi: "drun";
|
* ABOUTME: Rofi theme for volume control applet.
|
||||||
show-icons: false;
|
* ABOUTME: Uses default applet layout — window width is set dynamically by the script.
|
||||||
drun-display-format: "{name}";
|
**/
|
||||||
}
|
|
||||||
|
|
||||||
@import "../config.rasi"
|
@import "applet.rasi"
|
||||||
@import "../colors.rasi"
|
|
||||||
|
|
||||||
|
|
||||||
window {
|
|
||||||
enabled: true;
|
|
||||||
cursor: "default";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
mainbox {
|
|
||||||
children: [ "message", "listview", "inputbar" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inputbar {
|
|
||||||
enabled: true;
|
|
||||||
|
|
||||||
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
listview {
|
|
||||||
enabled: true;
|
|
||||||
columns: 1;
|
|
||||||
lines: 8;
|
|
||||||
cycle: true;
|
|
||||||
dynamic: true;
|
|
||||||
scrollbar: false;
|
|
||||||
layout: vertical;
|
|
||||||
reverse: false;
|
|
||||||
fixed-height: true;
|
|
||||||
fixed-columns: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
element-icon {
|
|
||||||
size: 0px;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,45 +1,11 @@
|
|||||||
configuration {
|
/**
|
||||||
modi: "drun";
|
* ABOUTME: Rofi theme for VPN connection manager applet.
|
||||||
show-icons: false;
|
* ABOUTME: Compact window for short VPN connection list.
|
||||||
drun-display-format: "{name}";
|
**/
|
||||||
}
|
|
||||||
|
|
||||||
@import "../config.rasi"
|
|
||||||
@import "../colors.rasi"
|
|
||||||
|
|
||||||
|
@import "applet.rasi"
|
||||||
|
|
||||||
window {
|
window {
|
||||||
enabled: true;
|
|
||||||
cursor: "default";
|
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
mainbox {
|
|
||||||
children: [ "message", "listview", "inputbar" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inputbar {
|
|
||||||
enabled: true;
|
|
||||||
|
|
||||||
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
listview {
|
|
||||||
enabled: true;
|
|
||||||
columns: 1;
|
|
||||||
lines: 8;
|
|
||||||
cycle: true;
|
|
||||||
dynamic: true;
|
|
||||||
scrollbar: false;
|
|
||||||
layout: vertical;
|
|
||||||
reverse: false;
|
|
||||||
fixed-height: true;
|
|
||||||
fixed-columns: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
element-icon {
|
|
||||||
size: 0px;
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user