лучше не лезьте

This commit is contained in:
2024-09-22 19:29:25 +04:00
parent 94e0023367
commit de3262e579
27 changed files with 1305 additions and 421 deletions

8
rofi/colors.rasi Normal file
View File

@@ -0,0 +1,8 @@
* {
selected: #FFCC4D;
background: #353F5D;
foreground: #C8C7D1;
background-alt: #414D72;
urgent: #353F5D;
active: #FF7FA3;
}

323
rofi/launcher/app_menu.rasi Normal file
View File

@@ -0,0 +1,323 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
modi: "drun,run,filebrowser,ssh,window";
show-icons: false;
display-drun: " Apps";
display-run: " Run";
display-filebrowser: " Files";
display-window: " Windows";
display-ssh: " SSH";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
}
/*****----- Global Properties -----*****/
@import "../colors.rasi"
* {
border-colour: var(selected);
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: 800px;
x-offset: 0px;
y-offset: 0px;
/* properties for all widgets */
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 35px;
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: 20px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-colour;
background-color: transparent;
children: [ "inputbar", "message", "custombox" ];
}
/*****----- A Custom Box -----*****/
custombox {
spacing: 10px;
background-color: @background-colour;
text-color: @foreground-colour;
orientation: horizontal;
children: [ "mode-switcher", "listview" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 8px 12px;
border: 0px solid;
border-radius: 50%;
border-color: @border-colour;
background-color: @alternate-background;
text-color: @foreground-colour;
children: [ "textbox-prompt-colon", "entry" ];
}
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-colour;
background-color: transparent;
text-color: @foreground-colour;
cursor: "default";
}
scrollbar {
handle-width: 5px ;
handle-color: @handle-colour;
border-radius: 50%;
background-color: @alternate-background;
}
/*****----- Elements -----*****/
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 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: var(normal-background);
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: var(alternate-normal-background);
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;
expand: false;
orientation: vertical;
spacing: 10px;
margin: 0px;
padding: 0px 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-colour;
background-color: transparent;
text-color: @foreground-colour;
}
button {
padding: 0px 20px 0px 20px;
border: 0px solid;
border-radius: 50%;
border-color: @border-colour;
background-color: @alternate-background;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
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: 12px;
border: 0px solid;
border-radius: 8px;
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: 8px;
border-color: @border-colour;
background-color: @background-colour;
text-color: @foreground-colour;
}

3
rofi/launcher/launch.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
rofi -show drun -config ~/.config/rofi/launcher/app_menu.rasi -verbose

BIN
rofi/power/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

105
rofi/power/launch.sh Executable file
View File

@@ -0,0 +1,105 @@
#!/usr/bin/env bash
## Author : Aditya Shakya (adi1090x)
## Github : @adi1090x
#
## Rofi : Power Menu
#
## Available Styles
#
## style-1 style-2 style-3 style-4 style-5
# Current Theme
dir="$HOME/.config/rofi/power/power_menu.rasi"
# CMDs
uptime="`uptime -p | sed -e 's/up //g'`"
host=`hostname`
# Options
shutdown='⏻'
reboot=''
lock=''
suspend=''
logout=''
yes=''
no=''
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-mesg "󱑍 Uptime: $uptime" \
-theme ${dir}
}
# Confirmation CMD
confirm_cmd() {
rofi -theme-str 'window {location: center; anchor: center; fullscreen: false; width: 240px;}' \
-theme-str 'listview {columns: 2; lines: 1;}' \
-theme-str 'element-text {horizontal-align: 0.48;}' \
-theme-str 'textbox {horizontal-align: 0.5;}' \
-dmenu \
-p 'Confirmation' \
-mesg 'Are you Sure?' \
-theme ${dir}
}
# Ask for confirmation
confirm_exit() {
echo -e "$yes\n$no" | confirm_cmd
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$lock\n$suspend\n$logout\n$reboot\n$shutdown" | rofi_cmd
}
# Execute Command
run_cmd() {
selected="$(confirm_exit)"
if [[ "$selected" == "$yes" ]]; then
if [[ $1 == '--shutdown' ]]; then
loginctl poweroff
elif [[ $1 == '--reboot' ]]; then
loginctl reboot
elif [[ $1 == '--suspend' ]]; then
loginctl suspend
elif [[ $1 == '--logout' ]]; then
if [[ "$DESKTOP_SESSION" == 'openbox' ]]; then
openbox --exit
elif [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then
bspc quit
elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then
i3-msg exit
elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
fi
fi
else
exit 0
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$shutdown)
run_cmd --shutdown
;;
$reboot)
run_cmd --reboot
;;
$lock)
if [[ -x '/usr/bin/betterlockscreen' ]]; then
betterlockscreen -l
elif [[ -x '/usr/bin/i3lock' ]]; then
i3lock
fi
;;
$suspend)
run_cmd --suspend
;;
$logout)
run_cmd --logout
;;
esac

138
rofi/power/power_menu.rasi Normal file
View File

@@ -0,0 +1,138 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*
USE_BUTTONS=YES
*/
@import "../colors.rasi"
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 550px;
x-offset: 0px;
y-offset: 0px;
padding: 0px;
border: 0px solid;
border-radius: 20px;
border-color: @selected;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: 0px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @selected;
background-color: transparent;
children: [ "inputbar", "listview", "message" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
spacing: 0px;
padding: 100px 80px;
background-color: transparent;
background-image: url("/home/doryan/.config/rofi/power/bg.png", width);
children: [ "textbox-prompt-colon", "dummy","prompt"];
}
dummy {
background-color: transparent;
}
textbox-prompt-colon {
enabled: false;
expand: false;
str: "󰐥 System";
padding: 12px;
border-radius: 100%;
background-color: @selected;
text-color: @foreground;
}
prompt {
enabled: false;
padding: 12px;
border-radius: 100%;
background-color: @active;
text-color: @foreground;
}
/*****----- Listview -----*****/
listview {
enabled: true;
columns: 5;
lines: 1;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 15px;
margin: 15px;
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: 23px 10px;
border-radius: 100%;
background-color: @background-alt;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "FiraCode Nerd Font Propo 28";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: 0px 15px 15px 15px;
padding: 15px;
border-radius: 100%;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.48;
}

54
rofi/volume/launch.sh Executable file
View File

@@ -0,0 +1,54 @@
#!/usr/bin/env bash
theme_path="$HOME/.config/rofi/volume/volume_menu.rasi"
volume=''
microphone=''
pavucontrol=''
rofi_cmd() {
rofi -theme "$theme_path" -dmenu -markup-rows
}
# Microphone Info
amixer get Capture | grep '\[on\]' &>/dev/null
if [[ "$?" == 0 ]]; then
microphone=''
else
microphone=''
fi
# Microphone Info
amixer get Master | grep '\[on\]' &>/dev/null
if [[ "$?" == 0 ]]; then
volume=''
else
volume=''
fi
run_cmd() {
if [[ "$1" == '--opt1' ]]; then
amixer set Master toggle
elif [[ "$1" == '--opt2' ]]; then
amixer set Capture toggle
elif [[ "$1" == '--opt3' ]]; then
exec pavucontrol
fi
}
run() {
echo -e "$volume\n$microphone\n$pavucontrol" | rofi_cmd
}
chosen="$(run)"
case ${chosen} in
$volume)
run_cmd --opt1
;;
$microphone)
run_cmd --opt2
;;
$pavucontrol)
run_cmd --opt3
;;
esac

View File

@@ -0,0 +1,83 @@
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*
USE_BUTTONS=YES
*/
@import "../colors.rasi"
/*****----- Main Window -----*****/
window {
transparency: "real";
location: east;
anchor: east;
fullscreen: false;
width: 80px;
x-offset: -20px;
y-offset: 0px;
padding: 0px;
border: 0px solid;
border-radius: 100%;
border-color: @selected;
cursor: "default";
background-color: @background;
}
mainbox {
background-color: transparent;
children: [ "listview" ];
}
inputbar {
enable: true;
background-color: transparent;
children: [ "textbox-prompt-colon", "dummy", "prompt" ];
}
promt {
enable: false;
background-color: transparent;
}
textbox-prompt-colon {
enable: false;
background-color: transparent;
}
dummy {
background-color: transparent;
}
listview {
columns: 1;
lines: 3;
background-color: transparent;
spacing: 10px;
padding: 10px;
}
element {
background-color: @background-alt;
text-color: @foreground;
border-radius: 100%;
cursor: pointer;
padding: 15px 0;
}
element-text {
font: "FiraCode Nerd Font Propo 18";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: @selected;
text-color: @background;
}