This commit is contained in:
end-4
2024-02-22 15:35:06 +07:00
commit 8db26e9707
4220 changed files with 208544 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
(defwidget colorscheme_widget []
(box
:class "bar-pad"
:width 420
:height 60
(box
:class "bar-bg bar-bg-pad"
(box
:space-evenly false
:orientation "h"
:spacing 5
:halign "center"
(button
:valign "center"
:class "bar-wall-btn"
:onclick "scripts/switchwall &"
:tooltip "Change wallpaper"
(label :class "bar-icon-material-hugeass bar-txt-norm" :text "image")
)
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-1" :text "1")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-2" :text "1")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-3" :text "2")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-4" :text "2")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-5" :text "3")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-6" :text "3")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-7" :text "Sf")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-8" :text "Sf")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-9" :text "Bg")
(label :valign "center" :width 30 :height 30 :class "bar-clr bar-clr-10" :text "iP")
)
)
)
)
+60
View File
@@ -0,0 +1,60 @@
(defwidget dynamicleft_widget []
(box
(eventbox
:onscroll "scripts/scroll-dynamicleft-module {} &"
:onmiddleclick "playerctl play-pause"
:onrightclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
:onclick "${open_sideleft ?
(EWW_CMD + ' update bar_offset=0 && ' + EWW_CMD + ' update open_sideleft=false &') :
(dynamicleft_module_page == 2 ? '' :
(EWW_CMD + ' open sideleft && ' + EWW_CMD + ' update bar_offset=1 && ' + EWW_CMD + ' update open_sideright=false && ' + EWW_CMD + ' update open_sideleft=true &')
)}"
; ↑ check module page 2 to not open sidebar when clicking taskbar
(box
:orientation "h" :space-evenly false
(revealer
:reveal {mousemode == 1}
:transition "slideright"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(box ; Module 1: Music
:style "
${ANIM_ENTER[1]}
${dynamicleft_module_page > 1 ? 'margin-top: -70px;' : ''}
"
(music_widget)
)
(box ; Module 2: Colors
:style "
${ANIM_ENTER[1]}
${dynamicleft_module_page > 2 ? 'margin-top: -70px;' :
dynamicleft_module_page < 2 ? 'margin-bottom: -70px;' : ''}
"
(colorscheme_widget)
)
)
)
(revealer
:reveal {mousemode == 0}
:transition "slideleft"
:duration "200ms"
(scroll
:width 420
(box
:space-evenly false
:orientation "v"
(box ; Module 1: Music
(music_widget)
)
(box ; Module 2: Colors
(colorscheme_widget)
)
)
)
)
)
)
)
)
+67
View File
@@ -0,0 +1,67 @@
(defwidget dynamicright_widget []
(eventbox
:onscroll "scripts/scroll-dynamicright-module {} && ${EWW_CMD} update notifications=\"$(scripts/notifget)\" &"
:onmiddleclick "playerctl play-pause"
:onrightclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
:onclick "${open_sideright ?
(EWW_CMD + ' update bar_offset=0 && ' + EWW_CMD + ' update open_sideright=false &') :
(EWW_CMD + ' open sideright && ' + EWW_CMD + ' update bar_offset=-1 && ' + EWW_CMD + ' update open_sideleft=false && ' + EWW_CMD + ' update open_sideright=true && ' + EWW_CMD + ' update notifications=\"$(scripts/notifget)\" &')}"
(box
:orientation "h" :space-evenly false
(revealer
:reveal {mousemode == 0}
:transition "slideright"
:duration "200ms"
(scroll
:width 420
(box
:space-evenly false
:orientation "v"
(box ; Module 1: System
(system_widget)
)
(box ; Module 2: Notifications
(notifications_widget)
)
(box ; Module 3: System info
(sysinfo_widget)
)
)
)
)
(revealer
:reveal {mousemode == 1}
:transition "slideleft"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(box ; Module 1: System
:style "
${ANIM_ENTER[1]}
${dynamicright_module_page > 1 ? 'margin-top: -70px;' : ''}
"
(system_widget)
)
(box ; Module 2: Notifications
:style "
${ANIM_ENTER[1]}
${dynamicright_module_page > 2 ? 'margin-top: -70px;' :
dynamicright_module_page < 2 ? 'margin-bottom: -70px;' : ''}
"
(notifications_widget)
)
(box ; Module 3: System info
:style "
${ANIM_ENTER[1]}
${dynamicright_module_page > 3 ? 'margin-top: -70px;' :
dynamicright_module_page < 3 ? 'margin-bottom: -70px;' : ''}
"
(sysinfo_widget)
)
)
)
)
)
)
+98
View File
@@ -0,0 +1,98 @@
(defwidget music_widget []
(eventbox
:onhover "${EWW_CMD} update hover_music=true &"
:onhoverlost "${EWW_CMD} update hover_music=false &"
(box
:class "bar-pad"
:width 420
:height 60
(box
:space-evenly false
:orientation "h"
:class "bar-bg bar-bg-pad"
:spacing 5
(overlay
(box
:halign "center" :valign "center"
:class "bar-music-cover"
:style "background-image: url('${mcover.image}')"
)
(label
:class "bar-icon-material bar-music-status"
:halign "center" :valign "center"
:style "
font-size: 18pt;
margin-bottom: -1px;
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color7 == 'null' ? coloraccent : mcover.color.colors.color7)};
"
:text "${mplay == 'Playing' ? '' : ''}"
)
)
(scroll
:hscroll true :vscroll false
:hexpand true
(box
:orientation "v"
:space-evenly false
:spacing -2
:valign "center"
(label
:class "bar-txt-larger bar-txt-norm"
:xalign 0
:text {mname.title == '' ? 'Music' : mname.title}
)
(revealer
:transition "slidedown"
:reveal "${mname.artist != ''}"
:duration "20ms"
(label
:class "bar-txt-small bar-txt-norm"
:xalign 0
:text "${mname.artist}"
)
)
)
)
(revealer
:reveal {hover_music}
:transition "slideleft"
:duration "200ms"
(revealer
:reveal {hover_music}
:transition "crossfade"
:duration "200ms"
(box
:orientation "h"
:valign "center"
:spacing -2
(button
:class "bar-icon-material bar-music-btn"
:style "
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color4 == 'null' ? coloraccent : mcover.color.colors.color4)};
"
:onclick "playerctl previous"
"skip_previous"
)
(button
:class "bar-icon-material bar-music-btn"
:style "
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color4 == 'null' ? coloraccent : mcover.color.colors.color4)};
"
:onclick "playerctl play-pause"
"${mplay == 'Playing' ? 'pause' : 'play_arrow'}"
)
(button
:class "bar-icon-material bar-music-btn"
:style "
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color4 == 'null' ? coloraccent : mcover.color.colors.color4)};
"
:onclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
"skip_next"
)
)
)
)
)
)
)
)
+62
View File
@@ -0,0 +1,62 @@
(defwidget notifications_widget []
(box
:class "bar-pad"
:width 420
:height 60
(box
:space-evenly false
:orientation "h"
:class "bar-bg bar-bg-pad ${flash_notif ? 'bar-notif-flash' : ''}"
:spacing 5
(label
:class "bar-notif-count ${arraylength(notifications) > 0 ? 'bar-notif-count-yes' : 'bar-icon-material'} bar-txt-norm"
:halign "center" :valign "center"
:style "
${arraylength(notifications) > 0 ? 'font-size: 11pt;' : ''}
"
:text "${arraylength(notifications) > 0 ? arraylength(notifications) : ''}"
)
(revealer
:reveal {arraylength(notifications) == 0}
:transition "slideright"
:duration "0ms"
(label :class "bar-txt bar-txt-norm" :text "No notifications")
)
(revealer
:reveal {arraylength(notifications) > 0}
:transition "slideright"
:duration "0ms"
:hexpand true
(box
:valign "center"
:space-evenly false :orientation "v"
(box
:space-evenly false :orientation "h"
:spacing 5
(label :xalign 0
:hexpand true
:class "bar-txt bar-txt-norm"
:text "${arraylength(notifications) > 0 ? notifications[0]['summary'] : ''}"
:limit-width 25
)
(label :xalign 1
:class "bar-txt-smaller bar-txt-norm"
:text "${arraylength(notifications) > 0 ? notifications[0]['app_name'] : ''}"
:limit-width 10
)
(label :xalign 1
:class "bar-txt-smaller bar-txt-norm"
:text {arraylength(notifications) > 0 ? " • ${notifications[0]['time']}" : ''}
:limit-width 8
)
)
(label :xalign 0
:class "bar-txt-small bar-txt-norm"
:text "${arraylength(notifications) > 0 ? notifications[0]['body'] : ''}"
:limit-width 45
)
)
)
)
)
)
+41
View File
@@ -0,0 +1,41 @@
(defwidget bright_osd_widget []
(eventbox
:halign "start"
:onscroll "echo $(echo {} | sed -e 's/down/-U 3/g' -e 's/up/-A 3/g' | xargs light) && scripts/brightness osd &"
:onmiddleclick "playerctl play-pause"
:onrightclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
:onclick "${open_sideleft ?
(EWW_CMD + ' update bar_offset=0 && ' + EWW_CMD + ' update open_sideleft=false &') :
(EWW_CMD + ' open sideleft && ' + EWW_CMD + ' update bar_offset=1 && ' + EWW_CMD + ' update open_sideright=false && ' + EWW_CMD + ' update open_sideleft=true &')}"
(box
:class "osd-pad"
:width 390
(box
:space-evenly false
:halign "start"
:class "osd-bg"
:style "
${osd_bright ? 'transition: 150ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 150ms cubic-bezier(0.3, 0, 0.8, 0.15);'}
${osd_bright ? '' : 'margin-left: -200px; margin-right: 200px;'}
"
(circular-progress
:value {brightness.level > 100 ? 100 : round(brightness.level, 0)}
:class "osd-circle"
:thickness 3
:start-at 75
(button
:class "inside-circle"
(label :class "bar-txt-smaller bar-txt-norm"
:text {round(brightness.level, 0) == 100 ? '' : round(brightness.level, 0)}
)
)
)
(label :xalign 1 :hexpand true
:class "bar-txt bar-txt-norm"
:style "margin-right: 5px;"
:text "Brightness"
)
)
)
)
)
+42
View File
@@ -0,0 +1,42 @@
(defwidget volume_osd_widget []
(eventbox
:halign "end"
:onscroll "echo $(echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%) && scripts/volume osd &"
:onmiddleclick "playerctl play-pause"
:onrightclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
:onclick "${open_sideright ?
(EWW_CMD + ' update bar_offset=0 && ' + EWW_CMD + ' update open_sideright=false &') :
(EWW_CMD + ' open sideright && ' + EWW_CMD + ' update bar_offset=-1 && ' + EWW_CMD + ' update open_sideleft=false && ' + EWW_CMD + ' update open_sideright=true && ' + EWW_CMD + ' update notifications=\"$(scripts/notifget)\" &')}"
(box
:class "osd-pad"
:width 390
(box
:space-evenly false
:halign "end"
:class "osd-bg"
:style "
${osd_vol ? 'transition: 150ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 150ms cubic-bezier(0.3, 0, 0.8, 0.15);'}
${osd_vol ? '' : 'margin-left: 200px; margin-right: -200px;'}
"
(label :xalign 0 :hexpand true
:class "bar-txt bar-txt-norm"
:style "margin-left: 5px;"
:text "Volume"
)
(circular-progress
:value {volume.percent > 100 ? 100 : volume.percent}
:class "osd-circle"
:thickness 3
:start-at 75
:halign "start"
(button
:class "inside-circle"
(label :class "bar-txt-smaller bar-txt-norm"
:text {volume.percent > 100 ? 100 : volume.percent}
)
)
)
)
)
)
)
+42
View File
@@ -0,0 +1,42 @@
(defwidget sysinfo_widget []
(box
:class "bar-pad"
:width 420
:height 60
(box
:space-evenly false
:orientation "h"
:class "bar-bg bar-bg-pad"
:spacing 10
(image
:class "bar-sysinfo-distro-logo"
:path "./images/icons/distros/${distro}"
:image-width "30"
:image-height "30"
)
(box
:hexpand true
:orientation "v"
:valign "center"
(label :xalign 0
:class "bar-txt clr-accent"
:style "
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color7 == 'null' ? coloraccent : mcover.color.colors.color7)};
"
:text "${kernel}"
)
(label :xalign 0
:class "bar-txt-small clr-accent"
:style "
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color7 == 'null' ? coloraccent : mcover.color.colors.color7)};
"
:text "${packages} packages"
)
)
(label
:class "bar-txt"
:text "${diskfree} free disk space"
)
)
)
)
+120
View File
@@ -0,0 +1,120 @@
(defwidget system_widget []
(box
:class "bar-pad"
:width 420
:height 60
(box
:space-evenly false :spacing 5
:class "bar-bg bar-bg-pad"
(box ; Clock
:space-evenly false :orientation "v"
:valign "center"
:hexpand true
:class "bar-pad-horiz"
(label :xalign 0 :class "bar-txt-larger clr-accent"
:style "
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color7 == 'null' ? coloraccent : mcover.color.colors.color7)};
"
:text "${time.hour}:${time.minute}"
)
(label :xalign 0 :class "bar-txt-smaller clr-accent"
:style "
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color7 == 'null' ? coloraccent : mcover.color.colors.color7)};
"
:text "${time.day}, ${time.date}"
)
)
(box ; Icons
:space-evenly false :spacing 10
:orientation "h"
:class "bar-pad-horiz-moreright"
(box
:valign "center"
:orientation "v"
:space-evenly false :spacing -4
(label :class "bar-icon-material bar-system-icon bar-txt-norm"
:text "keyboard"
)
(label :class "bar-txt-tiny bar-txt-norm" :text {lang_ibus.name_abbr})
)
(label
:valign "center"
:class "bar-icon-material bar-system-icon bar-txt-norm"
:text {WIFI_ICONS[net.level]}
)
(label
:valign "center"
:class "bar-icon-material bar-system-icon bar-txt-norm"
:text {bluetooth.icon}
)
)
(box ; Resources
:space-evenly false :spacing -6
:orientation "v"
:valign "center"
(box ; CPU
:space-evenly false :orientation "h" :spacing 5
(label
:class "bar-icon-material bar-resources-icon bar-txt-norm"
:text ""
)
(progress
:valign "center"
:class "bar-prog"
:value {EWW_CPU.avg}
)
)
(box ; RAM
:space-evenly false :orientation "h" :spacing 5
(label
:class "bar-icon-material bar-resources-icon bar-txt-norm"
:text "Memory"
)
(progress
:valign "center"
:class "bar-prog"
:value {memory.percentage}
)
)
(box ; Swap
:space-evenly false :orientation "h" :spacing 5
(label
:class "bar-icon-material bar-resources-icon bar-txt-norm"
:text ""
)
(progress
:valign "center"
:class "bar-prog"
:value {memory.swappercentage}
)
)
)
(box ; Battery
:class "bar-circle-pad"
(circular-progress
:value "${battery.percentage > 100 ? 100 : battery.percentage}"
:class "bar-batt-circle"
:thickness 3
:start-at 75
:style "
color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color7 == 'null' ? coloraccent : mcover.color.colors.color7)};
"
(box
:width 27 :height 27
:tooltip "Battery: ${battery.percentage}%"
:style "color: ${battery.color}; background-color: ${battery.bgcolor};"
(label
:halign "center" :valign "center"
:class "bar-txt-smaller bar-txt-norm"
:style "
font-size: 10pt;
${battery.quickicon == '' ? '' : ('color: ' + coloraccent + ';')}
"
:text "${battery.percentage}"
)
)
)
)
)
)
)
+40
View File
@@ -0,0 +1,40 @@
(defwidget taskbar_widget []
(overlay
(box
:class "bar-pad"
:width 420
:height 60
(box
:space-evenly false :spacing 5
:class "bar-bg bar-bg-pad"
)
)
(scroll
:hscroll true
:vscroll false
:width 395
(box
:halign "center"
:space-evenly false
(for app in tasks
(eventbox
:onclick "${app.count > 0 ? ('hyprctl dispatch workspace ' + app.workspace[0] + ' &') : (app.exec)}"
(overlay
(box
:class "bar-tasks-app-pad"
(image
:class "bar-tasks-app-icon${app.class == awin.class ? '-active' : ''}"
:path {app.icon}
:image-width 25 :image-height 25
)
)
(box
:class "bar-tasks-app-highlight-${app.class == awin.class ? 'true' : 'false'}"
)
)
)
)
)
)
)
)
+56
View File
@@ -0,0 +1,56 @@
(defwidget workspaces_widget []
(eventbox
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
:onmiddleclick "scripts/toggle-powerview.sh &"
:onrightclick "scripts/toggle-powerview.sh &"
(overlay
; Only displays workspace state (has windows or not)
(box
:width {26*10 + WORKSPACE_SIDE_PAD*2}
:class "bar-pad"
(box
:class "bar-bg"
:style "padding: 0 15px;"
)
)
(box
:spacing 0
:space-evenly false
:halign "center"
(for i in workspace
(button
:onclick "hyprctl dispatch workspace ${i.num}"
:class "bar-ws-btn"
(label
:valign "center"
:class "bar-ws-txt bar-txt-norm"
:width 26 :height 26
:style "
background-color: ${i.clr};
"
:text "${ws-icons[i.num - 1]}"
)
; "●"
)
)
)
; Use a separate indicator for active workspace (animations, yay) (and more performant)
(button
:class "ws"
:style "
margin-left: ${26 * (activews - 1) + WORKSPACE_SIDE_PAD}px;
margin-right: ${26 * (10 - activews) + WORKSPACE_SIDE_PAD}px;
"
(label
:valign "center"
:class "bar-ws-txt bar-ws-txt-active"
:style "
background-color: ${colormode == 'one' ? coloraccent : (mcover.color.colors.color7 == 'null' ? coloraccent : mcover.color.colors.color7)};
"
:text "${activews}"
)
; "●"
)
)
)
)