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"
|
||||
|
||||
* {
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
font: "Terminus 9";
|
||||
background-color: @base;
|
||||
text-color: @text;
|
||||
font: "Berkeley Mono 10";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 225px;
|
||||
padding: 25px;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
width: 225px;
|
||||
padding: 25px;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @pink;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @ac;
|
||||
expand: true;
|
||||
text-color: @text;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
configuration {
|
||||
font: "JetBrainsMono Nerd Font 10";
|
||||
font: "Berkeley Mono 10, Symbols Nerd Font Mono 10";
|
||||
show-icons: true;
|
||||
display-drun: "";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
|
@ -12,10 +12,10 @@ configuration {
|
|||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
background-color: @base;
|
||||
text-color: @text;
|
||||
border: 0px;
|
||||
border-color: @ac;
|
||||
border-color: @pink;
|
||||
border-radius: 0px;
|
||||
width: 300px;
|
||||
location: center;
|
||||
|
@ -26,23 +26,22 @@ window {
|
|||
prompt {
|
||||
enabled: true;
|
||||
padding: 0px 0px 0px 5px;
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
background-color: @base;
|
||||
text-color: @text;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 0px 0px 0px 2px;
|
||||
background-color: @al;
|
||||
text-color: @ac;
|
||||
background-color: @base;
|
||||
text-color: @pink;
|
||||
expand: false;
|
||||
str: "";
|
||||
font: "JetBrainsMono Nerd Font 10";
|
||||
str: " ";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
background-color: @base;
|
||||
text-color: @text;
|
||||
placeholder-color: @text;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
|
@ -52,18 +51,18 @@ entry {
|
|||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
background-color: @base;
|
||||
text-color: @text;
|
||||
expand: false;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
border-color: @pink;
|
||||
margin: 0px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
background-color: @base;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 5;
|
||||
|
@ -74,18 +73,18 @@ listview {
|
|||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
background-color: @base;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
border-color: @crust;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
background-color: @base;
|
||||
text-color: @text;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 8px 8px 8px -15px;
|
||||
|
@ -104,10 +103,10 @@ element-text {
|
|||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fg;
|
||||
background-color: @surface2;
|
||||
text-color: @text;
|
||||
border: 0px 0px 0px 2px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
border-color: @pink;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
dir="~/.config/rofi"
|
||||
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
|
||||
lock=" Lock"
|
||||
|
@ -14,16 +14,13 @@ shutdown=" Shutdown"
|
|||
|
||||
# Confirmation
|
||||
confirm_exit() {
|
||||
rofi -dmenu\
|
||||
-i\
|
||||
-no-fixed-num-lines\
|
||||
-p "Are You Sure? : "\
|
||||
-theme $dir/confirm.rasi
|
||||
rofi -dmenu -i -no-fixed-num-lines -p "Are You Sure? : " \
|
||||
-theme $dir/confirm.rasi -dpi 1
|
||||
}
|
||||
|
||||
# Message
|
||||
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
|
||||
|
@ -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)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3exit shutdown
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$reboot)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3exit reboot
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$lock)
|
||||
i3exit lock
|
||||
;;
|
||||
$suspend)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3exit suspend
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$logout)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3exit logout
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$shutdown)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3exit shutdown
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$reboot)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3exit reboot
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$lock)
|
||||
i3exit lock
|
||||
;;
|
||||
$suspend)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3exit suspend
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$logout)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
i3exit logout
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue