(defvar dash_curve_in "transition: 150ms cubic-bezier(0.05, 0.9, 0.1, 1.0);") (defvar dash_curve_out "transition: 80ms cubic-bezier(0.3, 0, 0.8, 0.15);") (defwidget dashboard-contents [] (box :class "dash-window" :orientation "v" :space-evenly false (eventbox ; Close when clicking outside :onclick "scripts/toggle-dash.sh &" :onmiddleclick "scripts/toggle-dash.sh &" :onrightclick "scripts/toggle-dash.sh &" ) (box ; All the stuff go here :orientation "v" :space-evenly false (box ; Description :orientation "v" :space-evenly false :class "dash" :halign "start" :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-left: -1100px; margin-right: 1100px;'} " (label :angle 0 :xalign 0 :class "dash-title" :text "Classic dashboard") (label :angle 0 :xalign 0 :class "dash-subtitle" :text "That kinda useless random widget porn.") ) (box :orientation "h" :space-evenly false (box :orientation "v" :space-evenly false (box :orientation "h" :space-evenly false :class "dash dash-tile" :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-left: -1010px; margin-right: 1010px;'} " (input :class "dash-input" :onaccept "scripts/dashactivate --web 'firefox \"https://www.google.com/search?q={}\"' && hyprctl dispatch focuswindow firefox &" ) (button :class "dash-input-icon dash-button" :onclick "scripts/dashactivate --web 'firefox \"https://www.google.com/search?q=\"' && hyprctl dispatch focuswindow firefox &" "" ) ) (box ; Row 1 :orientation "h" :space-evenly false (box ; Col 1 :orientation "v" :space-evenly false (box ; User :orientation "h" :space-evenly false :class "dash dash-profile" :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-left: -500px; margin-right: 500px;'} " (box :valign "center" :class "dash-user-pic" :style "background-image: url('/var/lib/AccountsService/icons/${username == "" ? username_default : username}');" ; :style "background-image: url('${waifu}');" ) (box :orientation "v" :space-evenly false :valign "center" (box :orientation "h" :space-evenly false (label :class "dash-fetch-icon" :text "") (label :class "dash-fetch" :text "${username + '@' + hostname}") ) (box :orientation "h" :space-evenly false (label :class "dash-fetch-icon" :text "") (label :class "dash-fetch" :text "${kernel}") ) (box :orientation "h" :space-evenly false (label :class "dash-fetch-icon" :text "") (label :class "dash-fetch" :text "${uptime}") ) (box :orientation "h" :space-evenly false (label :class "dash-fetch-icon" :text "") (label :class "dash-fetch" :text "${wm}") ) (box :orientation "h" :space-evenly false (label :class "dash-fetch-icon" :text "") (label :class "dash-fetch" :text "${packages}") ) ) ) (box :orientation "v" :space-evenly false :class "dash" :height 124 :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-bottom: -1000px; margin-top: 1000px;'} " (label :xalign 0 :class "dash-quote-content clr3" :text "${quote_content[3]}") (label :xalign 1 :class "dash-quote-author clr4" :text "${quote_author[3]}") ) ) (box ; Col 2 :orientation "v" :space-evenly false (box ; Clock :orientation "h" :space-evenly false :class "dash" :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-top: -500px; margin-bottom: 500px;'} " (box ; Clock numbers :orientation "v" :space-evenly false :class "dash-clock-text-area" (box ; Clock time :orientation "h" :space-evenly false :halign "center" (label :xalign 0.5 :class "dash-time clr1" :text "${time.hour}") (label :xalign 0.5 :class "dash-time clrt" :text ":") (label :xalign 0.5 :class "dash-time clr3" :text "${time.minute}") ) (box ; Clock date :orientation "h" :space-evenly false :halign "center" (label :xalign 0.5 :class "dash-date clr6" :text "${time.day}, ${time.date}") ) ) (box :class "dash-clock-circle-area" (circular-progress :value "${time.minute / 60 * 100}" :thickness 7 :start-at 75 :class "clr3 dash-clock-circle" (circular-progress :value "${time.hour % 12 / 12 * 100}" :thickness 7 :start-at 75 :class "clr1 dash-clock-circle dash-clock-circle-minute" (label :text "" :class "dash-clock-inner") ) ) ) ) (box ; Calendar :orientation "v" :space-evenly false :class "dash" :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-bottom: -500px; margin-top: 500px;'} " (calendar :height 210 :ihatethiswidget true :style " padding-top: 2px; font-family: Rubik; " ) ) ) (box ; Col 3 :orientation "v" :space-evenly false (box ; Calendar :orientation "v" :space-evenly false :class "dash dash-dir-area" :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-right: -500px; margin-left: 500px;'} " (button :class "dash-dir dash-button" :onclick "scripts/dashactivate '${FILE_BROWSER} ~/Documents' &" (box :orientation "h" :space-evenly false :class "clrt" (label :xalign 0 :text " " :class "icon") (label :xalign 0 :text "documents") ) ) (button :class "dash-dir dash-button" :onclick "scripts/dashactivate '${FILE_BROWSER} ~/Downloads' &" (box :orientation "h" :space-evenly false :class "clrt" (label :xalign 0 :text " " :class "icon") (label :xalign 0 :text "downloads") ) ) (button :class "dash-dir dash-button" :onclick "scripts/dashactivate '${FILE_BROWSER} ~/Pictures' &" (box :orientation "h" :space-evenly false :class "clrt" (label :xalign 0 :text " " :class "icon") (label :xalign 0 :text "pictures") ) ) (button :class "dash-dir dash-button" :onclick "scripts/dashactivate '${FILE_BROWSER} ~/Videos' &" (box :orientation "h" :space-evenly false :class "clrt" (label :xalign 0 :text " " :class "icon") (label :xalign 0 :text "videos") ) ) ) (box ; Resources :orientation "v" :space-evenly false :class "dash dash-resources" :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-top: -700px; margin-bottom: 700px;'} " (label :text "Memory" :class "dash-resource-title clr3") (box :orientation "h" :space-evenly false ; :style "background-color: red;" (box ; RAM :orientation "v" :space-evenly false :class "dash-resource-tile" (circular-progress :value "${memory.percentage}" :thickness 7 :start-at 75 :class "clr3 dash-clock-circle" (box :class "dash-resource-inner") ) (label :class "dash-resource-text" :text "${memory.used}") ) (label :yalign 0.34 :class "dash-resource-icon" :style "font-size: 20pt;" :text "") (box ; Swap :orientation "v" :space-evenly false :class "dash-resource-tile" (circular-progress :value "${memory.swappercentage}" :thickness 7 :start-at 75 :class "clr3 dash-clock-circle" (box :class "dash-resource-inner") ) (label :class "dash-resource-text" :text "${memory.swapused}") ) ) ) ) ) ) (box ;Actinos :orientation "v" :space-evenly false (box :orientation "v" :space-evenly false :style " ${anim_open_dash ? dash_curve_in : dash_curve_out} ${rev_dash ? '' : 'margin-right: -100px; margin-left: 100px;'} " (button :onclick "scripts/dashactivate '~/.local/bin/lock.sh' &" :class "dash clr4 dash-icon dash-button" (label :class "icon" :text "") ) (button :onclick "scripts/dashactivate 'systemctl suspend' &" :class "dash clr3 dash-icon dash-button" (label :class "icon" :text "") ) (button :onclick "scripts/dashactivate 'loginctl terminate-user $USER' &" :class "dash clr2 dash-icon dash-button" (label :class "icon" :text "") ) (button :onclick "scripts/dashactivate 'systemctl reboot' &" :class "dash clr1 dash-icon dash-button" (label :class "icon" :text "") ) (button :onclick "scripts/dashactivate 'systemctl poweroff' &" :class "dash clr0 dash-icon dash-button" (label :class "icon" :text "") ) ) ) ) ) ) ) (defwindow dashboard :focusable true :windowtype "normal" :wm-ignore true :geometry (geometry :x 0 :y 0 :anchor "center center" ) :monitor 0 (dashboard-contents) )