feature: style update, waybar update, funny fastfetch update and other fixes

This commit is contained in:
2026-06-19 13:57:23 +03:00
parent 9d23965acc
commit 50d5c4fbd9
222 changed files with 8109 additions and 1219 deletions
-1
View File
@@ -1,4 +1,3 @@
- [ ] Add more VPNs to vpn-manager
- [ ] Don't request password when connecting to public network
- [ ] Add separator for power-menu?
+20 -286
View File
@@ -1,302 +1,36 @@
// Imports
@import "./themes/colors.rasi"
@import "./themes/fonts.rasi"
@import "./themes/theme.rasi"
@import "./themes/options.rasi"
// Configuration
configuration {
modi: "clipboard";
show-icons: true;
display-clipboard: "󰅌 Clipboard";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
terminal: "kitty";
// binds
kb-row-up: "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";
kb-row-down: "Down,Control+j";
kb-accept-entry: "Control+m,Return,KP_Enter";
terminal: "mate-terminal";
kb-remove-to-eol: "Control+Shift+e";
kb-mode-complete: "Control+Shift+t";
kb-mode-next: "Shift+Right,Control+Tab,Control+l";
kb-mode-previous: "Shift+Left,Control+Shift+Tab,Control+h";
kb-remove-char-back: "BackSpace";
}
// Global Properties
@import "./themes/colors.rasi"
@import "./themes/fonts.rasi"
* {
border-color: var(border);
handle-color: var(selected);
background-color: var(background);
foreground-color: 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(sel-foreground);
selected-normal-background: var(selected);
selected-normal-foreground: var(sel-foreground);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(sel-foreground);
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
// Whole window
window {
// properties for window widget
orientation: horizontal;
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 440px;
x-offset: 0px;
y-offset: 0px;
// properties for all widgets
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
cursor: "default";
// Backgroud Colors
background-color: @background-color;
}
// Main Box
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 15px;
border-color: @border-color;
background-color: transparent;
transparency : "real";
children: [ "inputbar", "message", "listview" ];
}
// Inputbar
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
width: 1660px;
padding: 0 630px 0px 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px;
expand: false;
str: " ";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
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: true;
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-color;
background-color: transparent;
text-color: @foreground-color;
cursor: "default";
}
scrollbar {
handle-width: 6px;
handle-color: @handle-color;
border-radius: 10px;
background-color: @alternate-background;
children: [icon-current-entry, mainbox];
}
// Elements
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
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(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: transparent;
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
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-color;
background-color: transparent;
text-color: @foreground-color;
}
button {
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
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-color;
background-color: transparent;
text-color: @foreground-color;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @alternate-background;
text-color: @foreground-color;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-color;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @background-color;
text-color: @foreground-color;
// Screenshot icon box
icon-current-entry {
expand: false;
horizontal-align: 1;
vertical-align: 0.5;
size: 625px;
background-color: transparent;
}
+302
View File
@@ -0,0 +1,302 @@
// Configuration
configuration {
modi: "clipboard";
show-icons: true;
display-clipboard: "󰅌 Clipboard";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
terminal: "kitty";
// binds
kb-row-up: "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";
kb-row-down: "Down,Control+j";
kb-accept-entry: "Control+m,Return,KP_Enter";
terminal: "mate-terminal";
kb-remove-to-eol: "Control+Shift+e";
kb-mode-complete: "Control+Shift+t";
kb-mode-next: "Shift+Right,Control+Tab,Control+l";
kb-mode-previous: "Shift+Left,Control+Shift+Tab,Control+h";
kb-remove-char-back: "BackSpace";
}
// Global Properties
@import "./themes/colors.rasi"
@import "./themes/fonts.rasi"
* {
border-color: var(border);
handle-color: var(selected);
background-color: var(background);
foreground-color: 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(sel-foreground);
selected-normal-background: var(selected);
selected-normal-foreground: var(sel-foreground);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(sel-foreground);
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: 440px;
x-offset: 0px;
y-offset: 0px;
// properties for all widgets
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
cursor: "default";
// Backgroud Colors
background-color: @background-color;
}
// Main Box
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 15px;
border-color: @border-color;
background-color: transparent;
transparency : "real";
children: [ "inputbar", "message", "listview" ];
}
// Inputbar
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px;
expand: false;
str: " ";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
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: true;
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-color;
background-color: transparent;
text-color: @foreground-color;
cursor: "default";
}
scrollbar {
handle-width: 6px;
handle-color: @handle-color;
border-radius: 10px;
background-color: @alternate-background;
}
// Elements
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
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(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: transparent;
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
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-color;
background-color: transparent;
text-color: @foreground-color;
}
button {
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
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-color;
background-color: transparent;
text-color: @foreground-color;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @alternate-background;
text-color: @foreground-color;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-color;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @background-color;
text-color: @foreground-color;
}
+7 -294
View File
@@ -1,3 +1,10 @@
// Imports
@import "./themes/colors.rasi"
@import "./themes/fonts.rasi"
@import "./themes/theme.rasi"
@import "./themes/options.rasi"
// Configuration
configuration {
modi: "drun,window";
@@ -6,298 +13,4 @@ configuration {
display-window: " ";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
terminal: "kitty";
// binds
kb-row-up: "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";
kb-row-down: "Down,Control+j";
kb-accept-entry: "Control+m,Return,KP_Enter";
terminal: "mate-terminal";
kb-remove-to-eol: "Control+Shift+e";
kb-mode-complete: "Control+Shift+t";
kb-mode-next: "Shift+Right,Control+Tab,Control+l";
kb-mode-previous: "Shift+Left,Control+Shift+Tab,Control+h";
kb-remove-char-back: "BackSpace";
}
// Global Properties
@import "./themes/colors.rasi"
@import "./themes/fonts.rasi"
* {
border-color: var(border);
handle-color: var(selected);
background-color: var(background);
foreground-color: 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(sel-foreground);
selected-normal-background: var(selected);
selected-normal-foreground: var(sel-foreground);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(sel-foreground);
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: 400px;
x-offset: 0px;
y-offset: 0px;
// properties for all widgets
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
cursor: "default";
// Backgroud Colors
background-color: @background-color;
}
// Main Box
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 15px;
border-color: @border-color;
background-color: transparent;
transparency: "real";
children: [ "inputbar", "message", "listview" ];
}
// Inputbar
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px;
expand: false;
str: " ";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
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: true;
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-color;
background-color: transparent;
text-color: @foreground-color;
cursor: "default";
}
scrollbar {
handle-width: 6px;
handle-color: @handle-color;
border-radius: 10px;
background-color: @alternate-background;
}
// Elements
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
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(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: transparent;
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
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-color;
background-color: transparent;
text-color: @foreground-color;
}
button {
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
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-color;
background-color: transparent;
text-color: @foreground-color;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @alternate-background;
text-color: @foreground-color;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-color;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @background-color;
text-color: @foreground-color;
}
+96
View File
@@ -0,0 +1,96 @@
#!/bin/bash
# Checking if programms are available
case x"$@" in
x" Stop wireguard")
coproc (wg-quick down wg0 >/dev/null 2>&1) &
exit 0
;;
x" Start wireguard")
coproc (wg-quick up wg0 >/dev/null 2>&1) &
exit 0
;;
x" Stop netbird")
coproc (netbird down >/dev/null 2>&1) &
exit 0
;;
x" Start netbird")
coproc (netbird up >/dev/null 2>&1) &
exit 0
;;
x" Stop sing-box")
coproc (sudo systemctl stop sing-box >/dev/null 2>&1) &
exit 0
;;
x" Start sing-box")
coproc (sudo systemctl start sing-box >/dev/null 2>&1) &
exit 0
;;
esac
# Checking if programms are installed
wireguard_installed=true
if ! command -v wg-quick >/dev/null 2>&1; then
wireguard_installed=false
else
wireguard_installed=true
fi
netbird_installed=true
if ! command -v netbird >/dev/null 2>&1; then
netbird_installed=false
else
netbird_installed=true
fi
sing_box_installed=true
if ! systemctl list-unit-files -q sing-box.service >/dev/null 2>&1; then
sing_box_installed=false
else
sing_box_installed=true
fi
# active param
active="\0active\x1f"
# wireguard
if $wireguard_installed; then
wireguard_status=$(sudo wg show interfaces)
if [ "$wireguard_status" != "wg0" ]; then
echo " Start wireguard"
else
active+="0"
echo " Stop wireguard"
fi
else
echo " Wireguard not installed"
fi
# netbird
if $netbird_installed; then
netbird_status=""
if timeout 0.3 netbird status >/dev/null 2>&1; then
netbird_status=$(netbird status | grep "Networks" | cut -d: -f2 | sed "s/ -//")
fi
if [ -z "$netbird_status" ]; then
echo " Start netbird"
else
active+="1"
echo " Stop netbird"
fi
else
echo " Netbird not installed"
fi
# sing-box
if $sing_box_installed; then
if systemctl status sing-box >/dev/null 2>&1; then
active+="2"
echo " Stop sing-box"
else
echo " Start sing-box"
fi
else
echo " Sing-box not installed"
fi
echo -en "$active\n"
+105 -78
View File
@@ -1,96 +1,123 @@
#!/bin/bash
# Checking if programms are available
case x"$@" in
x" Stop wireguard")
coproc (wg-quick down wg0 >/dev/null 2>&1) &
exit 0
;;
x" Start wireguard")
coproc (wg-quick up wg0 >/dev/null 2>&1) &
exit 0
;;
x" Stop netbird")
coproc (netbird down >/dev/null 2>&1) &
exit 0
;;
x" Start netbird")
coproc (netbird up >/dev/null 2>&1) &
exit 0
;;
x" Stop sing-box")
coproc (sudo systemctl stop sing-box >/dev/null 2>&1) &
exit 0
;;
x" Start sing-box")
coproc (sudo systemctl start sing-box >/dev/null 2>&1) &
exit 0
;;
# Wireguard configs dir
WG_CONF_DIR="$HOME/.wireguard"
# Action handler
case "$@" in
*'Stop wireguard ('*')')
iface="${@##*Stop wireguard (}"
iface="${iface%')'*}"
if [[ "$iface" == "/etc" ]]; then
conf="/etc/wireguard/wg0.conf"
else
conf="$WG_CONF_DIR/$iface.conf"
fi
coproc (wg-quick down "$conf" >/dev/null 2>&1) &
exit 0
;;
*'Start wireguard ('*')')
iface="${@##*Start wireguard (}"
iface="${iface%')'*}"
if [[ "$iface" == "/etc" ]]; then
conf="/etc/wireguard/wg0.conf"
else
conf="$WG_CONF_DIR/$iface.conf"
fi
coproc (wg-quick up "$conf" >/dev/null 2>&1) &
exit 0
;;
*'Stop netbird'*)
coproc (netbird down >/dev/null 2>&1) &
exit 0
;;
*'Start netbird'*)
coproc (netbird up >/dev/null 2>&1) &
exit 0
;;
*'Stop sing-box'*)
coproc (sudo systemctl stop sing-box >/dev/null 2>&1) &
exit 0
;;
*'Start sing-box'*)
coproc (sudo systemctl start sing-box >/dev/null 2>&1) &
exit 0
;;
esac
# Checking if programms are installed
wireguard_installed=true
if ! command -v wg-quick >/dev/null 2>&1; then
wireguard_installed=false
else
wireguard_installed=true
# Find wireguard configs
wg_configs=()
if [ -d "$WG_CONF_DIR" ]; then
for conf in "$WG_CONF_DIR"/*.conf; do
[ -f "$conf" ] && wg_configs+=("$conf")
done
fi
netbird_installed=true
if ! command -v netbird >/dev/null 2>&1; then
netbird_installed=false
else
netbird_installed=true
fi
sing_box_installed=true
if ! systemctl list-unit-files -q sing-box.service >/dev/null 2>&1; then
sing_box_installed=false
else
sing_box_installed=true
fi
# active param
active="\0active\x1f"
# Build menu
index=0
active_indices=()
# wireguard
if $wireguard_installed; then
wireguard_status=$(sudo wg show interfaces)
if [ "$wireguard_status" != "wg0" ]; then
echo " Start wireguard"
else
active+="0"
echo " Stop wireguard"
fi
if command -v wg-quick >/dev/null 2>&1; then
if [ ${#wg_configs[@]} -gt 0 ]; then
for conf in "${wg_configs[@]}"; do
iface=$(basename "$conf" .conf)
if sudo wg show "$iface" &>/dev/null; then
echo " Stop wireguard ($iface)"
active_indices+=($index)
else
echo " Start wireguard ($iface)"
fi
((index++))
done
else
# use /etc/wireguard/wg0.conf if no files found
if sudo wg show wg0 &>/dev/null; then
echo " Stop wireguard (/etc)"
active_indices+=($index)
else
echo " Start wireguard (/etc)"
fi
((index++))
fi
else
echo " Wireguard not installed"
echo " Wireguard not installed"
((index++))
fi
# netbird
if $netbird_installed; then
netbird_status=""
if timeout 0.3 netbird status >/dev/null 2>&1; then
netbird_status=$(netbird status | grep "Networks" | cut -d: -f2 | sed "s/ -//")
fi
if [ -z "$netbird_status" ]; then
echo " Start netbird"
else
active+="1"
echo " Stop netbird"
fi
if command -v netbird >/dev/null 2>&1; then
netbird_status=""
if timeout 0.3 netbird status >/dev/null 2>&1; then
netbird_status=$(netbird status | grep "Networks" | cut -d: -f2 | sed "s/ -//")
fi
if [ -z "$netbird_status" ]; then
echo " Start netbird"
else
echo " Stop netbird"
active_indices+=($index)
fi
((index++))
else
echo " Netbird not installed"
echo " Netbird not installed"
((index++))
fi
# sing-box
if $sing_box_installed; then
if systemctl status sing-box >/dev/null 2>&1; then
active+="2"
echo " Stop sing-box"
else
echo " Start sing-box"
fi
if systemctl list-unit-files -q sing-box.service >/dev/null 2>&1; then
if systemctl status sing-box >/dev/null 2>&1; then
echo " Stop sing-box"
active_indices+=($index)
else
echo " Start sing-box"
fi
((index++))
else
echo " Sing-box not installed"
echo " Sing-box not installed"
((index++))
fi
echo -en "$active\n"
# Tell rofi which lines are active
if [ ${#active_indices[@]} -gt 0 ]; then
active_str=$(printf "%s" "${active_indices[@]}")
echo -en "\0active\x1f$active_str\n"
fi
+16
View File
@@ -0,0 +1,16 @@
// Configuration
configuration {
// options
terminal: "kitty";
// binds
kb-row-up: "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";
kb-row-down: "Down,Control+j";
kb-accept-entry: "Control+m,Return,KP_Enter";
terminal: "mate-terminal";
kb-remove-to-eol: "Control+Shift+e";
kb-mode-complete: "Control+Shift+t";
kb-mode-next: "Shift+Right,Control+Tab,Control+l";
kb-mode-previous: "Shift+Left,Control+Shift+Tab,Control+h";
kb-remove-char-back: "BackSpace";
}
+279
View File
@@ -0,0 +1,279 @@
// Colors
* {
border-color: var(border);
handle-color: var(selected);
background-color: var(background);
foreground-color: 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(sel-foreground);
selected-normal-background: var(selected);
selected-normal-foreground: var(sel-foreground);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(sel-foreground);
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);
}
// Base Window
window {
// properties for window widget
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 400px;
x-offset: 0px;
y-offset: 0px;
// properties for all widgets
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 4px;
border-color: @border-color;
cursor: "default";
// Backgroud Colors
background-color: @background-color;
}
// Main Box
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 2px solid;
border-radius: 2px;
border-color: @border-color;
background-color: @background-color;
transparency: "real";
children: [ "inputbar", "message", "listview" ];
}
// Inputbar
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px;
expand: false;
str: " ";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
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: true;
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-color;
background-color: transparent;
text-color: @foreground-color;
cursor: "default";
}
scrollbar {
handle-width: 6px;
handle-color: @handle-color;
border-radius: 10px;
background-color: @alternate-background;
}
// Elements
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
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(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: transparent;
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
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-color;
background-color: transparent;
text-color: @foreground-color;
}
button {
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
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-color;
background-color: transparent;
text-color: @foreground-color;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @alternate-background;
text-color: @foreground-color;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-color;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @background-color;
text-color: @foreground-color;
}