waybar and rofi
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
allow_images=true
|
||||
gtk-dark=true
|
||||
image_size=20
|
||||
width=25%
|
||||
hide-scroll=true
|
||||
lines=7
|
||||
no_actions=true
|
||||
hide_scroll=true
|
||||
width=45%
|
||||
height=45%
|
||||
hide-scroll=true
|
||||
|
3
.config/wofi/icons/lock.svg
Normal file
3
.config/wofi/icons/lock.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ecf2f8" class="size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" />
|
||||
</svg>
|
After Width: | Height: | Size: 369 B |
3
.config/wofi/icons/power.svg
Normal file
3
.config/wofi/icons/power.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ecf2f8" class="size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5.636 5.636a9 9 0 1 0 12.728 0M12 3v9" />
|
||||
</svg>
|
After Width: | Height: | Size: 231 B |
3
.config/wofi/icons/reboot.svg
Normal file
3
.config/wofi/icons/reboot.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ecf2f8" class="size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
|
||||
</svg>
|
After Width: | Height: | Size: 360 B |
3
.config/wofi/icons/suspend.svg
Normal file
3
.config/wofi/icons/suspend.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ecf2f8" class="size-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14.25 9v6m-4.5 0V9M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
|
||||
</svg>
|
After Width: | Height: | Size: 250 B |
34
.config/wofi/scripts/powermenu.sh
Normal file
34
.config/wofi/scripts/powermenu.sh
Normal file
@ -0,0 +1,34 @@
|
||||
WOFI_CONFIG_PATH=$HOME/.config/wofi
|
||||
|
||||
menu="img:$WOFI_CONFIG_PATH/icons/power.svg:text:Power Off\nimg:$WOFI_CONFIG_PATH/icons/reboot.svg:text:Reboot\nimg:$WOFI_CONFIG_PATH/icons/lock.svg:text:Lock Screen\nimg:$WOFI_CONFIG_PATH/icons/suspend.svg:text:Suspend"
|
||||
|
||||
get_menu() {
|
||||
echo -e "$menu"
|
||||
}
|
||||
|
||||
exec_commmand() {
|
||||
cmd_str=$(echo "$1" | awk -F'text:' '{print $2}')
|
||||
|
||||
if [[ "$cmd_str" == "Power Off" ]]; then
|
||||
systemctl poweroff
|
||||
elif [[ "$cmd_str" == "Reboot" ]]; then
|
||||
systemctl reboot
|
||||
elif [[ "$cmd_str" == "Suspend" ]]; then
|
||||
systemctl suspend
|
||||
elif [[ "$cmd_str" == "Lock Screen" ]]; then
|
||||
hyprlock
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Show menu and execute command
|
||||
menu_selected=""
|
||||
if [[ "$1" == "--list" ]]; then
|
||||
menu_selected="$(get_menu | wofi -d)"
|
||||
elif [[ "$1" == "--grid" ]]; then
|
||||
menu_selected="$(get_menu | wofi -d --columns=2)"
|
||||
fi
|
||||
|
||||
if [[ "$menu_selected" != "" ]]; then
|
||||
exec_commmand "$menu_selected"
|
||||
fi
|
@ -1,39 +1,45 @@
|
||||
window {
|
||||
margin: 25px;
|
||||
#border: 1px solid #bd93f9;
|
||||
background-color: #282a36;
|
||||
}
|
||||
|
||||
#input {
|
||||
margin: 15px;
|
||||
border: none;
|
||||
color: #f8f8f2;
|
||||
background-color: #44475a;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
margin: 15px;
|
||||
border: none;
|
||||
background-color: #282a36;
|
||||
#window {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
background-color: #282a36;
|
||||
border-radius: 14px;
|
||||
background-color: #0d1117;
|
||||
}
|
||||
|
||||
#input {
|
||||
padding: 4px;
|
||||
border-radius: 14px 14px 0 0;
|
||||
font-size: 16px;
|
||||
background-color: #0d1117;
|
||||
border: none;
|
||||
color: #ecf2f8;
|
||||
}
|
||||
|
||||
#input:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
border-radius: 14px;
|
||||
background-color: #161b22;
|
||||
margin: 0 12px 12px;
|
||||
}
|
||||
|
||||
#text {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
color: #f8f8f2;
|
||||
}
|
||||
#inner-box {
|
||||
border-radius: 14px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
#entry {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #44475a;
|
||||
border-radius: 8px;
|
||||
background-color: #21262d;
|
||||
}
|
||||
|
||||
#entry image {
|
||||
margin-right: 8px;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
entries="⇠ Logout\n⏾ Suspend\n⭮ Reboot\n⏻ Shutdown"
|
||||
|
||||
selected=$(echo -e $entries|wofi --width 250 --height 240 --dmenu --cache-file /dev/null | awk '{print tolower($2)}')
|
||||
|
||||
case $selected in
|
||||
logout)
|
||||
pkill -u kia;;
|
||||
suspend)
|
||||
exec systemctl suspend;;
|
||||
reboot)
|
||||
exec systemctl reboot;;
|
||||
shutdown)
|
||||
exec systemctl poweroff;;
|
||||
# it used to be poweroff -i
|
||||
esac
|
Reference in New Issue
Block a user