├── assets
├── images
│ ├── dock.png
│ └── menu.png
└── wallpapers
│ ├── od_neon.png
│ └── od_tokyo.jpg
├── eww.scss
├── widgets
├── tm_power.yuck
├── tm_sound.yuck
├── tm_network.yuck
├── tm_standby.yuck
├── tm_updates.yuck
├── tm_calendar.yuck
├── tm_settings.yuck
├── workbar.yuck
├── dock.yuck
├── taskmenu.yuck
├── mainbar.yuck
└── taskbar.yuck
├── scripts
├── window_manager
├── taskmenu_manager
├── taskbar_manager
├── standby_manager
├── workspaces_manager
├── updates_manager
└── dock_manager
├── config.json
├── LICENSE
├── style
├── symbols.json
└── main.scss
├── eww.yuck
└── README.md
/assets/images/dock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grm34/Hyprwwland/HEAD/assets/images/dock.png
--------------------------------------------------------------------------------
/assets/images/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grm34/Hyprwwland/HEAD/assets/images/menu.png
--------------------------------------------------------------------------------
/assets/wallpapers/od_neon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grm34/Hyprwwland/HEAD/assets/wallpapers/od_neon.png
--------------------------------------------------------------------------------
/assets/wallpapers/od_tokyo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/grm34/Hyprwwland/HEAD/assets/wallpapers/od_tokyo.jpg
--------------------------------------------------------------------------------
/eww.scss:
--------------------------------------------------------------------------------
1 | /* Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | * https://github.com/grm34/Hyprwwland
3 | */
4 |
5 | * {
6 | all: unset;
7 | }
8 |
9 | @import "style/main.scss";
--------------------------------------------------------------------------------
/widgets/tm_power.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defwidget tm_power []
6 | (label :visible {taskmenu_tabs[6].visible}
7 | :text "testing: power tab")
8 | )
9 |
10 |
--------------------------------------------------------------------------------
/widgets/tm_sound.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defwidget tm_sound []
6 | (label :visible {taskmenu_tabs[3].visible}
7 | :text "testing: sound tab")
8 | )
9 |
10 |
--------------------------------------------------------------------------------
/widgets/tm_network.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defwidget tm_network []
6 | (label :visible {taskmenu_tabs[4].visible}
7 | :text "testing: network tab")
8 | )
9 |
10 |
--------------------------------------------------------------------------------
/widgets/tm_standby.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defwidget tm_standby []
6 | (label :visible {taskmenu_tabs[1].visible}
7 | :text "testing: standby tab")
8 | )
9 |
10 |
--------------------------------------------------------------------------------
/widgets/tm_updates.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defwidget tm_updates []
6 | (label :visible {taskmenu_tabs[0].visible}
7 | :text "testing: updates tab")
8 | )
9 |
10 |
--------------------------------------------------------------------------------
/widgets/tm_calendar.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defwidget tm_calendar []
6 | (label :visible {taskmenu_tabs[5].visible}
7 | :text "testing: calendar tab")
8 | )
9 |
10 |
--------------------------------------------------------------------------------
/widgets/tm_settings.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defwidget tm_settings []
6 | (label :visible {taskmenu_tabs[2].visible}
7 | :text "testing: settings tab")
8 | )
9 |
10 |
--------------------------------------------------------------------------------
/scripts/window_manager:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Hyprwwland Copyright (c) 2023 darkmaster grm34.
3 | # https://github.com/grm34/Hyprwwland
4 |
5 |
6 | # Get current window state.
7 | : "$(hyprctl activewindow -j | jaq '.mapped')"
8 |
9 |
10 | # Handle requests.
11 | case $1 in
12 | dock)
13 | # open the dock onhover if the current window is free.
14 | [[ $_ != "true" ]] && eww update dock_visible=true
15 | ;;
16 | esac
17 |
18 |
--------------------------------------------------------------------------------
/scripts/taskmenu_manager:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Hyprwwland Copyright (c) 2023 darkmaster grm34.
3 | # https://github.com/grm34/Hyprwwland
4 |
5 |
6 | function eww_update() {
7 | : "$(eww get taskmenu_tabs)"
8 | : "$(printf '%s' "$_" | jaq -c --arg value "$1" "$2")"
9 | eww update taskmenu_tabs="$_"
10 | }
11 |
12 | # Open taskmenu if not already open.
13 | if ! eww windows | grep -sqm 1 "\*taskmenu"; then
14 | eww open taskmenu
15 | fi
16 |
17 | # Set all tabs visibility to false.
18 | for id in {0..6}; do
19 | if [[ $id != "$1" ]]; then
20 | eww_update "false" "(.[$id].visible|=\$value)"
21 | fi
22 | done
23 |
24 | # Activate requested tab visibility.
25 | eww_update "true" "(.[$1].visible|=\$value)"
26 |
27 |
--------------------------------------------------------------------------------
/scripts/taskbar_manager:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Hyprwwland Copyright (c) 2023 darkmaster grm34.
3 | # https://github.com/grm34/Hyprwwland
4 |
5 |
6 | # Handle requests.
7 | case $1 in
8 | brightness)
9 | : "$(light -G | cut -d'.' -f1)"
10 | printf '%s' "$_"
11 | ;;
12 | volume)
13 | : "$(pulsemixer --get-volume | cut -d' ' -f1)"
14 | printf '%s' "$_"
15 | ;;
16 | network)
17 | : "$(nmcli networking connectivity)"
18 | if [[ $_ == "none" ]]; then
19 | printf '%s' "false"
20 | else
21 | printf '%s' "true"
22 | fi
23 | ;;
24 | datetime)
25 | readarray -td/ date < <(date '+%d/%m/%Y/%H:%M/')
26 | printf \
27 | '{"date":"%s","time":"%s","day":"%s","month":"%s","year":"%s"}' \
28 | "${date[0]}/${date[1]}/${date[2]}" "${date[3]}" \
29 | "${date[0]}" "${date[1]}" "${date[2]}"
30 | ;;
31 | esac
32 |
33 |
--------------------------------------------------------------------------------
/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "aur_helper": "paru",
3 | "terminal": "alacritty",
4 | "terminal_cmd": "alacritty -e",
5 | "web_browser": "librewolf",
6 | "file_manager": "alacritty -e felix",
7 | "text_editor": "alacritty -e helix",
8 | "chat_client": "gajim",
9 | "sound_manager": "myxer",
10 | "video_player": "mpv --player-operation-mode=pseudo-gui",
11 | "music_player": "alacritty -e termusic",
12 | "email_client": "alacritty -e himalaya write",
13 | "cam_recorder": "cameractrlsgtk4.py",
14 | "screen_recorder": "wayfarer",
15 | "suspend_timeout": "300",
16 | "sleep_timeout": "600",
17 | "lock_effects": "--fade-in 5s --effect-vignette 0:1",
18 | "weather_location": "Montpellier",
19 | "standby_wallpaper": "assets/wallpapers/od_tokyo.jpg",
20 | "launcher_app_path": "/usr/share/applications",
21 | "launcher_app_icon_path": "/usr/share/icons/ePapirus-Dark/96x96/apps",
22 | "dock_app_path": "/usr/share/applications",
23 | "dock_app_icon_path": "/usr/share/icons/ePapirus-Dark/96x96/apps",
24 | "dock_app_icon_size": "38"
25 | }
--------------------------------------------------------------------------------
/widgets/workbar.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (deflisten workspaces :initial '[
6 | {"index": "1", "class": "ws-inactive", "icon": " ₁"},
7 | {"index": "2", "class": "ws-inactive", "icon": " ₂"},
8 | {"index": "3", "class": "ws-inactive", "icon": " ₃"},
9 | {"index": "4", "class": "ws-inactive", "icon": " ₄"},
10 | {"index": "5", "class": "ws-inactive", "icon": " ₅"},
11 | {"index": "6", "class": "ws-inactive", "icon": " ₆"},
12 | {"index": "7", "class": "ws-inactive", "icon": " ₇"},
13 | {"index": "8", "class": "ws-inactive", "icon": " ₈"},
14 | {"index": "9", "class": "ws-inactive", "icon": " ₉"}]'
15 | "scripts/workspaces_manager"
16 | )
17 |
18 |
19 | (defwidget workbar []
20 | (box :class "workbar"
21 | :orientation "h"
22 | :halign "start"
23 | :spacing 6
24 |
25 | (for ws in workspaces
26 | (button :class {ws.class}
27 | :onclick "hyprctl dispatch workspace ${ws.index}"
28 | (label :text {ws.icon})
29 | ))
30 | ))
31 |
32 |
--------------------------------------------------------------------------------
/scripts/standby_manager:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Hyprwwland Copyright (c) 2023 darkmaster grm34.
3 | # https://github.com/grm34/Hyprwwland
4 |
5 |
6 | # Get required settings from config.json.
7 | readarray -t config < <(
8 | jaq '.suspend_timeout,
9 | .sleep_timeout,
10 | .lock_effects,
11 | .standby_wallpaper' "$PWD/config.json")
12 |
13 |
14 | # Run swayidle with hyprctl.
15 | function activate_standby_mode() {
16 | if ! pidof -sxq swayidle; then
17 | swayidle timeout "${config[0]//\"}" \
18 | "swaylock -F -e ${config[2]//\"} -i ${config[3]//\"}" \
19 | timeout "${config[1]//\"}" "hyprctl dispatch dpms off" \
20 | resume "hyprctl dispatch dpms on" &
21 | fi
22 | }
23 |
24 |
25 | # Handle requests.
26 | case $1 in
27 | on)
28 | eww update standby=true
29 | activate_standby_mode
30 | ;;
31 | off)
32 | eww update standby=false
33 | pkill -f -9 swayidle
34 | ;;
35 | *)
36 | : "$(eww get standby)"
37 | if [[ $_ == "true" ]]; then
38 | activate_standby_mode
39 | printf '%s' "true"
40 | else
41 | printf '%s' "false"
42 | fi
43 | ;;
44 | esac
45 |
46 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Hyprwwland Copyright (c) 2023 darkmaster grm34.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/style/symbols.json:
--------------------------------------------------------------------------------
1 | {
2 | "cpu": "",
3 | "ram": "",
4 | "disk": "",
5 | "temp": "",
6 | "updates-on": " ",
7 | "updates-off": " ",
8 | "standby-on": " ",
9 | "standby-off": " ",
10 | "brightness": "",
11 | "sound-on": "",
12 | "sound-off": "",
13 | "net-on": " ",
14 | "net-off": " ",
15 | "batC100": "",
16 | "batC90": "",
17 | "batC80": "",
18 | "batC70": "",
19 | "batC60": "",
20 | "batC50": "",
21 | "batC40": "",
22 | "batC30": "",
23 | "batC20": "",
24 | "batC10": "",
25 | "batC00": "",
26 | "batN100": "",
27 | "batN90": "",
28 | "batN80": "",
29 | "batN70": "",
30 | "batN60": "",
31 | "batN50": "",
32 | "batN40": "",
33 | "batN30": "",
34 | "batN20": "",
35 | "batN10": "",
36 | "batN00": "",
37 | "power": " ",
38 | "browser": " ",
39 | "filemanager": "",
40 | "text-editor": " ",
41 | "chat-client": " ",
42 | "sound-manager": " ",
43 | "video-player": " ",
44 | "music-player": " ",
45 | "email-client": " ",
46 | "cam-recorder": " ",
47 | "screen-recorder": " ",
48 | "up-on": " ",
49 | "up-off": " ",
50 | "shutdown": " ",
51 | "reboot": " ",
52 | "sleep": "",
53 | "logout": "",
54 | "arrow": " ",
55 | "close": ""
56 | }
--------------------------------------------------------------------------------
/scripts/workspaces_manager:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Hyprwwland Copyright (c) 2023 darkmaster grm34.
3 | # https://github.com/grm34/Hyprwwland
4 |
5 |
6 | function eww_update() {
7 | : "$(eww get workspaces)"
8 | printf '%s' "$_" | jaq -c --arg value "$1" "$2"
9 | }
10 |
11 |
12 | function update_occupied_workspaces() {
13 | local occupied id
14 | readarray -t occupied < <(hyprctl workspaces -j | jaq '.[]?.id?')
15 | for id in "${occupied[@]}"; do
16 | if [[ $id != "$1" ]]; then
17 | id=$((id-1))
18 | eww_update "ws-occupied" "(.[$id].class|=\$value)"
19 | fi
20 | done
21 | }
22 |
23 |
24 | function update_on_start() {
25 | local active id
26 | active="$(hyprctl monitors -j | jaq '.[].activeWorkspace.id')"
27 | id=$((active-1))
28 | eww_update "ws-active" "(.[$id].class|=\$value)"
29 | update_occupied_workspaces "$active"
30 | }
31 |
32 |
33 | function handle() {
34 | case $1 in
35 | workspace*|createworkspace*)
36 | : $((${1##*>>}-1))
37 | eww_update "ws-active" "(.[$_].class|=\$value)"
38 | update_occupied_workspaces "${1##*>>}"
39 | ;;
40 | destroyworkspace*)
41 | : $((${1##*>>}-1))
42 | eww_update "ws-inactive" "(.[$_].class|=\$value)"
43 | ;;
44 | esac
45 | }
46 |
47 |
48 | update_on_start
49 | # Listen hyprland socket for events.
50 | sock="/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
51 | socat -U - UNIX-CONNECT:"$sock" | while read -r line; do
52 | handle "$line"
53 | done
54 |
55 |
--------------------------------------------------------------------------------
/scripts/updates_manager:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Hyprwwland Copyright (c) 2023 darkmaster grm34.
3 | # https://github.com/grm34/Hyprwwland
4 |
5 |
6 | function aur_helper() {
7 | ! pidof -sxq "$aur_helper" &&
8 | [[ $1 ]] && nohup "$(echo "n" | sudo "$aur_helper")"
9 | ! pidof -sxq "$aur_helper" &&
10 | : "$(sudo "$aur_helper" -Qu | wc -l)"
11 | ! [[ $_ =~ ^[0-9]+$ ]] && : 0
12 | printf '%s' "$_"
13 | }
14 |
15 |
16 | function notify_user() {
17 | case $1 in
18 | check) : "Checking for new updates..." ;;
19 | down) : "Waiting for network..." ;;
20 | nb) : "Arch Linux pending updates: $2" ;;
21 | up) : "Arch Linux is already up to date !"
22 | esac
23 | dunstify -i "pacman" "$_"
24 | }
25 |
26 |
27 | # Get required settings from config.json.
28 | readarray -t config < <(
29 | jaq '.aur_helper, .terminal_cmd' "$PWD/config.json")
30 | aur_helper="${config[0]//\"}"
31 | terminal_cmd="${config[1]//\"}"
32 |
33 |
34 | # Handle requests.
35 | case $1 in
36 | update)
37 | : "$(aur_helper)"
38 | if (( _ == 0 )); then
39 | notify_user "up"
40 | else
41 | eval "$terminal_cmd" sudo "$aur_helper" &
42 | : "$(aur_helper)"
43 | fi
44 | printf '%s' "$_"
45 | ;;
46 | check)
47 | notify_user "check"
48 | : "$(aur_helper full)"
49 | [[ $_ == 0 ]] && : "up"
50 | notify_user "nb" "$_"
51 | printf '%s' "$_"
52 | canberra-gtk-play -i "window-question"
53 | ;;
54 | *)
55 | : "$(eww get network)"
56 | [[ $_ != true ]] && exit
57 | : "$(aur_helper full)"
58 | printf '%s' "$_"
59 | ;;
60 | esac
61 |
62 |
--------------------------------------------------------------------------------
/widgets/dock.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defvar dock_visible false)
6 |
7 | (defpoll dock_manager :interval "5m" :initial "[]"
8 | "scripts/dock_manager"
9 | )
10 |
11 |
12 | (defwidget dock []
13 | (eventbox :class "dock"
14 | :valign "center"
15 | :timeout "10s"
16 | :onhover "scripts/window_manager dock"
17 | :onhoverlost "${EWW_CMD} update dock_visible=false"
18 | (box :space-evenly false
19 |
20 | ; Button (visible).
21 | (revealer :reveal "${!dock_visible}"
22 | :transition "slideright"
23 | :duration "250ms"
24 | (eventbox :valign "center"
25 | :width 6
26 | :tooltip "dock"
27 | :cursor "pointer"
28 | :onclick "${EWW_CMD} update dock_visible=true"
29 | (image :path "assets/images/dock.png"
30 | :image-width 6)
31 | ))
32 |
33 | ; Content (onclick/onhover).
34 | (revealer :reveal {dock_visible}
35 | :transition "slideleft"
36 | :duration "250ms"
37 | (box :class "dock-applications"
38 | :orientation "v"
39 | :style "padding-left: 4px"
40 |
41 | (for app in dock_manager
42 | (eventbox :class "dock-app"
43 | :tooltip {app.name}
44 | :onclick {app.cmd}
45 | :cursor "pointer"
46 | (image :path {app.icon}
47 | :image-width {app.size})
48 | ))
49 | ))
50 | )))
51 |
52 |
--------------------------------------------------------------------------------
/widgets/taskmenu.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defvar taskmenu_tabs '[
6 | {"class": "tab-off", "visible": "false", "id": "0", "icon": " "},
7 | {"class": "tab-off", "visible": "false", "id": "1", "icon": " "},
8 | {"class": "tab-off", "visible": "false", "id": "2", "icon": " "},
9 | {"class": "tab-off", "visible": "false", "id": "3", "icon": " "},
10 | {"class": "tab-off", "visible": "false", "id": "4", "icon": " "},
11 | {"class": "tab-off", "visible": "false", "id": "5", "icon": " "},
12 | {"class": "tab-off", "visible": "false", "id": "6", "icon": "⏻ "}]'
13 | )
14 |
15 |
16 | (defwidget tabs []
17 | (box :class "taskmenu_tabs"
18 | :orientation "v"
19 | :spacing 10
20 |
21 | (for tab in taskmenu_tabs
22 | (button :class {tab.class}
23 | :timeout "1s"
24 | :onclick "scripts/taskmenu_manager ${tab.id}"
25 | (label :text {tab.icon}
26 | :style "font-size: 24px")
27 | ))
28 | ))
29 |
30 |
31 | (defwidget content []
32 | (box :class "taskmenu_content"
33 | :orientation "v"
34 | :space-evenly false
35 |
36 | (box :space-evenly false
37 | :spacing 20
38 | (button :halign "start"
39 | :onclick "${EWW_CMD} close taskmenu"
40 | (label :text {icon.close}
41 | :style "font-size: 14px"))
42 | (label :text "Taskbar settings"))
43 |
44 | (tm_updates)
45 | (tm_standby)
46 | (tm_settings)
47 | (tm_sound)
48 | (tm_network)
49 | (tm_calendar)
50 | (tm_power)
51 | ))
52 |
53 |
54 | (defwidget taskmenu []
55 | (box :class "taskmenu"
56 | (box :orientation "h"
57 | :space-evenly false
58 | :spacing 30
59 |
60 | (content)
61 | (tabs)
62 | )))
63 |
64 |
--------------------------------------------------------------------------------
/eww.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | ; Config.
6 | (defpoll hww :interval "60m" :initial "{}"
7 | "cat config.json"
8 | )
9 |
10 | ; Icons.
11 | (defpoll icon :interval "60m" :initial "{}"
12 | "cat style/symbols.json"
13 | )
14 |
15 | ; Widgets.
16 | (include "widgets/dock.yuck")
17 | (include "widgets/workbar.yuck")
18 | (include "widgets/mainbar.yuck")
19 | (include "widgets/taskbar.yuck")
20 | (include "widgets/taskmenu.yuck")
21 | (include "widgets/tm_updates.yuck")
22 | (include "widgets/tm_standby.yuck")
23 | (include "widgets/tm_settings.yuck")
24 | (include "widgets/tm_sound.yuck")
25 | (include "widgets/tm_network.yuck")
26 | (include "widgets/tm_calendar.yuck")
27 | (include "widgets/tm_power.yuck")
28 |
29 |
30 | ; Bar.
31 | (defwindow bar :monitor 0
32 | :stacking "fg"
33 | :exclusive true
34 | :focusable false
35 | :geometry (geometry :x "0%" :y "0%"
36 | :width "99%" :height "0%"
37 | :anchor "top center")
38 | (centerbox
39 | (workbar :halign "start")
40 | (mainbar :halign "center")
41 | (taskbar :halign "end")
42 | )
43 | )
44 |
45 |
46 | ; Dock.
47 | (defwindow dock :monitor 0
48 | :stacking "fg"
49 | :exclusive true
50 | :focusable false
51 | :geometry (geometry :x "0%" :y "0%"
52 | :width "0%" :height "0%"
53 | :anchor "left center")
54 | (dock)
55 | )
56 |
57 |
58 | ; Taskmenu.
59 | (defwindow taskmenu :monitor 0
60 | :stacking "fg"
61 | :exclusive false
62 | :focusable false
63 | :geometry (geometry :x "1%" :y "1%"
64 | :width "0%" :height "0%"
65 | :anchor "top right")
66 | (taskmenu)
67 | )
68 |
69 |
--------------------------------------------------------------------------------
/scripts/dock_manager:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Hyprwwland Copyright (c) 2023 darkmaster grm34.
3 | # https://github.com/grm34/Hyprwwland
4 |
5 |
6 | # Get required settings from config.json.
7 | readarray -t config < <(
8 | jaq '.dock_app_path,
9 | .dock_app_icon_path,
10 | .dock_app_icon_size,
11 | .terminal_cmd' "$PWD/config.json")
12 | app_path="${config[0]//\"}"
13 | icon_path="${config[1]//\"}"
14 | icon_size="${config[2]//\"}"
15 | terminal_cmd="${config[3]//\"}"
16 |
17 |
18 | # Get user applications.
19 | readarray -t apps < <(
20 | fd . "$app_path" --min-depth 0 --max-depth 2 \
21 | --type file --extension desktop)
22 |
23 |
24 | # Create an array containing the required data of each app.
25 | index=0
26 | app_data=()
27 | for app in "${apps[@]}"; do
28 | ((index > 14)) && break # max 15 apps.
29 |
30 | # skip "nodisplay"/"Qt"/"icon less" apps.
31 | grep -qm 1 "NoDisplay=true\|Categories=Qt" "$app" && continue
32 | : "$(grep -m 1 "^Icon=" "$app")"
33 | : "$icon_path/${_//Icon=}.svg"
34 | ! [[ -f $_ ]] && continue
35 |
36 | # get app name.
37 | : "$(grep -m 1 ^Name= "$app")"
38 | name="${_//Name=}"
39 |
40 | # get app icon.
41 | : "$(grep -m 1 "^Icon=" "$app")"
42 | icon="$icon_path/${_//Icon=}.svg"
43 |
44 | # get opening cmd.
45 | : "$(grep -m 1 ^Exec "$app")"
46 | : "${_//Exec=}"
47 | : "${_//\"}"
48 | : "${_%% *}"
49 | cmd="$(which "$_") &"
50 | [[ $cmd == *"mpv &"* ]] && # fix mpv exec.
51 | cmd="${cmd//mpv/mpv --player-operation-mode=pseudo-gui}"
52 |
53 | # define opening cmd (terminal or standalone).
54 | grep -qm 1 "Terminal=true" "$app" && cmd="$terminal_cmd $cmd"
55 | [[ ${cmd// &} == *alacritty ]] && # open $TERM from $HOME (fix).
56 | cmd="${cmd// &} --working-directory $HOME &"
57 |
58 | # increment the array.
59 | printf -v data \
60 | '{"name": "%s", "icon": "%s", "size": "%s", "cmd": "%s"},' \
61 | "$name" "$icon" "$icon_size" "$cmd"
62 | app_data+=("$data")
63 |
64 | # increment the index.
65 | index=$((index + 1))
66 | done
67 |
68 |
69 | # Return as json.
70 | : "${app_data[*]}"
71 | printf '%s' "[${_::-1}]" # Hmm, anything else?
72 |
73 |
--------------------------------------------------------------------------------
/widgets/mainbar.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defvar cpu_graph false)
6 | (defvar ram_graph false)
7 | (defvar disk_graph false)
8 | (defvar temp_graph false)
9 |
10 |
11 | (defwidget progress_reveal [class visible icon content]
12 | (eventbox :class {class}
13 | :cursor "progress"
14 | :timeout "2s"
15 | :onhover "${EWW_CMD} update ${class}_graph=true"
16 | :onhoverlost "${EWW_CMD} update ${class}_graph=false"
17 | (box :space-evenly false
18 | :orientation "v"
19 |
20 | ; progress (visible).
21 | (revealer :reveal {!visible}
22 | :transition "slideup"
23 | :duration "250ms"
24 | (box :orientation "v"
25 | (box :orientation "h"
26 | :halign "center"
27 | :valign "end"
28 | :space-evenly false
29 | :spacing 8
30 | (label :class "${class}-box-icon"
31 | :text {icon})
32 | (label :class "${class}-box-text"
33 | :text {class != 'temp' ? "${content}%"
34 | : "${content}°C"}))
35 | (progress :halign "center"
36 | :valign "start"
37 | :value {content}
38 | :orientation "h")
39 | ))
40 |
41 | ; graph (onhover).
42 | (revealer :reveal {visible}
43 | :transition "slidedown"
44 | :duration "250ms"
45 | (graph :class "${class}-box-graph"
46 | :height 22
47 | :thickness 2
48 | :value {content}
49 | :time-range "10s"
50 | :dynamic true
51 | :line-style "round")
52 | ))
53 | ))
54 |
55 |
56 | (defwidget mainbar []
57 | (box :class "mainbar"
58 | :orientation "h"
59 | :halign "center"
60 | :space-evenly false
61 | :spacing 10
62 |
63 | ; Menu.
64 | (eventbox :class "menu"
65 | :cursor "pointer"
66 | :tooltip "Menu"
67 | ; :onclick "${EWW_CMD} open menu"
68 | ; :onrightclick "${EWW_CMD} close menu"
69 | (image :path "assets/images/menu.png"
70 | :image-width 20))
71 |
72 | ; Cpu.
73 | (progress_reveal :class "cpu"
74 | :visible {cpu_graph}
75 | :icon {icon.cpu}
76 | :content {EWW_CPU.avg})
77 |
78 | ; Ram.
79 | (progress_reveal :class "ram"
80 | :visible {ram_graph}
81 | :icon {icon.ram}
82 | :content {EWW_RAM.used_mem_perc})
83 |
84 | ; Disk.
85 | (progress_reveal :class "disk"
86 | :visible {disk_graph}
87 | :icon {icon.disk}
88 | :content {EWW_DISK["/"].used_perc})
89 |
90 | ; Temp.
91 | (progress_reveal :class "temp"
92 | :visible {temp_graph}
93 | :icon {icon.temp}
94 | :content {EWW_TEMPS.CORETEMP_CORE_0})
95 | ))
96 |
97 |
--------------------------------------------------------------------------------
/style/main.scss:
--------------------------------------------------------------------------------
1 | /* Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | * https://github.com/grm34/Hyprwwland
3 | */
4 |
5 |
6 | // progressbar.
7 | progressbar trough {
8 | border-radius: 10px;
9 | background-color: rgba(255, 255, 255, 0.15);
10 | }
11 |
12 | progressbar progress {
13 | border-radius: 10px;
14 | background-color: #32cd32;
15 | }
16 |
17 | // scale.
18 | scale trough {
19 | background-color: rgba(255, 255, 255, 0.2);
20 | }
21 |
22 | scale highlight {
23 | background-color: #32cd32;
24 | padding: 0px 0px 10px 0px
25 | }
26 |
27 | // scrollbar.
28 | scrollbar {
29 | transition: all 75ms cubic-bezier(0, 0, 0.2, 1);
30 | background-color: #2C2C2C;
31 | }
32 |
33 | scrollbar slider {
34 | transition: background-color 75ms cubic-bezier(0, 0, 0.2, 1);
35 | min-width: 8px;
36 | min-height: 8px;
37 | border: 4px solid transparent;
38 | border-radius: 9999px;
39 | background-clip: padding-box;
40 | background-color: rgba(255, 255, 255, 0.5);
41 | }
42 |
43 | scrollbar slider:hover {
44 | background-color: rgba(255, 255, 255, 0.7);
45 | }
46 |
47 | scrollbar slider:active {
48 | background-color: white;
49 | }
50 |
51 | scrollbar slider:disabled {
52 | background-color: rgba(255, 255, 255, 0.3);
53 | }
54 |
55 | scrollbar.horizontal slider {
56 | min-width: 40px;
57 | }
58 |
59 | scrollbar.vertical slider {
60 | min-height: 24px;
61 | }
62 |
63 | // tooltip.
64 | tooltip {
65 | font-family: UbuntuNerdFont;
66 | font-size: 16px;
67 | border-radius: 5px;
68 | box-shadow: none;
69 | }
70 |
71 | tooltip.background,
72 | tooltip.background.csd {
73 | border-radius: 10px;
74 | background-color: rgba(25, 25, 25, 0.9);
75 | color: white;
76 | }
77 |
78 | tooltip decoration {
79 | background-color: transparent;
80 | }
81 |
82 | tooltip>box {
83 | margin: -6px;
84 | min-height: 24px;
85 | padding: 4px 8px;
86 | }
87 |
88 | // actionbar.
89 | actionbar>revealer>box .linked>button:not(.suggested-action):not(.destructive-action),
90 | button {
91 | transition: all 75ms cubic-bezier(0, 0, 0.2, 1),
92 | background-size 300ms cubic-bezier(0, 0, 0.2, 1),
93 | background-image 1200ms cubic-bezier(0, 0, 0.2, 1);
94 | outline: none;
95 | box-shadow: inset 0 0 0 9999px transparent;
96 | background-image: radial-gradient(circle,
97 | transparent 10%,
98 | transparent 0%);
99 | background-repeat: no-repeat;
100 | background-position: center;
101 | background-size: 1000% 1000%;
102 | color: white;
103 | }
104 |
105 | // calendar.
106 | calendar:disabled {
107 | color: rgba(255, 255, 255, 0.5);
108 | }
109 |
110 | calendar:selected {
111 | border-radius: 5px;
112 | }
113 |
114 | calendar.header {
115 | border-style: none none solid;
116 | border-color: rgba(255, 255, 255, 0.12);
117 | border-radius: 0;
118 | }
119 |
120 | calendar.button:focus {
121 | outline: none;
122 | box-shadow: none;
123 | }
124 |
125 | calendar.highlight {
126 | color: rgba(255, 255, 255, 0.7);
127 | font-weight: 500;
128 | }
129 |
130 | calendar:indeterminate {
131 | color: rgba(255, 255, 255, 0.3);
132 | }
133 |
134 | // selection.
135 | widget.entry:selected,
136 | evview.view.content-view:selected,
137 | evview.view.content-view:selected:backdrop,
138 | statuspage.search-view entry.search>window.background treeview.view:selected,
139 | calendar:selected,
140 | spinbutton.vertical selection,
141 | spinbutton:not(.vertical) selection,
142 | entry selection,
143 | label selection,
144 | textview text selection:focus,
145 | textview text selection,
146 | widget.view:selected,
147 | .view:selected {
148 | color: white;
149 | background-color: #3281EA;
150 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hyprwwland
2 |
3 | A simple sharing of my [eww](https://github.com/elkowar/eww) setup on Hyprland to serve as an example or basis for learning how to create your own desktop environment. Many thanks to [@ElKowar](https://github.com/elkowar) for this awesome standalone widget system made in Rust. To be used without moderation.
4 |
5 | In order to keep this clean, and being only an eww configuration, my dotfiles are on a separate repository [Hyprwwland-dotfiles](https://github.com/grm34/Hyprwwland-dotfiles).
6 |
7 | ## What I use
8 |
9 |
10 | CLICK TO EXPAND
11 |
12 | | Type | Link |
13 | | --- | --- |
14 | | **Distro** | [arch](https://wiki.archlinux.org) |
15 | | **AUR Helper** | [paru](https://github.com/Morganamilo/paru) |
16 | | **Compositor** | [hyprland](https://wiki.hyprland.org) |
17 | | **Widgets** | [eww](https://github.com/elkowar/eww) |
18 | | **Notifications** | [dunst](https://github.com/dunst-project/dunst) |
19 | | **Clipboard** | [wl-clipboard](https://github.com/bugaevc/wl-clipboard) [cliphist](https://github.com/sentriz/cliphist) |
20 | | **Lock Screen** | [swayidle](https://github.com/swaywm/swayidle) [swaylock-effects](https://github.com/mortie/swaylock-effects) |
21 | | **Sound** | [pipewire](https://docs.pipewire.org) [wireplumber](https://gitlab.freedesktop.org/pipewire/wireplumber) [pulsemixer](https://github.com/GeorgeFilipkin/pulsemixer) [myxer](https://github.com/VixenUtils/Myxer) |
22 | | **Brightness Control** | [light](https://haikarainen.github.io/light) (archived 02/04/23) |
23 | | **Wallpaper Manager** | [hyprpaper](https://github.com/hyprwm/hyprpaper) |
24 | | **App Launcher** | [fuzzel](https://codeberg.org/dnkl/fuzzel) |
25 | | **File Manager** | [felix](https://kyoheiu.dev/felix) |
26 | | **Core Utilities** | [coreutils](https://github.com/uutils/coreutils) (rust rewrite) |
27 | | **System info** | [neofetch](https://github.com/dylanaraps/neofetch) [duf](https://github.com/muesli/duf) [macchina](https://github.com/Macchina-CLI/macchina) |
28 | | **Monitoring** | [btop](https://github.com/aristocratos/btop) [htop](https://github.com/htop-dev/htop) [bandwhich](https://github.com/imsnif/bandwhich) [sniffnet](https://github.com/GyulyVGC/sniffnet) |
29 | | **Shell** | [nushell](https://www.nushell.sh) |
30 | | **Terminal** | [alacritty](https://alacritty.org) |
31 | | **Terminal Prompt** | [starship](https://starship.rs) |
32 | | **Terminal Tools** | [zellij](https://zellij.dev) [zoxide](https://github.com/ajeetdsouza/zoxide) [vivid](https://github.com/sharkdp/vivid) [broot](https://github.com/Canop/broot) | |
33 | | **Terminal Pager** | [bat](https://github.com/sharkdp/bat) [less](https://greenwoodsoftware.com/less) [most](https://www.jedsoft.org/most) [delta](https://github.com/dandavison/delta) |
34 | | **Text Editor** | [helix](https://helix-editor.com) |
35 | | **Network** | [networkmanager](https://www.networkmanager.dev) |
36 | | **VPN** | [wireguard](https://www.wireguard.com) |
37 | | **Multimedia Support** | [gstreamer](https://gitlab.freedesktop.org/gstreamer/gstreamer) [ffmpeg](https://ffmpeg.org) [mpv](https://mpv.io) |
38 | | **Music Player** | [termusic](https://github.com/tramhao/termusic) |
39 | | **Media Downloader** | [yt-dlp](https://github.com/yt-dlp/yt-dlp) |
40 | | **Web Browser** | [librewolf](https://librewolf.net) |
41 | | **Screenshots** | [hyprshot](https://github.com/Gustash/hyprshot) [grim](https://wayland.emersion.fr/grim) [slurp](https://wayland.emersion.fr/slurp) |
42 | | **Screen Recorder** | [wayfarer](https://github.com/stronnag/wayfarer) |
43 | | **Image Viewer** | [feh](https://github.com/derf/feh) |
44 | | **Image Editor** | [gimp](https://www.gimp.org) |
45 | | **Color Picker** | [hyprpicker](https://github.com/hyprwm/hyprpicker) |
46 | | **Document Viewer** | [zathura](https://git.pwmt.org/pwmt/zathura) |
47 | | **Cursors** | [capitaine-cursors](https://github.com/keeferrourke/capitaine-cursors) |
48 | | **Fonts** | [Nerd Fonts](https://www.nerdfonts.com) |
49 | | **Icons** | [papirus-icon-theme](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme) |
50 | | **Themes** | [breeze-gtk](https://invent.kde.org/plasma/breeze-gtk) [adwaita-qt](https://github.com/FedoraQt/adwaita-qt) [Catppuccin](https://github.com/catppuccin/catppuccin) |
51 | | **GUI Settings Editor** | [nwg-look](https://github.com/nwg-piotr/nwg-look) [qt5ct](https://sourceforge.net/projects/qt5ct) [qt6ct](https://github.com/trialuser02/qt6ct) |
52 | | **Desktop Portal** | [xdg-desktop-portal-hyprland](https://github.com/hyprwm/xdg-desktop-portal-hyprland) |
53 | | **Xmpp Client** | [gajim](https://gajim.org) |
54 |
55 |
56 | ## Quick Install on Arch Linux
57 |
58 | - Install eww and Hyprland with the minimum requirements :
59 |
60 | ```bash
61 | paru --needed -S hyprland eww-wayland dunst libnotify libcanberra \
62 | hyprpaper swayidle swaylock-effects-git neofetch duf \
63 | wl-clipboard cliphist pulsemixer myxer-bin light jaq \
64 | networkmanager sound-theme-freedesktop socat fd
65 | ```
66 |
67 | - Install required fonts :
68 |
69 | ```bash
70 | paru --needed -S ttf-anonymouspro-nerd ttf-jetbrains-mono-nerd \
71 | ttf-ubuntu-nerd ttf-meslo-nerd papirus-icon-theme
72 | ```
73 |
74 | - Clone the repository in your `$HOME` config folder :
75 |
76 | ```bash
77 | git clone https://github.com/grm34/Hyprwwland "$HOME/.config/eww"
78 | ```
79 |
80 | ## Configuring
81 |
82 | The [config](config.json) is located in `~/.config/eww/config.json`.
83 |
84 | ```json
85 | "aur_helper": "paru",
86 | "terminal": "alacritty",
87 | "terminal_cmd": "alacritty -e",
88 | "web_browser": "librewolf",
89 |
90 | (...)
91 | ```
92 |
93 | To be notified of new updates allow `paru` to be runned without password in `~/etc/sudoers` :
94 |
95 | ```bash
96 | ALL=(ALL) NOPASSWD: /usr/bin/paru
97 | ```
98 |
99 | ## Auto-start with Hyprland
100 |
101 | - Edit `~/.config/hypr/hyprland.conf` :
102 |
103 | ```text
104 | exec-once = wl-paste --type text --watch cliphist store
105 | exec-once = wl-paste --type image --watch cliphist store
106 | exec-once = dunst
107 | exec-once = hyprpaper
108 | exec-once = eww open-many bar dock
109 | ```
110 |
111 | - Create `~/.config/hypr/hyprpaper.conf` :
112 |
113 | ```text
114 | preload = ~/.config/eww/assets/wallpapers/od_neon.png
115 | preload = ~/.config/eww/assets/wallpapers/od_tokyo.jpg
116 | wallpaper = ~/.config/eww/assets/wallpapers/od_neon.png
117 | ```
118 |
119 |
--------------------------------------------------------------------------------
/widgets/taskbar.yuck:
--------------------------------------------------------------------------------
1 | ; Hyprwwland Copyright (c) 2023 darkmaster grm34.
2 | ; https://github.com/grm34/Hyprwwland
3 |
4 |
5 | (defvar auto_up true)
6 | (defvar date_visible false)
7 |
8 | (defpoll brightness :interval "2s" :initial "90"
9 | "scripts/taskbar_manager brightness"
10 | )
11 |
12 | (defpoll volume :interval "2s" :initial "90"
13 | "scripts/taskbar_manager volume"
14 | )
15 |
16 | (defpoll network :interval "5s" :initial false
17 | "scripts/taskbar_manager network"
18 | )
19 |
20 | (defpoll datetime :interval "10s" :initial "{}"
21 | "scripts/taskbar_manager datetime"
22 | )
23 |
24 | (defpoll updates :interval "30m" :initial "0"
25 | "scripts/updates_manager"
26 | )
27 |
28 | (defpoll standby :interval "20m" :initial false
29 | "scripts/standby_manager"
30 | )
31 |
32 |
33 | (defwidget task_button [class ?icon ?text ?tooltip
34 | ?onclick ?onrightclick]
35 | (eventbox :cursor "pointer"
36 | (button :class {class}
37 | :tooltip {tooltip}
38 | :timeout "1s"
39 | :onclick "scripts/taskmenu_manager ${onclick}"
40 | :onrightclick "${EWW_CMD} close taskmenu"
41 | (box :space-evenly false
42 | :spacing {class =~ 'updates' ? 0 : 6}
43 | (label :class {icon =~ '-off' ? "${class}-icon-off"
44 | : "${class}-icon"}
45 | :visible {icon != '' ? true : false}
46 | :text {icon})
47 | (label :class "${class}-text"
48 | :visible {text != '' ? true : false}
49 | :text {text})
50 | ))))
51 |
52 |
53 | (defwidget taskbar []
54 | (box :class "taskbar"
55 | :orientation "h"
56 | :halign "end"
57 | :space-evenly false
58 | :spacing 6
59 |
60 | ; Network.
61 | (task_button :class "network-button"
62 | :tooltip {network == true ? "Network is down..."
63 | : ""}
64 | :onclick "4"
65 | :icon {network == false ? icon.net-off
66 | : icon.net-on}
67 | )
68 |
69 | ; Updates.
70 | (task_button :class {updates == "0"
71 | && network == true ? "updates-button-false"
72 | : "updates-button-true"}
73 | :tooltip "Pending updates ${icon.arrow} ${updates}"
74 | :onclick "0"
75 | :icon {auto_up == false
76 | || network == false ? icon.updates-off
77 | : icon.updates-on}
78 | :text {auto_up == false
79 | || network == false
80 | || updates == "0" ? "" : updates}
81 | )
82 |
83 | ; Standby.
84 | (task_button :class {standby == true ? "standby-on"
85 | : "standby-off"}
86 | :tooltip {standby == true ? "Swayidle is ON"
87 | : "Swayidle is OFF"}
88 | :onclick "1"
89 | :icon {standby == true ? icon.standby-on
90 | : icon.standby-off}
91 | )
92 |
93 | ; Brightness.
94 | (task_button :class "brightness-button"
95 | :tooltip "Brightness ${icon.arrow} ${brightness}%"
96 | :onclick "2"
97 | :icon {icon.brightness}
98 | :text "${brightness}%"
99 | )
100 |
101 | ; Volume.
102 | (task_button :class "sound-button"
103 | :tooltip "Volume ${icon.arrow} ${volume}%"
104 | :onclick "3"
105 | :icon {volume != '0' ? icon.sound-on
106 | : icon.sound-off}
107 | :text {volume != '0' ? "${volume}%" : "0%"}
108 | )
109 |
110 | ; Battery.
111 | (task_button :class "battery-button"
112 | :tooltip "${icon.arrow} ${EWW_BATTERY.BAT0.status}"
113 | :onclick "2"
114 | :icon {EWW_BATTERY.BAT0.capacity > 95
115 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
116 | ? icon.batC100 : icon.batN100
117 | : EWW_BATTERY.BAT0.capacity > 85
118 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
119 | ? icon.batC90 : icon.batN90
120 | : EWW_BATTERY.BAT0.capacity > 75
121 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
122 | ? icon.batC80 : icon.batN80
123 | : EWW_BATTERY.BAT0.capacity > 65
124 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
125 | ? icon.batC70 : icon.batN70
126 | : EWW_BATTERY.BAT0.capacity > 55
127 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
128 | ? icon.batC60 : icon.batN60
129 | : EWW_BATTERY.BAT0.capacity > 45
130 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
131 | ? icon.batC50 : icon.batN50
132 | : EWW_BATTERY.BAT0.capacity > 25
133 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
134 | ? icon.batC40 : icon.batN40
135 | : EWW_BATTERY.BAT0.capacity > 15
136 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
137 | ? icon.batC20 : icon.batN30
138 | : EWW_BATTERY.BAT0.capacity > 5
139 | ? EWW_BATTERY.BAT0.status =~ "Full|Charging"
140 | ? icon.batC10 : icon.batN10
141 | : EWW_BATTERY.BAT0.status =~ "Full|Charging"
142 | ? icon.batC00 : icon.batN00}
143 | :text "${EWW_BATTERY.BAT0.capacity}%"
144 | )
145 |
146 | ; Datetime.
147 | (eventbox :class "datetime-revealer"
148 | :cursor "pointer"
149 | :onhover "${EWW_CMD} update date_visible=true"
150 | :onhoverlost "${EWW_CMD} update date_visible=false"
151 | (button :timeout "1s"
152 | :onclick "scripts/taskmenu_manager 5"
153 | :onrightclick "${EWW_CMD} close taskmenu"
154 | (box :space-evenly false
155 |
156 | ; Time (visible).
157 | (revealer :reveal {!date_visible}
158 | :transition "slideleft"
159 | :duration "250ms"
160 | (label :class "datetime-revealer-time"
161 | :text {datetime.time}))
162 |
163 | ; Date (onhover).
164 | (revealer :reveal {date_visible}
165 | :transition "slideright"
166 | :duration "250ms"
167 | (label :class "datetime-revealer-date"
168 | :text {datetime.date}))
169 | )))
170 |
171 | ; Powermenu.
172 | (task_button :class "powermenu-button"
173 | :tooltip "powermenu"
174 | :onclick "6"
175 | :icon {icon.power}
176 | )
177 | ))
178 |
179 |
--------------------------------------------------------------------------------