feat(rofi): style powermenu
This commit is contained in:
parent
6d68b66321
commit
5c6232c31c
3 changed files with 83 additions and 89 deletions
|
@ -3,23 +3,22 @@
|
||||||
@import "colors.rasi"
|
@import "colors.rasi"
|
||||||
|
|
||||||
* {
|
* {
|
||||||
background-color: @bga;
|
background-color: @base;
|
||||||
text-color: @fg;
|
text-color: @text;
|
||||||
font: "Terminus 9";
|
font: "Berkeley Mono 10";
|
||||||
}
|
}
|
||||||
|
|
||||||
window {
|
window {
|
||||||
width: 225px;
|
width: 225px;
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
border-color: @ac;
|
border-color: @pink;
|
||||||
location: center;
|
location: center;
|
||||||
y-offset: -2em;
|
y-offset: -2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
entry {
|
entry {
|
||||||
expand: true;
|
expand: true;
|
||||||
text-color: @ac;
|
text-color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
configuration {
|
configuration {
|
||||||
font: "JetBrainsMono Nerd Font 10";
|
font: "Berkeley Mono 10, Symbols Nerd Font Mono 10";
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
display-drun: "";
|
display-drun: "";
|
||||||
drun-display-format: "{name}";
|
drun-display-format: "{name}";
|
||||||
disable-history: false;
|
disable-history: false;
|
||||||
fullscreen: false;
|
fullscreen: false;
|
||||||
|
@ -12,10 +12,10 @@ configuration {
|
||||||
@import "colors.rasi"
|
@import "colors.rasi"
|
||||||
|
|
||||||
window {
|
window {
|
||||||
background-color: @bg;
|
background-color: @base;
|
||||||
text-color: @fg;
|
text-color: @text;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
border-color: @ac;
|
border-color: @pink;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
location: center;
|
location: center;
|
||||||
|
@ -26,23 +26,22 @@ window {
|
||||||
prompt {
|
prompt {
|
||||||
enabled: true;
|
enabled: true;
|
||||||
padding: 0px 0px 0px 5px;
|
padding: 0px 0px 0px 5px;
|
||||||
background-color: @al;
|
background-color: @base;
|
||||||
text-color: @fg;
|
text-color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
textbox-prompt-colon {
|
textbox-prompt-colon {
|
||||||
padding: 0px 0px 0px 2px;
|
padding: 0px 0px 0px 2px;
|
||||||
background-color: @al;
|
background-color: @base;
|
||||||
text-color: @ac;
|
text-color: @pink;
|
||||||
expand: false;
|
expand: false;
|
||||||
str: "";
|
str: " ";
|
||||||
font: "JetBrainsMono Nerd Font 10";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
entry {
|
entry {
|
||||||
background-color: @al;
|
background-color: @base;
|
||||||
text-color: @fg;
|
text-color: @text;
|
||||||
placeholder-color: @fg;
|
placeholder-color: @text;
|
||||||
expand: true;
|
expand: true;
|
||||||
horizontal-align: 0;
|
horizontal-align: 0;
|
||||||
placeholder: "Search...";
|
placeholder: "Search...";
|
||||||
|
@ -52,18 +51,18 @@ entry {
|
||||||
|
|
||||||
inputbar {
|
inputbar {
|
||||||
children: [ textbox-prompt-colon, prompt ];
|
children: [ textbox-prompt-colon, prompt ];
|
||||||
background-color: @bga;
|
background-color: @base;
|
||||||
text-color: @fg;
|
text-color: @text;
|
||||||
expand: false;
|
expand: false;
|
||||||
border: 0px 0px 0px 0px;
|
border: 0px 0px 0px 0px;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
border-color: @ac;
|
border-color: @pink;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
listview {
|
listview {
|
||||||
background-color: @al;
|
background-color: @base;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
columns: 1;
|
columns: 1;
|
||||||
lines: 5;
|
lines: 5;
|
||||||
|
@ -74,18 +73,18 @@ listview {
|
||||||
}
|
}
|
||||||
|
|
||||||
mainbox {
|
mainbox {
|
||||||
background-color: @al;
|
background-color: @base;
|
||||||
border: 0px;
|
border: 0px;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
border-color: @ac;
|
border-color: @crust;
|
||||||
children: [ inputbar, listview ];
|
children: [ inputbar, listview ];
|
||||||
spacing: 0px;
|
spacing: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
element {
|
element {
|
||||||
background-color: @al;
|
background-color: @base;
|
||||||
text-color: @fg;
|
text-color: @text;
|
||||||
orientation: horizontal;
|
orientation: horizontal;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
padding: 8px 8px 8px -15px;
|
padding: 8px 8px 8px -15px;
|
||||||
|
@ -104,10 +103,10 @@ element-text {
|
||||||
}
|
}
|
||||||
|
|
||||||
element selected {
|
element selected {
|
||||||
background-color: @se;
|
background-color: @surface2;
|
||||||
text-color: @fg;
|
text-color: @text;
|
||||||
border: 0px 0px 0px 2px;
|
border: 0px 0px 0px 2px;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
border-color: @ac;
|
border-color: @pink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
dir="~/.config/rofi"
|
dir="~/.config/rofi"
|
||||||
uptime=$(uptime -p | sed -e 's/up //g')
|
uptime=$(uptime -p | sed -e 's/up //g')
|
||||||
|
|
||||||
rofi_command="rofi -theme $dir/powermenu.rasi"
|
rofi_command="rofi -theme $dir/powermenu.rasi -dpi 1"
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
lock=" Lock"
|
lock=" Lock"
|
||||||
|
@ -14,16 +14,13 @@ shutdown=" Shutdown"
|
||||||
|
|
||||||
# Confirmation
|
# Confirmation
|
||||||
confirm_exit() {
|
confirm_exit() {
|
||||||
rofi -dmenu\
|
rofi -dmenu -i -no-fixed-num-lines -p "Are You Sure? : " \
|
||||||
-i\
|
-theme $dir/confirm.rasi -dpi 1
|
||||||
-no-fixed-num-lines\
|
|
||||||
-p "Are You Sure? : "\
|
|
||||||
-theme $dir/confirm.rasi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Message
|
# Message
|
||||||
msg() {
|
msg() {
|
||||||
rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
|
rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n" -dpi 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Variable passed to rofi
|
# Variable passed to rofi
|
||||||
|
@ -31,48 +28,47 @@ options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
|
||||||
|
|
||||||
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
|
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
|
||||||
case $chosen in
|
case $chosen in
|
||||||
$shutdown)
|
$shutdown)
|
||||||
ans=$(confirm_exit &)
|
ans=$(confirm_exit &)
|
||||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
i3exit shutdown
|
i3exit shutdown
|
||||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
msg
|
msg
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
$reboot)
|
$reboot)
|
||||||
ans=$(confirm_exit &)
|
ans=$(confirm_exit &)
|
||||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
i3exit reboot
|
i3exit reboot
|
||||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
msg
|
msg
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
$lock)
|
$lock)
|
||||||
i3exit lock
|
i3exit lock
|
||||||
;;
|
;;
|
||||||
$suspend)
|
$suspend)
|
||||||
ans=$(confirm_exit &)
|
ans=$(confirm_exit &)
|
||||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
i3exit suspend
|
i3exit suspend
|
||||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
msg
|
msg
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
$logout)
|
$logout)
|
||||||
ans=$(confirm_exit &)
|
ans=$(confirm_exit &)
|
||||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
i3exit logout
|
i3exit logout
|
||||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
msg
|
msg
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue