Added type-4 powermenu

This commit is contained in:
adi1090x 2022-08-15 20:59:34 +05:30
parent f363a6c6be
commit 16f08d45a8
10 changed files with 939 additions and 0 deletions

BIN
files/images/user.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

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/powermenu/type-4"
theme='style-5'
# 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 "Goodbye ${USER}" \
-mesg "Uptime: $uptime" \
-select $lock \
-theme ${dir}/${theme}.rasi
}
# Confirmation CMD
confirm_cmd() {
rofi -dmenu \
-p 'Confirmation' \
-mesg 'Are you Sure?' \
-select $yes \
-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
if [[ "$DESKTOP_SESSION" == 'openbox' ]]; then
openbox --exit
elif [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then
bspc quit
elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then
i3-msg exit
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

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 "~/.config/rofi/colors/onedark.rasi"

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";
}

View File

@ -0,0 +1,131 @@
/**
*
* 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: 100px;
mainbox-margin: 100px 300px;
message-margin: 0px 400px;
message-padding: 15px;
message-border-radius: 100%;
listview-spacing: 50px;
element-padding: 55px 60px;
element-border-radius: 100%;
prompt-font: "JetBrains Mono Nerd Font Bold Italic 64";
textbox-font: "JetBrains Mono Nerd Font 16";
element-text-font: "feather 64";
background-window: black/5%;
background-normal: white/5%;
background-selected: white/15%;
foreground-normal: white;
foreground-selected: white;
}
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: true;
cursor: "default";
background-color: var(background-window);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: var(mainbox-spacing);
margin: var(mainbox-margin);
background-color: transparent;
children: [ "dummy", "inputbar", "listview", "message", "dummy" ];
}
/*****----- 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);
}

View File

@ -0,0 +1,131 @@
/**
*
* 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: 100px;
mainbox-margin: 150px 400px;
message-margin: 0px 350px;
message-padding: 15px;
message-border-radius: 15px;
listview-spacing: 50px;
element-padding: 35px 40px;
element-border-radius: 20px;
prompt-font: "Iosevka Nerd Font Bold 72";
textbox-font: "Iosevka Nerd Font 14";
element-text-font: "feather 64";
background-window: black/30%;
background-normal: white/5%;
background-selected: white/15%;
foreground-normal: white;
foreground-selected: white;
}
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: true;
cursor: "default";
background-color: var(background-window);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: var(mainbox-spacing);
margin: var(mainbox-margin);
background-color: transparent;
children: [ "dummy", "inputbar", "listview", "message", "dummy" ];
}
/*****----- 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);
}

View File

@ -0,0 +1,133 @@
/**
*
* 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: 50px;
message-margin: 0px 300px;
message-padding: 12px;
message-border-radius: 12px;
listview-spacing: 25px;
element-padding: 35px 0px;
element-border-radius: 60px;
prompt-font: "Iosevka Nerd Font Bold 48";
textbox-font: "Iosevka Nerd Font 12";
element-text-font: "feather 48";
background-window: black/20%;
background-normal: white/5%;
background-selected: white/15%;
foreground-normal: white;
foreground-selected: white;
}
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 1000px;
border-radius: 50px;
cursor: "default";
background-color: var(background-window);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: var(mainbox-spacing);
margin: var(mainbox-margin);
background-color: transparent;
children: [ "dummy", "inputbar", "listview", "message", "dummy" ];
}
/*****----- 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);
}

View File

@ -0,0 +1,153 @@
/**
*
* 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: 100px;
mainbox-margin: 150px 400px;
message-margin: 0px 350px;
message-padding: 20px;
message-border-radius: 100%;
listview-spacing: 50px;
element-padding: 35px 40px;
element-border-radius: 80px;
prompt-font: "Iosevka Nerd Font Bold Italic 72";
textbox-font: "Iosevka Nerd Font 16";
element-text-font: "feather Bold 64";
/* Gradients */
gradient-1: linear-gradient(45, #1E98FD, #06FDA5);
gradient-2: linear-gradient(0, #F971C6, #7A72EC);
gradient-3: linear-gradient(70, #FFD56F, #FF6861);
gradient-4: linear-gradient(135, #44C6FA, #3043A1);
gradient-5: linear-gradient(to left, #bdc3c7, #2c3e50);
gradient-6: linear-gradient(to right, #0F2027, #203A43, #2C5364);
gradient-7: linear-gradient(to top, #12c2e9, #c471ed, #f64f59);
gradient-8: linear-gradient(to bottom, #FF0099, #493240);
gradient-9: linear-gradient(0, #1a2a6c, #b21f1f, #fdbb2d);
gradient-10: linear-gradient(0, #283c86, #45a247);
gradient-11: linear-gradient(0, #77A1D3, #79CBCA, #E684AE);
gradient-12: linear-gradient(0, #ff6e7f, #bfe9ff);
gradient-13: linear-gradient(0, #D31027, #EA384D);
gradient-14: linear-gradient(0, #DA22FF, #9733EE);
gradient-15: linear-gradient(0, #1D976C, #93F9B9);
gradient-16: linear-gradient(0, #232526, #414345);
gradient-17: linear-gradient(0, #833ab4, #fd1d1d, #fcb045);
gradient-18: linear-gradient(0, #667db6, #0082c8, #0082c8, #667db6);
gradient-19: linear-gradient(0, #03001e, #7303c0, #ec38bc, #fdeff9);
gradient-20: linear-gradient(0, #780206, #061161);
background-window: var(gradient-19);
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-image: var(background-window);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: var(mainbox-spacing);
margin: var(mainbox-margin);
background-color: transparent;
children: [ "dummy", "inputbar", "listview", "message", "dummy" ];
}
/*****----- 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);
}

View File

@ -0,0 +1,163 @@
/**
*
* 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 470px;
message-margin: 0px 350px;
message-padding: 15px;
message-border-radius: 100%;
listview-spacing: 25px;
element-padding: 45px 40px;
element-border-radius: 100%;
prompt-font: "Iosevka Nerd Font Bold 32";
textbox-font: "Iosevka Nerd Font 12";
element-text-font: "feather Bold 48";
/* Gradients */
gradient-1: linear-gradient(45, #1E98FD, #06FDA5);
gradient-2: linear-gradient(0, #F971C6, #7A72EC);
gradient-3: linear-gradient(70, #FFD56F, #FF6861);
gradient-4: linear-gradient(135, #44C6FA, #3043A1);
gradient-5: linear-gradient(to left, #bdc3c7, #2c3e50);
gradient-6: linear-gradient(to right, #0F2027, #203A43, #2C5364);
gradient-7: linear-gradient(to top, #12c2e9, #c471ed, #f64f59);
gradient-8: linear-gradient(to bottom, #FF0099, #493240);
gradient-9: linear-gradient(0, #1a2a6c, #b21f1f, #fdbb2d);
gradient-10: linear-gradient(0, #283c86, #45a247);
gradient-11: linear-gradient(0, #77A1D3, #79CBCA, #E684AE);
gradient-12: linear-gradient(0, #ff6e7f, #bfe9ff);
gradient-13: linear-gradient(0, #D31027, #EA384D);
gradient-14: linear-gradient(0, #DA22FF, #9733EE);
gradient-15: linear-gradient(0, #1D976C, #93F9B9);
gradient-16: linear-gradient(0, #232526, #414345);
gradient-17: linear-gradient(0, #833ab4, #fd1d1d, #fcb045);
gradient-18: linear-gradient(0, #667db6, #0082c8, #0082c8, #667db6);
gradient-19: linear-gradient(0, #03001e, #7303c0, #ec38bc, #fdeff9);
gradient-20: linear-gradient(0, #780206, #061161);
background-window: var(gradient-6);
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-image: var(background-window);
}
/*****----- 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 {
margin: 0px 400px;
border: 2px;
border-radius: 100%;
border-color: white;
background-color: transparent;
background-image: url("~/.config/rofi/images/user.jpeg", both);
}
/*****----- 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);
}