Bohdan's terminal configuration

added custom poweroff widget

bpavuk 4e1127d2 e61d4fc4

Changed files
+153 -21
window_manager
.config
+53
window_manager/.config/eww/eww.scss
··· 1 + // general styling 2 + 3 + * { 4 + font-family: JetBrainsMono Nerd Font Mono; 5 + } 6 + 7 + label, button, .powerbutton { 8 + padding: 0px; 9 + min-width: 0px; 10 + min-height: 0px; 11 + } 12 + 13 + .powermenu, .powerbutton { 14 + background-color: #000000; 15 + } 16 + 17 + button { 18 + background-image: none; 19 + border-radius: 10px; 20 + border-width: 3px; 21 + margin: 4pt; 22 + } 23 + 24 + .powerbutton label { 25 + font-size: 4em; 26 + } 27 + 28 + // button-specific 29 + 30 + $poweroff_color: #03624c; 31 + $reboot_color: #2cc295; 32 + $suspend_color: #00df81; 33 + $logout_color: #f1f7f6; 34 + 35 + .poweroff { 36 + border-color: $poweroff_color; 37 + color: $poweroff_color; 38 + } 39 + 40 + .reboot { 41 + border-color: $reboot_color; 42 + color: $reboot_color; 43 + } 44 + 45 + .suspend { 46 + border-color: $suspend_color; 47 + color: $suspend_color; 48 + } 49 + 50 + .logout { 51 + border-color: $logout_color; 52 + color: $logout_color; 53 + }
+72
window_manager/.config/eww/eww.yuck
··· 1 + (defwindow powermenu 2 + :monitor 0 3 + :stacking "fg" 4 + :exclusive false 5 + :focusable false 6 + :geometry (geometry 7 + :width "15%" 8 + :height "30%" 9 + :anchor "top right") 10 + (powermenu_layout)) 11 + 12 + (defwidget powermenu_layout [] 13 + (box :orientation "v" :class "powermenu_layout" 14 + :vexpand true 15 + (box :orientation "h" :class "powermenu_row_1" 16 + :vexpand true 17 + (poweroff) 18 + (reboot) 19 + ) 20 + 21 + (box :orientation "h" :class "powermenu_row_2" 22 + (suspend) 23 + (logout) 24 + ) 25 + ) 26 + ) 27 + 28 + 29 + (defwidget poweroff [] 30 + (box :orientation "v" :space-evenly false 31 + (button :onclick "notify-send Power-Off!" 32 + :vexpand true 33 + :class "poweroff powerbutton" 34 + :onclick "systemctl poweroff" 35 + (label :text "")) 36 + (label :text "отключить" :valign "start") 37 + ) 38 + ) 39 + 40 + (defwidget reboot [] 41 + (box :orientation "v" :space-evenly false 42 + (button :onclick "notify-send Reboot!" 43 + :vexpand true 44 + :class "reboot powerbutton" 45 + :onclick "systemctl reboot" 46 + (label :text "󰑓")) 47 + (label :text "перезагруз" :valign "start") 48 + ) 49 + ) 50 + 51 + (defwidget suspend [] 52 + (box :orientation "v" :space-evenly false 53 + (button :onclick "notify-send Suspend!" 54 + :vexpand true 55 + :class "suspend powerbutton" 56 + :onclick "systemctl suspend" 57 + (label :text "")) 58 + (label :text "сон" :valign "start") 59 + ) 60 + ) 61 + 62 + (defwidget logout [] 63 + (box :orientation "v" :space-evenly false 64 + (button :onclick "notify-send Logout!" 65 + :vexpand true 66 + :class "logout powerbutton" 67 + :onclick "loginctl kill-session $XDG_SESSION_ID" 68 + (label :text "󰗽")) 69 + (label :text "выйти" :valign "start") 70 + ) 71 + ) 72 +
+5 -1
window_manager/.config/hypr/hyprland/autostart.conf
··· 7 7 exec-once = uwsm app -- /etc/xdg/autostart/blueman.desktop 8 8 9 9 # anti-RSI 10 - exec-once = uwsm app -- /usr/bin/safeeyes 10 + exec-once = uwsm app -- safeeyes 11 + 12 + # eww 13 + exec-once = eww daemon 14 +
+3 -20
window_manager/.config/waybar/config.jsonc
··· 34 34 "default": "" 35 35 } 36 36 }, 37 - "keyboard-state": { 38 - "numlock": true, 39 - "capslock": true, 40 - "format": "{name} {icon}", 41 - "format-icons": { 42 - "locked": "", 43 - "unlocked": "" 44 - } 45 - }, 46 37 "tray": { 47 38 // "icon-size": 21, 48 39 "spacing": 10 ··· 50 41 "clock": { 51 42 // "timezone": "America/New_York", 52 43 "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", 53 - "format-alt": "{:%Y-%m-%d}" 44 + "format-alt": "{:%d.%m.%Y}" 54 45 }, 55 46 "network": { 56 47 // "interface": "wlp2*", // (Optional) To force the use of this interface ··· 81 72 "on-click": "flatpak run com.saivert.pwvucontrol" 82 73 }, 83 74 "custom/power": { 84 - "format" : "⏻ ", 75 + "format" : " ⏻ ", 85 76 "tooltip": false, 86 - "menu": "on-click", 87 - "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder 88 - "menu-actions": { 89 - "shutdown": "systemctl poweroff", 90 - "reboot": "systemctl reboot", 91 - "suspend": "systemctl suspend", 92 - "hibernate": "systemctl hibernate", 93 - "logout": "exit" 94 - } 77 + "on-click": "$HOME/.config/waybar/scripts/toggle_eww_window.sh powermenu" 95 78 }, 96 79 "custom/notification": { 97 80 "tooltip": false,
+19
window_manager/.config/waybar/scripts/toggle_eww_window.sh
··· 1 + #!/bin/bash 2 + 3 + stringContain() { case $2 in *$1* ) return 0;; *) return 1;; esac ;} 4 + 5 + if [ $# -ne 1 ]; then 6 + echo "usage: toggle_eww_window.sh <eww_window_name>" 7 + exit 1 8 + fi 9 + 10 + name=$1 11 + windows=$(eww active-windows) 12 + 13 + if stringContain "$name" "$windows"; then 14 + eww close $name 15 + echo "window closed" 16 + exit 0 17 + fi 18 + 19 + eww open $name
+1
window_manager/README.md
··· 12 12 - `blueman` - Bluetooth stuff 13 13 - [Pwvucontrol](https://flathub.org/apps/com.saivert.pwvucontrol) from Flathub - to control audio devices 14 14 - `grim` and `slurp` - to make screenshots work 15 + - `eww` - poweroff/suspend/logout/reboot menu 15 16 16 17 Optional/alternatives available: 17 18 - [Zen Browser](https://flathub.org/apps/app.zen_browser.zen) from Flathub - can be changed at `.config/hypr/hyprland/apps.conf`