This commit is contained in:
grassblock 2024-05-20 11:17:32 +08:00
parent bbcbd25e48
commit a6c06800e2
39 changed files with 1864 additions and 0 deletions

View file

@ -0,0 +1,94 @@
#!/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/scripts/powermenu/"
theme='style'
# 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 \
-p "${USER}" \
-mesg "Uptime: $uptime" \
-theme ${dir}/${theme}.rasi
}
# Confirmation CMD
confirm_cmd() {
rofi -dmenu \
-p 'Confirmation' \
-mesg 'Are you Sure?' \
-theme ${dir}/shared/confirm.rasi
}
# 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
systemctl poweroff
elif [[ $1 == '--reboot' ]]; then
systemctl reboot
elif [[ $1 == '--suspend' ]]; then
mpc -q pause
amixer set Master mute
systemctl suspend
elif [[ $1 == '--logout' ]]; then
loginctl terminate-session ${XDG_SESSION_ID-}
#hyprctl dispatch exit #only works for hyprland, the loginctl Command seems a little buggy
fi
else
exit 0
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$shutdown)
run_cmd --shutdown
;;
$reboot)
run_cmd --reboot
;;
$lock)
loginctl lock-session ${XDG_SESSION_ID-}
;;
$suspend)
run_cmd --suspend
;;
$logout)
run_cmd --logout
;;
esac

View file

@ -0,0 +1,18 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
*
* Available Colors Schemes
*
* adapta catppuccin everforest navy paper
* arc cyberpunk gruvbox nord solarized
* black dracula lovelace onedark yousai
*
**/
/* Import color-scheme from `colors` directory */
@import "./colors/nord.rasi"

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #222D32FF;
background-alt: #29353BFF;
foreground: #B8C2C6FF;
selected: #00BCD4FF;
active: #21FF90FF;
urgent: #FF4B60FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #2F343FFF;
background-alt: #383C4AFF;
foreground: #BAC5D0FF;
selected: #5294E2FF;
active: #98C379FF;
urgent: #E06B74FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #000000FF;
background-alt: #101010FF;
foreground: #FFFFFFFF;
selected: #62AEEFFF;
active: #98C379FF;
urgent: #E06B74FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #1E1D2FFF;
background-alt: #282839FF;
foreground: #D9E0EEFF;
selected: #7AA2F7FF;
active: #ABE9B3FF;
urgent: #F28FADFF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #000B1EFF;
background-alt: #0A1528FF;
foreground: #0ABDC6FF;
selected: #0ABDC6FF;
active: #00FF00FF;
urgent: #FF0000FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #1E1F29FF;
background-alt: #282A36FF;
foreground: #FFFFFFFF;
selected: #BD93F9FF;
active: #50FA7BFF;
urgent: #FF5555FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #323D43FF;
background-alt: #3C474DFF;
foreground: #DAD1BEFF;
selected: #7FBBB3FF;
active: #A7C080FF;
urgent: #E67E80FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #282828FF;
background-alt: #353535FF;
foreground: #EBDBB2FF;
selected: #83A598FF;
active: #B8BB26FF;
urgent: #FB4934FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #1D1F28FF;
background-alt: #282A36FF;
foreground: #FDFDFDFF;
selected: #79E6F3FF;
active: #5ADECDFF;
urgent: #F37F97FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #021B21FF;
background-alt: #0C252BFF;
foreground: #F2F1B9FF;
selected: #44B5B1FF;
active: #7CBF9EFF;
urgent: #C2454EFF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #2E3440FF;
background-alt: #383E4AFF;
foreground: #E5E9F0FF;
selected: #81A1C1FF;
active: #A3BE8CFF;
urgent: #BF616AFF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #1E2127FF;
background-alt: #282B31FF;
foreground: #FFFFFFFF;
selected: #61AFEFFF;
active: #98C379FF;
urgent: #E06C75FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #F1F1F1FF;
background-alt: #E0E0E0FF;
foreground: #252525FF;
selected: #008EC4FF;
active: #10A778FF;
urgent: #C30771FF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #002B36FF;
background-alt: #073642FF;
foreground: #EEE8D5FF;
selected: #268BD2FF;
active: #859900FF;
urgent: #DC322FFF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Levi Lacoss (fishyfishfish55)
* Github : @fishyfishfish55
*
* Colors
**/
* {
background: #15161EFF;
background-alt: #1A1B26FF;
foreground: #C0CAF5FF;
selected: #33467CFF;
active: #414868FF;
urgent: #F7768EFF;
}

View file

@ -0,0 +1,16 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
**/
* {
background: #F5E7DEFF;
background-alt: #EBDCD2FF;
foreground: #34302DFF;
selected: #D97742FF;
active: #BF8F60FF;
urgent: #B23636FF;
}

View file

@ -0,0 +1,93 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "colors.rasi"
@import "fonts.rasi"
/*****----- Main Window -----*****/
window {
location: center;
anchor: center;
fullscreen: false;
width: 500px;
border-radius: 20px;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
spacing: 30px;
padding: 30px;
background-color: transparent;
children: [ "message", "listview" ];
}
/*****----- Message -----*****/
message {
margin: 0px;
padding: 20px;
border-radius: 20px;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
placeholder-color: @foreground;
blink: true;
markup: true;
}
/*****----- Listview -----*****/
listview {
columns: 2;
lines: 1;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 30px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
/*****----- Elements -----*****/
element {
padding: 60px 10px;
border-radius: 20px;
background-color: @background-alt;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 48";
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);
}

View file

@ -0,0 +1,12 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Fonts
*
**/
* {
font: "JetBrains Mono Nerd Font 12";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

View file

@ -0,0 +1,142 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
* {
/* Resolution : 1920x1080 */
mainbox-spacing: 50px;
mainbox-margin: 0px 300px;
message-margin: 0px 350px;
message-padding: 15px;
message-border-radius: 100%;
listview-spacing: 25px;
element-padding: 40px 40px;
element-border-radius: 100%;
prompt-font: "Sarasa UI SC Nerd Font Bold 32";
textbox-font: "Sarasa Mono SC Nerd Font 12";
element-text-font : "Sarasa Mono SC Nerd Font 24";
background-normal: white/10%;
background-selected: white/20%;
foreground-normal: white;
foreground-selected: white;
}
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: true;
cursor: "default";
background-color: #2E3440CC;
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: var(mainbox-spacing);
margin: var(mainbox-margin);
background-color: transparent;
children: [ "dummy", "userimage", "inputbar", "listview", "message", "dummy" ];
}
/*****----- User -----*****/
userimage {
width: 350px;
height: 350px;
margin: 0px 390px;
border: 2px;
border-radius: 100%;
border-color: white;
background-color: transparent;
background-image: url("./shared/images/user.jpeg", height);
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
background-color: transparent;
children: [ "dummy", "prompt", "dummy"];
}
dummy {
background-color: transparent;
}
prompt {
enabled: true;
font: var(prompt-font);
background-color: transparent;
text-color: var(foreground-normal);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: var(message-margin);
padding: var(message-padding);
border-radius: var(message-border-radius);
background-color: var(background-normal);
text-color: var(foreground-normal);
}
textbox {
font: var(textbox-font);
background-color: transparent;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
/*****----- Listview -----*****/
listview {
enabled: true;
expand: false;
columns: 5;
lines: 1;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: var(listview-spacing);
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: var(element-padding);
border-radius: var(element-border-radius);
background-color: var(background-normal);
text-color: var(foreground-normal);
cursor: pointer;
}
element-text {
font: var(element-text-font);
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: var(background-selected);
text-color: var(foreground-selected);
}