diff --git a/eww/eww.yuck b/eww/eww.yuck
index b225a4a..5c41d63 100644
--- a/eww/eww.yuck
+++ b/eww/eww.yuck
@@ -1,20 +1,10 @@
+; Variables
+(include "variables.yuck")
+
; Windows
-(include "./windows/calendar.yuck")
-(include "./windows/control-center.yuck")
-(include "./windows/bar.yuck")
-(include "./windows/powermenu.yuck")
-(include "./windows/audio-popup.yuck")
-
-; Bar widgets
-(include "./widgets/bar/workspaces.yuck")
-(include "./widgets/bar/clock.yuck")
-(include "./widgets/bar/control-center.yuck")
-(include "./widgets/bar/audio.yuck")
-(include "./widgets/bar/media.yuck")
-(include "./widgets/bar/logo.yuck")
-(include "./widgets/bar/window.yuck")
-(include "./widgets/bar/network.yuck")
-(include "./widgets/bar/battery.yuck")
-
-; Control Center widgets
-
+(include "windows/calendar.yuck")
+(include "windows/control-center.yuck")
+(include "windows/bar.yuck")
+(include "windows/powermenu.yuck")
+(include "windows/audio-popup.yuck")
+(include "windows/notification-popup.yuck")
diff --git a/eww/scripts/active-workspace.sh b/eww/scripts/active-workspace.sh
deleted file mode 100644
index d1301c8..0000000
--- a/eww/scripts/active-workspace.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env
-
-hyprctl -j activeworkspace | jq -c
-
-handle() {
- case $1 in
- workspace*) hyprctl -j activeworkspace | jq -c ;;
- esac
-}
-
-socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
diff --git a/eww/scripts/color-picker.sh b/eww/scripts/color-picker.sh
new file mode 100644
index 0000000..77786ff
--- /dev/null
+++ b/eww/scripts/color-picker.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+send_notification() {
+ notify-send -u normal -a "Color Picker" "$1" "$2"
+}
+
+# Check if user has hyprpicker installed
+if ! [[ -f /bin/hyprpicker ]]; then
+ send_notification "An error occurred" "Looks like you don't have Hyprpicker installed! Try installing it before using the Color Picker tool."
+ exit 1
+fi
+
+selected_color=$(hyprpicker)
+
+if ! [[ $selected_color == "" ]]; then
+ wl-copy $selected_color
+ send_notification "Selected Color" "The selected color is $selected_color, it was also copied to your clipboard!"
+fi
diff --git a/eww/scripts/notification-daemon.py b/eww/scripts/notification-daemon.py
new file mode 100644
index 0000000..63f66d6
--- /dev/null
+++ b/eww/scripts/notification-daemon.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+
+# Original Script by vimjoyer, modified by retrozinndev
+# Licensed under the MIT License, as in vimjoyer's repository and also in retrozinndev's Hyprland Dots.
+# This script watches for notifications to display as a popup in eww.
+
+import threading
+import time
+import dbus
+import dbus.service
+from dbus.mainloop.glib import DBusGMainLoop
+from gi.repository import GLib
+
+class Notification:
+ def __init__(self, app_name, summary, body, icon, replaces_id, timeout):
+ self.app_name = app_name
+ self.summary = summary
+ self.body = body
+ self.icon = icon
+ self.replaces_id = replaces_id
+
+notifications_on_popup = []
+notifications = []
+notification_timeout = 10 # In seconds
+
+def remove_popup_notification(notification):
+ time.sleep(notification_timeout)
+ notifications.remove(notification)
+ reload_output()
+
+def add_popup_notification(notification):
+ notifications.insert(0, notification)
+ reload_output()
+ timer_thread = threading.Thread(target=remove_popup_notification, args=(notification,)) # Only used for notification popup, not history
+ timer_thread.start()
+
+def reload_output():
+ lastItem_notifications = len(notifications) - 1
+ output = ""
+
+ for item in notifications:
+ if item is not notifications[lastItem_notifications]:
+ output = output + f"{{ \"applicationName\": \"{item.app_name}\", \"image\": \"{item.icon}\", \"summary\": \"{item.summary}\", \"body\": \"{item.body}\", \"id\": {item.replaces_id}, \"timeout\": {item.timeout} }}, "
+
+ else:
+ output = "["+ output + f"{{ \"applicationName\": \"{item.app_name}\", \"image\": \"{item.icon}\", \"summary\": \"{item.summary}\", \"body\": \"{item.body}\", \"id\": {item.replaces_id}, \"timeout\": {item.timeout} }} ]"
+
+ print(f"{output}", flush=True)
+
+
+class NotificationServer(dbus.service.Object):
+ def __init__(self):
+ bus_name = dbus.service.BusName("org.freedesktop.Notifications", bus=dbus.SessionBus())
+ dbus.service.Object.__init__(self, bus_name, "/org/freedesktop/Notifications")
+
+ @dbus.service.method("org.freedesktop.Notifications", in_signature="susssasa{ss}i", out_signature="u")
+ def Notify(self, app_name, replaces_id, icon, summary, body, actions, hints, timeout):
+ add_popup_notification(Notification(app_name, summary, body, icon, replaces_id, timeout))
+ return 0
+
+ @dbus.service.method("org.freedesktop.Notifications", out_signature="ssss")
+ def GetServerInformation(self):
+ return ("Custom Notification Server", "ExampleNS", "1.0", "1.2")
+
+
+DBusGMainLoop(set_as_default=True)
+
+if __name__ == "__main__":
+ server = NotificationServer()
+ mainloop = GLib.MainLoop()
+ mainloop.run()
diff --git a/eww/scripts/notification-history.sh b/eww/scripts/notification-history.sh
deleted file mode 100644
index e75ce41..0000000
--- a/eww/scripts/notification-history.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-prev_history=$(dunstctl history)
-
-while true; do
- if ! [[ $prev_history == $(dunstctl history) ]]; then
- prev_history=$(dunstctl history)
- echo "$(echo $prev_history | jq -c '.data.[]')"
- fi
-done
diff --git a/eww/scripts/notification-watcher.py b/eww/scripts/notification-watcher.py
deleted file mode 100644
index 69566e3..0000000
--- a/eww/scripts/notification-watcher.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Original Script by vimjoyer, modified by retrozinndev
-# Licensed under the MIT License, as in vimjoyer's repository and also in retrozinndev's Hyprland Dots.
-
-import dbus
-import dbus.service
-from dbus.mainloop.glib import DBusGMainLoop
-from gi.repository import GLib
-import threading
-import time
-
-class Notification:
- def __init__(self, app_name, summary, body, icon):
- self.app_name = app_name
- self.summary = summary
- self.body = body
- self.icon = icon
-
-notifications = []
-
-def remove_notification(notification):
- time.sleep(10)
- notifications.remove(notification)
- reload_output()
-
-def add_notification(notification):
- notifications.insert(0, notification)
- reload_output()
- timer_thread = threading.Thread(target=remove_notification, args=(notification,))
- timer_thread.start()
-
-def reload_output():
-
- output = ""
- for notification in notifications:
- output = "aaaaaaaa"
-
- output.replace('\n', ' ')
- print(f"{ output }", flush=True)
-
-
-class NotificationServer(dbus.service.Object):
- def __init__(self):
- bus_name = dbus.service.BusName("org.freedesktop.Notifications", bus=dbus.SessionBus())
- dbus.service.Object.__init__(self, bus_name, "/org/freedesktop/Notifications")
-
- @dbus.service.method("org.freedesktop.Notifications", in_signature="susssasa{ss}i", out_signature="u")
- def Notify(self, app_name, replaces_id, app_icon, summary, body, actions, hints, timeout):
- add_notification(Notification(app_name, summary, body, app_icon))
- return 0
-
- @dbus.service.method("org.freedesktop.Notifications", out_signature="ssss")
- def GetServerInformation(self):
- return ("Custom Notification Server", "ExampleNS", "1.0", "1.2")
-
-
-DBusGMainLoop(set_as_default=True)
-
-if __name__ == "__main__":
- server = NotificationServer()
- mainloop = GLib.MainLoop()
- mainloop.run()
diff --git a/eww/scripts/workspaces.sh b/eww/scripts/workspaces.sh
index b113163..2ebd3cf 100644
--- a/eww/scripts/workspaces.sh
+++ b/eww/scripts/workspaces.sh
@@ -1,11 +1,37 @@
#!/usr/bin/env bash
-# display workspaces before checking for events
-hyprctl -j workspaces | jq -c
+#!/usr/bin/env bash
+
+print_workspaces_literal() {
+ active_workspace_id=$(hyprctl -j activeworkspace | jq .id | xargs)
+ existing_workspaces=$(hyprctl -j workspaces | jq .[].id | xargs)
+
+ output="
+(box :class \"workspaces\"
+ :space-evenly false
+ :orientation \"horizontal\""
+
+ for i in {1..10}; do
+ output=$output"
+ (button :onclick \"hyprctl dispatch workspace $i\"
+ :class { $active_workspace_id == $i ? \"active\" : \"\" }
+ :visible { \"$existing_workspaces\" =~ $i ? true : false }
+ \"\")"
+
+ if [ $i == 10 ]; then
+ output=$output")" # closes box if last
+ fi
+ done
+
+ echo "$(echo $output | xargs -0)"
+}
+
+# display workspaces on startup
+print_workspaces_literal
handle() {
case $1 in
- workspace* | destroyworkspace*) hyprctl -j workspaces | jq -c ;;
+ workspace*) print_workspaces_literal;;
esac
}
diff --git a/eww/styles/audio-popup.scss b/eww/styles/audio-popup.scss
index b2048a3..d6f6853 100644
--- a/eww/styles/audio-popup.scss
+++ b/eww/styles/audio-popup.scss
@@ -8,8 +8,10 @@ box.audio-popup {
}
.audio-popup .separator {
- box-shadow: 0 0 0 1px darken($color: $foreground, $amount: 25);
- margin: 4px 0;
+ border-top: .5px solid rgba(darken($color: $foreground, $amount: 25), .7);
+ margin-bottom: 8px;
+ margin-left: 6px;
+ margin-right: 6px;
border-radius: 1px;
}
@@ -26,3 +28,27 @@ box.audio-popup {
color: $background;
}
}
+
+
+.audio-popup {
+
+ trough {
+ background: darken($color: $foreground, $amount: 25);
+ border-radius: 6px;
+ }
+
+ trough highlight {
+ background: $foreground;
+ padding: 10px;
+ border-radius: inherit;
+ }
+
+ slider:active highlight {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+
+ scale {
+ padding: 10px;
+ }
+}
diff --git a/eww/styles/bar.scss b/eww/styles/bar.scss
index 3deb2b0..bfd2952 100644
--- a/eww/styles/bar.scss
+++ b/eww/styles/bar.scss
@@ -33,26 +33,21 @@
}
}
-.workspaces {
+// Styles the literal script for workspace indicators
+ .workspaces {
padding: 2px 0px;
border-radius: 10px;
& > button {
- padding: 0 0;
border-radius: 16px;
margin: 0 2px;
+ padding: 5px 12px;
background: $color1;
- transition: ease-in 80ms;
- transition-property: all;
&.active {
- padding: 0 22px;
+ padding: 5px 22px;
background: $foreground;
}
-
- &.default {
- padding: 0 12px;
- }
}
}
@@ -180,11 +175,11 @@
}
}
-.notifications button {
+.control-center-toggle button {
padding-left: 12px;
padding-right: 10px;
- &.open, &:hover {
- background: $color3;
+ &.open {
+ background: darken($color: $color3, $amount: 15);
}
}
diff --git a/eww/styles/control-center.scss b/eww/styles/control-center.scss
index 05e69d2..e255c45 100644
--- a/eww/styles/control-center.scss
+++ b/eww/styles/control-center.scss
@@ -27,6 +27,14 @@ box.cc {
.button-row {
margin: 7px 0;
}
+
+ .color-picker {
+ padding-right: 11px;
+ }
+
+ .powermenu {
+ padding-right: 11px;
+ }
}
.control-center .mediaplayer {
@@ -151,3 +159,47 @@ box.cc {
}
}
}
+
+.toggle-grid {
+ .grid-toggle .toggle {
+ margin: 0 6px;
+
+ &:first-child {
+ margin-left: 0;
+ }
+
+ &:last-child {
+ margin-right: 0;
+ }
+ }
+}
+
+.grid-toggle {
+
+ &.active {
+ background: darken($color: $color1, $amount: 2);
+ }
+
+ & > .toggle {
+ padding: 8px;
+ border-radius: 18px;
+
+ label {
+ font-family: "Cantarell", "0xProto Nerd Font";
+ }
+
+ .icon {
+ margin-right: 6px;
+ font-size: 16px;
+ }
+
+ label.header {
+ font-weight: 700;
+ font-size: 12px;
+ }
+
+ label.body {
+ font-size: 11px;
+ }
+ }
+}
diff --git a/eww/styles/general.scss b/eww/styles/general.scss
index df64ce1..d4e9843 100644
--- a/eww/styles/general.scss
+++ b/eww/styles/general.scss
@@ -58,17 +58,20 @@ box.vertical-button-row {
}
}
-button {
+button,
+.button {
padding: 6px 10px;
border-radius: 12px;
background: none;
}
-button:hover {
+button:hover,
+.button:hover {
background: darken($color: $color2, $amount: 5);
}
-button:active {
+button:active,
+.button:active {
background: darken($color: $color3, $amount: 10);
}
diff --git a/eww/variables.yuck b/eww/variables.yuck
new file mode 100644
index 0000000..ea34a35
--- /dev/null
+++ b/eww/variables.yuck
@@ -0,0 +1,31 @@
+; All globally used variables are stored here
+
+
+; Listeners
+(deflisten json_notification_history :initial `[]`
+`python scripts/notification-daemon.py`)
+
+(deflisten json_volume :initial `{ "output": 60, "source": 80 }`
+`sh scripts/get-volume-watch.sh`)
+
+(deflisten literal_workspaces :initial ""
+`sh scripts/workspaces.sh`)
+
+; Date and time
+(defpoll day-name :interval "5s"
+`date +"%A"`)
+
+(defpoll day :interval "5s"
+`date +"%d"`)
+
+(defpoll month :interval "5s"
+`date +"%m"`)
+
+(defpoll month-name :interval "5s"
+`date +"%B"`)
+
+(defpoll year :interval "5s"
+`date +"%Y"`)
+
+(defpoll time :interval "5s"
+`date +"%H:%M"`)
diff --git a/eww/widgets/audio-popup/output-slider.yuck b/eww/widgets/audio-popup/output-slider.yuck
index 85603a8..10a3ed6 100644
--- a/eww/widgets/audio-popup/output-slider.yuck
+++ b/eww/widgets/audio-popup/output-slider.yuck
@@ -5,7 +5,7 @@
(overlay
(scale :min 0
:max 100
- :value "${volume_json.output}"
+ :value "${json_volume.output}"
:orientation "horizontal"
:draw-value false
:flipped false
diff --git a/eww/widgets/audio-popup/source-slider.yuck b/eww/widgets/audio-popup/source-slider.yuck
index 4950e67..fc198ed 100644
--- a/eww/widgets/audio-popup/source-slider.yuck
+++ b/eww/widgets/audio-popup/source-slider.yuck
@@ -5,7 +5,7 @@
(overlay
(scale :min 0
:max 100
- :value "${volume_json.source}"
+ :value "${json_volume.source}"
:orientation "horizontal"
:draw-value false
:flipped false
diff --git a/eww/widgets/bar/audio.yuck b/eww/widgets/bar/audio.yuck
index 5e90cff..2578d6f 100644
--- a/eww/widgets/bar/audio.yuck
+++ b/eww/widgets/bar/audio.yuck
@@ -1,15 +1,12 @@
-(deflisten json_audio :initial `{ "output": 35, "source": 80 }`
-`sh ./scripts/get-volume-watch.sh`)
-
(defwidget audio []
(eventbox :onclick "eww open --toggle audio-popup"
:class "audio-eventbox"
(box :class "audio"
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-`
- (label :text "${ json_audio.output != 0 ? '' : '' } ${json_audio.output}%"))
+ (label :text "${ json_volume.output != 0 ? '' : '' } ${json_volume.output}%"))
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%-`
- (label :text "${ json_audio.source != 0 ? '' : '' } ${json_audio.source}%"))
+ (label :text "${ json_volume.source != 0 ? '' : '' } ${json_volume.source}%"))
)
)
)
diff --git a/eww/widgets/bar/control-center.yuck b/eww/widgets/bar/cc-toggle.yuck
similarity index 77%
rename from eww/widgets/bar/control-center.yuck
rename to eww/widgets/bar/cc-toggle.yuck
index 55f1382..40855aa 100644
--- a/eww/widgets/bar/control-center.yuck
+++ b/eww/widgets/bar/cc-toggle.yuck
@@ -1,5 +1,5 @@
-(defwidget control-center-toggle []
+(defwidget cc-toggle []
(box :class "control-center-toggle"
(button :onclick "eww open --toggle control-center"
" ")
diff --git a/eww/widgets/bar/clock.yuck b/eww/widgets/bar/clock.yuck
index 372ee3c..7cb08dd 100644
--- a/eww/widgets/bar/clock.yuck
+++ b/eww/widgets/bar/clock.yuck
@@ -1,10 +1,6 @@
-
-(defpoll datetime :interval "10s"
-`date +"%A %d, %H:%M"`)
-
(defwidget clock []
(box :class "clock"
(button :onclick "eww open calendar-window --toggle"
- "${datetime}")
+ "${day-name} ${day}, ${time}")
)
)
diff --git a/eww/widgets/bar/workspaces.yuck b/eww/widgets/bar/workspaces.yuck
index 51fc8ce..5f92a87 100644
--- a/eww/widgets/bar/workspaces.yuck
+++ b/eww/widgets/bar/workspaces.yuck
@@ -1,19 +1,6 @@
-(deflisten json_workspaces :initial '[{"id": "1"},{"id": "2"}]'
-`sh ./scripts/workspaces.sh`)
-
-(deflisten json_active_workspace :initial '{ "id": 1 }'
-`sh ./scripts/active-workspace.sh`)
-
(defwidget workspaces []
(eventbox :onscroll "[[ {} == up ]] && hyprctl dispatch workspace e+1 >> /dev/null || hyprctl dispatch workspace e-1 >> /dev/null"
- (box :class "workspaces"
- :space-evenly false
- (for workspace in json_workspaces
- (button :onclick "hyprctl dispatch workspace ${workspace.id}"
- :class "${ json_active_workspace.id == workspace.id ? "active" : "default" }"
- "")
- )
- )
+ (literal :content literal_workspaces)
)
)
diff --git a/eww/widgets/control-center/notifications.yuck b/eww/widgets/control-center/notifications.yuck
index 1b0b69f..b627fa6 100644
--- a/eww/widgets/control-center/notifications.yuck
+++ b/eww/widgets/control-center/notifications.yuck
@@ -1,8 +1,5 @@
(include "widgets/control-center/notification.yuck")
-(deflisten json_notification_history :initial "{[]}"
-`python ./scripts/notification-watcher.py`)
-
(defwidget notifications []
(box :class "cc-notifications"
:space-evenly false
@@ -11,7 +8,7 @@
(scroll :class "vertical-scroll"
:hscroll false
:vscroll true
- :height 400 ; Adjust according to your screen size
+ :height 400 ; Adjust according to control center size
:vexpand true
(box :class "notifications"
@@ -49,7 +46,7 @@
"")
(button :class "clear-all"
:onclick "dunstctl history-clear"
- "Clear all ")
+ "Clear all")
)
)
)
diff --git a/eww/widgets/control-center/quickactions.yuck b/eww/widgets/control-center/quickactions.yuck
index 88552af..a34ecfa 100644
--- a/eww/widgets/control-center/quickactions.yuck
+++ b/eww/widgets/control-center/quickactions.yuck
@@ -1,4 +1,5 @@
-(deflisten hostname :initial "GNU/Linux"
+(defpoll hostname :initial "GNU/Linux"
+ :interval "24h"
`cat /etc/hostname`)
(defpoll uptime_info :interval "50s"
@@ -13,7 +14,7 @@
:halign "start"
(label :xalign 0
- :text " ${hostname}"
+ :text " ${hostname}"
:class "hostname")
(label :xalign 0
@@ -29,6 +30,9 @@
(button :class "lock"
:onclick "hyprctl dispatch exec hyprlock"
"")
+ (button :class "color-picker"
+ :onclick "sh $HOME/.config/eww/scripts/color-picker.sh"
+ "")
(button :class "powermenu"
:onclick "eww close-all; eww open powermenu"
"")
diff --git a/eww/widgets/control-center/toggle-grid.yuck b/eww/widgets/control-center/toggle-grid.yuck
index 7a4c9ca..965ce52 100644
--- a/eww/widgets/control-center/toggle-grid.yuck
+++ b/eww/widgets/control-center/toggle-grid.yuck
@@ -1,36 +1,72 @@
+
(defwidget toggle-grid []
(box :class "toggle-grid"
- (grid-toggle :class "network"
- :icon ""
- :header "Network"
- :active true ; This sets if toggle is enabled or not, put condition check here
- :body "Connected" ; Generally put state here
- :visible true
- :max-width 128
- :max-height 48
- :onclick "notify-send 'Network' 'toggle network with nmcli!'"
+ :orientation "vertical"
+ (box :orientation "horizontal"
+ :class "row"
+ (grid-toggle :class "network"
+ :icon ""
+ :header "Network"
+ :active true ; This sets if toggle is enabled or not, put condition check here
+ :body "Connected" ; Put state here (e.g.: enabled, disabled)
+ :visible true
+ :onclick "notify-send 'Network' 'toggle network with nmcli!'"
+ )
+ (grid-toggle :class "bluetooth"
+ :icon ""
+ :header "Bluetooth"
+ :active false
+ :body "Connected"
+ :visible true
+ :onclick "notify-send 'Network' 'toggle network with nmcli!'"
+ )
+ (grid-toggle :class "dnd"
+ :icon ""
+ :header "Do Not Disturb"
+ :active false
+ :body "Disabled"
+ :visible true
+ :onclick "notify-send 'Network' 'toggle network with nmcli!'"
+ )
+ )
+ (box :orientation "horizontal"
+ :class "row"
+ :space-evenly false
+ (grid-toggle :class "airplane"
+ :icon ""
+ :header "Airplane Mode"
+ :active false
+ :body "Disabled"
+ :visible true
+ :onclick "notify-send 'Network' 'toggle network with nmcli!'"
+ )
)
)
)
-(defwidget grid-toggle [ class onclick active ?icon header body visible max-width max-height ]
+(defwidget grid-toggle [ class onclick active ?icon header body visible ]
(eventbox :visible "${visible}"
:onclick "${onclick}"
- :class "${class} ${ active ? 'active' : '' }"
+ :class "grid-toggle ${class} ${ active == true ? 'active' : '' } button"
(box :class "toggle"
:space-evenly false
:orientation "horizontal"
+ :width 142
+ :height 52
(label :class "icon"
:visible { icon != "" ? true : false }
:valign "center"
- "${icon}")
+ :text "${icon}")
(box :orientation "vertical"
+ :space-evenly false
(label :class "header"
- "${header}")
+ :text "${header}"
+ :xalign 0)
(label :class "body"
- "${body}")
+ :text "${body}"
+ :xalign 0)
)
)
)
diff --git a/eww/windows/audio-popup.yuck b/eww/windows/audio-popup.yuck
index 2524bc8..b234dba 100644
--- a/eww/windows/audio-popup.yuck
+++ b/eww/windows/audio-popup.yuck
@@ -1,9 +1,6 @@
(include "./widgets/audio-popup/output-slider.yuck")
(include "./widgets/audio-popup/source-slider.yuck")
-(deflisten volume_json :initial `{ "output": 60, "source": 80 }`
-`sh ./scripts/get-volume-watch.sh`)
-
(defwindow audio-popup []
:monitor 0
:namespace "eww-audio"
@@ -26,7 +23,7 @@
(box :class "vertical-button-row"
(button :class "more-settings"
:onclick "eww close audio-popup; hyprctl dispatch exec pavucontrol"
- (label :text "Show on Volume Control"
+ (label :text "More devices"
:xalign 0))
)
)
diff --git a/eww/windows/bar.yuck b/eww/windows/bar.yuck
index 7efd591..a82b2c6 100644
--- a/eww/windows/bar.yuck
+++ b/eww/windows/bar.yuck
@@ -1,3 +1,13 @@
+(include "./widgets/bar/workspaces.yuck")
+(include "./widgets/bar/clock.yuck")
+(include "./widgets/bar/cc-toggle.yuck")
+(include "./widgets/bar/audio.yuck")
+(include "./widgets/bar/media.yuck")
+(include "./widgets/bar/logo.yuck")
+(include "./widgets/bar/window.yuck")
+(include "./widgets/bar/network.yuck")
+(include "./widgets/bar/battery.yuck")
+
(defwindow bar
:monitor 0
:geometry (geometry :width "100%"
@@ -33,7 +43,7 @@
(audio)
(battery)
(network)
- (control-center-toggle)
+ (cc-toggle)
)
)
)
diff --git a/eww/windows/calendar.yuck b/eww/windows/calendar.yuck
index dc56634..2eceef6 100644
--- a/eww/windows/calendar.yuck
+++ b/eww/windows/calendar.yuck
@@ -10,7 +10,7 @@
:orientation "vertical"
(label :class "calendar-header"
- :text "Calendar")
+ :text "${month-name}")
(calendar :class "month-calendar"
:show-details true
:show-heading true
diff --git a/eww/windows/control-center.yuck b/eww/windows/control-center.yuck
index dc7b742..8a20d88 100644
--- a/eww/windows/control-center.yuck
+++ b/eww/windows/control-center.yuck
@@ -18,6 +18,6 @@
(quickactions)
(toggle-grid)
(mediaplayer :album_background true)
- (notifications)
+ (notifications :notification-history json_notification_history)
)
)
diff --git a/eww/windows/notification-popup.yuck b/eww/windows/notification-popup.yuck
new file mode 100644
index 0000000..c46c182
--- /dev/null
+++ b/eww/windows/notification-popup.yuck
@@ -0,0 +1,47 @@
+(defwindow floating-notification []
+ :monitor 0
+ :exclusive false
+ :focusable false
+ :namespace "eww-notification-popup"
+ :geometry (geometry :anchor "top right"
+ :width "128px"
+ :height "64px")
+ :stacking "overlay"
+
+ (box :class "floating-notifications"
+ (for item in json_notification_history
+ (floating-notification :summary "${item.summary}"
+ :body "${item.body}"
+ :image "${item.image}"
+ :app-name "${item.applicationName}")
+ )
+ )
+)
+
+(defwidget floating-notification [ summary body image app-name ]
+ (box :class "popup-notification"
+ :space-evenly false
+ :orientation "vertical"
+
+ (box :orientation "horizontal"
+ :class "top"
+
+ (label :text "${app-name}")
+ )
+
+ (box :orientation "horizontal"
+ (box :class "image"
+ :style "background-image: ${image};")
+
+ (box :class "content"
+ :orientation "vertical"
+
+ (label :class "summary"
+ :text "${summary}")
+
+ (label :class "body"
+ :text "${body}")
+ )
+ )
+ )
+)
diff --git a/hypr/autostart.conf b/hypr/autostart.conf
deleted file mode 100644
index ccc51be..0000000
--- a/hypr/autostart.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-
-###############
-## AUTOSTART ##
-###############
-
-exec-once = /usr/lib/hyprpolkitagent # Experimental Hyprland Polkit Agent
-exec-once = eww daemon && eww open bar # Daemon + Status Bar
-exec-once = dunst # Notification Daemon
-exec-once = hyprpaper # Wallpaper
-exec-once = hypridle # Idle daemon
-
-# Load pywal from cache
-exec-once = wal -R
-
-# Clipboard manager
-exec-once = wl-paste --type text --watch cliphist store # Stores text
-exec-once = wl-paste --type image --watch cliphist store # Stores images
-
-# Apps
-exec-once = /bin/vesktop --start-minimized
-exec-once = /bin/steam-runtime -silent
diff --git a/hypr/bindings.conf b/hypr/bindings.conf
deleted file mode 100644
index 58f47a6..0000000
--- a/hypr/bindings.conf
+++ /dev/null
@@ -1,117 +0,0 @@
-##############
-## BINDINGS ##
-##############
-
-# https://wiki.hyprland.org/Configuring/Keywords and https://wiki.hyprland.org/Configuring/Binds for information on how to configure input
-
-$terminal = kitty
-$fileManager = nautilus
-$menu = anyrun
-$dmenu = anyrun --plugins libstdin.so
-$mainMod = SUPER
-$lockscreen = hyprlock
-$screenshotDir = $HOME/Screenshots
-$screenshotFull = hyprshot -m output -o $screenshotDir
-$screenshotSelect = hyprshot -m region -o $screenshotDir
-$media = spotify-launcher
-
-
-# Main binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
-bind = $mainMod, K, exec, $terminal
-bind = $mainMod, Q, killactive
-bind = $mainMod, E, exec, $fileManager
-bind = $mainMod, F, togglefloating
-bind = $mainMod, SPACE, exec, $menu
-bind = $mainMod, P, pseudo,
-bind = $mainMod, J, togglesplit
-bind = $mainMod, F11, fullscreen
-bind = $mainMod, N, exec, eww open --toggle control-center
-bind = $mainMod, L, exec, $lockscreen
-
-# Media keys
-bind = , XF86AudioMedia, exec, $media
-bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Decrease volume
-bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ # Increase volume
-bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle # Mute
-bind = , XF86AudioPrev, exec, playerctl previous # Previous media
-bind = , XF86AudioNext, exec, playerctl next # Next media
-bind = , XF86AudioPlay, exec, playerctl play-pause # Toggle Play/Pause media
-
-# Brightness Keys
-bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%- # Lower monitor brightness
-bind = , XF86MonBrightnessUp, exec, brightnessctl s +5% # Increase monitor brightness
-
-# Screenshot
-bind = , Print, exec, $screenshotSelect
-bind = $mainMod, Print, exec, $screenshotFull
-
-# Open clipboard
-bind = $mainMod, V, exec, cliphist list | $dmenu | cliphist decode | xargs -r wl-copy
-
-# Open wallpaper menu
-bind = $mainMod, W, exec, env bash $HOME/.config/hypr/scripts/change-wallpaper.sh
-
-# Reload binds
-# Eww
-bind = $mainMod, F7, exec, eww reload
-# Hyprpaper (Wallpaper)
-bind = $mainMod, F8, exec, pkill hyprpaper && hyprpaper
-# Dunst (Notification daemon)
-bind = $mainMod, F9, exec, pkill dunst && dunst
-
-# Move focus with mainMod + arrow keys
-bind = $mainMod, left, movefocus, l
-bind = $mainMod, right, movefocus, r
-bind = $mainMod, up, movefocus, u
-bind = $mainMod, down, movefocus, d
-
-# Move windows with keyboard keys
-bind = $mainMod SHIFT, left, movewindow, l
-bind = $mainMod SHIFT, right, movewindow, r
-bind = $mainMod SHIFT, up, movewindow, u
-bind = $mainMod SHIFT, down, movewindow, d
-bind = $mainMod SHIFT, C, centerwindow
-
-# Resize windows with arrowkeys
-bind = $mainMod ALT, left, resizeactive, -60 0
-bind = $mainMod ALT, right, resizeactive, 60 0
-bind = $mainMod ALT, up, resizeactive, 0 -60
-bind = $mainMod ALT, down, resizeactive, 0 60
-
-# Switch workspaces with mainMod + [0-9]
-bind = $mainMod, 1, workspace, 1
-bind = $mainMod, 2, workspace, 2
-bind = $mainMod, 3, workspace, 3
-bind = $mainMod, 4, workspace, 4
-bind = $mainMod, 5, workspace, 5
-bind = $mainMod, 6, workspace, 6
-bind = $mainMod, 7, workspace, 7
-bind = $mainMod, 8, workspace, 8
-bind = $mainMod, 9, workspace, 9
-bind = $mainMod, 0, workspace, 10
-
-# Move active window to a workspace with mainMod + SHIFT + [0-9]
-bind = $mainMod SHIFT, 1, movetoworkspace, 1
-bind = $mainMod SHIFT, 2, movetoworkspace, 2
-bind = $mainMod SHIFT, 3, movetoworkspace, 3
-bind = $mainMod SHIFT, 4, movetoworkspace, 4
-bind = $mainMod SHIFT, 5, movetoworkspace, 5
-bind = $mainMod SHIFT, 6, movetoworkspace, 6
-bind = $mainMod SHIFT, 7, movetoworkspace, 7
-bind = $mainMod SHIFT, 8, movetoworkspace, 8
-bind = $mainMod SHIFT, 9, movetoworkspace, 9
-bind = $mainMod SHIFT, 0, movetoworkspace, 10
-
-bind = CTRL $mainMod, right, workspace, e+1
-bind = CTRL $mainMod, left, workspace, e-1
-
-bind = $mainMod, S, togglespecialworkspace, magic
-bind = $mainMod SHIFT, S, movetoworkspace, special:magic
-
-# Scroll through existing workspaces with mainMod + scroll
-bind = $mainMod, mouse_down, workspace, e+1
-bind = $mainMod, mouse_up, workspace, e-1
-
-# Move/resize windows with mainMod + LMB/RMB and dragging
-bindm = $mainMod, mouse:272, movewindow
-bindm = $mainMod, mouse:273, resizewindow
diff --git a/hypr/decorations.conf b/hypr/decorations.conf
deleted file mode 100644
index ffc4c71..0000000
--- a/hypr/decorations.conf
+++ /dev/null
@@ -1,70 +0,0 @@
-
-################
-## DECORATION ##
-################
-
-# See https://wiki.hyprland.org/Configuring/Variables for more information on how to configure appearance
-
-source = ~/.cache/wal/colors-hypr.conf
-
-general {
- gaps_in = 6
- gaps_out = 8
-
- border_size = 2
-
- col.active_border = $color1
- col.inactive_border = $background
-
- resize_on_border = false
-
- allow_tearing = false
-
- layout = dwindle
-}
-
-misc {
- animate_manual_resizes = false
-}
-
-decoration {
- rounding = 14
-
- # Active Window Opacity
- active_opacity = 1.0
- # Inactive Window Opacity
- inactive_opacity = 0.95
-
- shadow {
- enabled = true
- range = 3
- render_power = 5
- color = $background
- }
-
- blur {
- enabled = true
- new_optimizations = true
- size = 7
- passes = 2
- vibrancy = 0.9
- }
-}
-
-animations {
- enabled = true
-
- bezier = myBezier, 0.05, 0.9, 0.1, 1.05
- bezier = amazingBezier, 0.25, 0.59, 0.1, 1.05
- bezier = layerBezier, 0.36, 0.58, 0.1, 1
-
- animation = windows, 1, 5, amazingBezier, slide
- animation = windowsOut, 1, 5, amazingBezier, slide
- animation = layers, 1, 6, layerBezier, slide
- animation = layersOut, 1, 6, layerBezier, slide
- animation = border, 1, 10, default
- animation = borderangle, 1, 8, default
- animation = fade, 1, 3.5, default
- animation = fadeLayers, 1, 7, amazingBezier
- animation = workspaces, 1, 4, amazingBezier, slidefade 20%
-}
diff --git a/hypr/environment.conf b/hypr/environment.conf
deleted file mode 100644
index 6db6d58..0000000
--- a/hypr/environment.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#################
-## ENVIRONMENT ##
-#################
-
-# Others
-env = XCURSOR_THEME, Adwaita
-env = XCURSOR_SIZE, 24
-env = HYPRCURSOR_THEME, Adwaita
-env = HYPRCURSOR_SIZE, 24
-env = QT_QPA_PLATFORM, wayland
-env = QT_QPA_PLATFORMTHEME, qt5ct
-env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
-env = XDG_CURRENT_DESKTOP, Hyprland
-env = XDG_SESSION_TYPE, wayland
-env = ADW_DISABLE_PORTAL, 1
-env = MOZ_ENABLE_WAYLAND, 1
diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf
deleted file mode 100644
index efc041d..0000000
--- a/hypr/hypridle.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-
-general {
- lock_cmd = echo "Locked Hyprland Session"
- unlock_cmd = echo "Unlocked Hyprland Session"
- ignore_dbus_inhibit = false
- ignore_systemd_inhibit = false
-}
-
-listener {
- timeout = 3600 # 1800 -> 30m | 3600 -> 1h | 7200 -> 2h
- on-timeout = hyprlock
- on-resume = notify-send "Welcome back to Hyprland, $USER!"
-}
diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf
deleted file mode 100644
index 47bee99..0000000
--- a/hypr/hyprland.conf
+++ /dev/null
@@ -1,37 +0,0 @@
-
-#############################################
-## Retrozinndev's Hyprland Configurations! ##
-#############################################
-
-# Nvidia Settings
-source = ~/.config/hypr/nvidia.conf
-
-# Environment
-source = ~/.config/hypr/environment.conf
-
-# Monitors
-source = ~/.config/hypr/monitors.conf
-
-# Layout
-source = ~/.config/hypr/layout.conf
-
-# Input
-source = ~/.config/hypr/input.conf
-
-# Devices
-# source = ~/.config/hypr/devices.conf # Uncomment this line to apply file, remember to make it first!
-
-# Plugins (you can comment if you want pure Hyprland)
-source = ~/.config/hypr/plugins.conf
-
-# Appearance
-source = ~/.config/hypr/decorations.conf
-
-# Autostart
-source = ~/.config/hypr/autostart.conf
-
-# Bindings
-source = ~/.config/hypr/bindings.conf
-
-# Rules
-source = ~/.config/hypr/rules.conf
diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf
deleted file mode 100644
index 20a69b4..0000000
--- a/hypr/hyprlock.conf
+++ /dev/null
@@ -1,95 +0,0 @@
-
-##############
-# LOCKSCREEN #
-##############
-
-# Source colors from pywal
-source = ~/.cache/wal/colors-hypr.conf
-
-# Fonts
-$font = Cantarell Regular
-$clockFont = Cantarell Black
-$minimalFont = Noto Sans Mono
-
-general {
- disable_loading_bar = true
- hide_cursor = false
-}
-
-background {
- monitor =
- path = $wallpaper
- blur_passes = 2
- color = $background
-}
-
-# Time
-label {
- monitor =
- text = cmd[update:30000] echo -e "$(date +"%R")" # 24-hours
- # text = cmd[update:30000] echo -e "$(date +"%I:%M %p")" # 12-hours (AM/PM)
- color = $foreground
- font_size = 120
- font_family = $clockFont
- position = 0, -60
- halign = center
- valign = top
-}
-
-# Date
-label {
- monitor =
- text = cmd[update:43200000] echo -e "$(date +"%A, %d %B %Y")"
- color = $foreground
- font_size = 20
- font_family = $font
- position = 0, -250
- halign = center
- valign = top
-}
-
-# Logged user
-label {
- monitor =
- font_size = 6
- font_family = $minimalFont
- color = $foreground
- text = Currently logged in as $USER
- halign = center
- valign = bottom
- position = 0, 5
-}
-
-# Avatar
-image {
- monitor =
- path = ~/.face
- size = 72
- border_color = $color2
- position = 0, 100
- halign = center
- valign = bottom
-}
-
-# Input (password)
-input-field {
- monitor =
- size = 180, 35
- outline_thickness = 2
- dots_size = .15
- dots_spacing = .6
- dots_center = true
- outer_color = $background
- inner_color = $color3
- font_color = $foreground
- fade_on_empty = false
- placeholder_text =
- hide_input = false
- check_color = $color4
- fail_color = $color1
- fail_text = $FAIL ($ATTEMPTS)
- capslock_color = $color1
- position = 0, 40
- halign = center
- valign = bottom
-}
diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf
deleted file mode 100644
index af85430..0000000
--- a/hypr/hyprpaper.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-
-$wallpaper = /home/joaov/wallpapers/Miku City Sky.png
-
-splash = true
-preload = $wallpaper
-wallpaper = , $wallpaper
diff --git a/hypr/input.conf b/hypr/input.conf
deleted file mode 100644
index 3729010..0000000
--- a/hypr/input.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-###########
-## INPUT ##
-###########
-
-
-input {
- kb_layout = br
- kb_variant = abnt2
- kb_model = pc105
-# kb_options =
-# kb_rules =
-
- numlock_by_default = true
- follow_mouse = 1
-
- sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
-
- touchpad {
- natural_scroll = true
- }
-}
-
-# https://wiki.hyprland.org/Configuring/Variables/#gestures
-gestures {
- workspace_swipe = true
-}
diff --git a/hypr/layout.conf b/hypr/layout.conf
deleted file mode 100644
index 4615a95..0000000
--- a/hypr/layout.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-dwindle {
- pseudotile = true
- preserve_split = true
-}
diff --git a/hypr/monitors.conf b/hypr/monitors.conf
deleted file mode 100644
index 1270eed..0000000
--- a/hypr/monitors.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-
-##############
-## MONITORS ##
-##############
-
-# Configure yout monitor(s) here! See https://wiki.hyprland.org/Configuring/Monitors for more information on how to do that!
-
-# Monitor Arguments
-# arg0 -> monitor name(you can get monitor names with `hyprctl monitors`);
-# arg1 -> resolution@hertz;
-# arg2 -> positioning from the top-left corner;
-# arg3 -> scaling;
-# arg4 -> variable refresh rate for games(optional);
-# arg5 -> 1: vrr enabled, 0: no vrr.
-
-monitor = HDMI-A-1, 1920x1080@75, 0x0, 1, vrr, 1
-
diff --git a/hypr/nvidia.conf b/hypr/nvidia.conf
deleted file mode 100644
index 7ea1013..0000000
--- a/hypr/nvidia.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#####################
-## NVIDIA SETTINGS ##
-#####################
-
-env = LIBVA_DRIVER_NAME, nvidia
-env = GBM_BACKEND, nvidia-drm
-env = __GLX_VENDOR_LIBRARY_NAME, nvidia
-env = _VK_LAYER_NV_optimus, NVIDIA_only
-env = __NV_PRIME_RENDER_OFFLOAD, 1
-
-cursor {
- # Set to true if you have issues
- no_hardware_cursors = true
-}
diff --git a/hypr/plugins.conf b/hypr/plugins.conf
deleted file mode 100644
index 7770f70..0000000
--- a/hypr/plugins.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-####################
-# HYPRLAND PLUGINS #
-####################
-
-# You can add your preferred plugins here. Get help on how to do so: https://wiki.hyprland.org/Plugins/Using-Plugins/
-
-plugin {
- # Example plugin configuration
- #hyprbars {
- # bar_height = 24
- # hyprbars-button = rgb(ff4040), 16, , hyprctl dispatch killactive
- # hyprbars-button = rgb(eeee11), 16, , hyprctl dispatch fullscreen 1
- #}
-}
diff --git a/hypr/rules.conf b/hypr/rules.conf
deleted file mode 100644
index 4209831..0000000
--- a/hypr/rules.conf
+++ /dev/null
@@ -1,72 +0,0 @@
-
-############################
-## WINDOW / LAYER RULES ##
-############################
-
-# See https://wiki.hyprland.org/Configuring/Window-Rules/ and https://wiki.hyprland.org/Configuring/Workspace-Rules/ for information on how to configure this
-
-# Floating windows
-windowrulev2 = float, class:moe.launcher.*
-windowrulev2 = float, class:com.github.rafostar.Clapper
-windowrulev2 = float, class:xdg-desktop-portal*
-windowrulev2 = float, class:org.pulseaudio.pavucontrol
-windowrulev2 = float, class:blueberry.py
-windowrulev2 = float, class:org.gnome.Loupe
-windowrulev2 = float, class:mcpelauncher-webview
-windowrulev2 = float, class:org.gnome.Calculator
-windowrulev2 = float, class:io.mrarm.mcpelauncher-ui-qt
-windowrulev2 = float, class:Resources
-
-# Resize
-windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol
-windowrulev2 = size 50% 50%, class:blueberry.py
-windowrulev2 = size 70% 70%, class:io.mrarm.mcpelauncher-ui-qt
-
-# Moving
-windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol
-windowrulev2 = move 49.27% 7.28%, class:blueberry.py
-windowrulev2 = movetoworkspace e, class:org.pulseaudio.pavucontrol
-
-# Animations
-windowrulev2 = animation slide right, class:org.pulseaudio.pavucontrol
-windowrulev2 = animation slide right, class:blueberry.py
-layerrule = animation slide right, swaync-control-center
-layerrule = animation fade, selection
-layerrule = animation fade, logout_dialog
-layerrule = animation fade, waybar
-layerrule = animation fade, hyprpaper
-layerrule = animation slide right, swaync-notification-window
-layerrule = animation fade, hyprpicker
-layerrule = animation fade, eww-calendar
-layerrule = animation fade, eww-audio
-
-# Opacity
-windowrulev2 = opacity .95 .95, class:kitty
-windowrulev2 = opacity .88 .88, class:spotify
-windowrulev2 = opacity .88 .88, class:hyprpolkitagent
-
-# No blur
-windowrulev2 = noblur, class:steam.*
-
-# Blur
-windowrulev2 = noblur, class:^()$, title:^()$
-
-# Window Blur list
-blurls = logout_dialog
-blurls = kitty
-blurls = eww-powermenu
-
-# Layer Blur list
-layerrule = blur, waybar
-layerrule = ignorealpha .5, waybar
-layerrule = blur, eww-bar
-layerrule = ignorealpha .5, eww-bar
-layerrule = blur, eww-calendar
-layerrule = ignorealpha .5, eww-calendar
-layerrule = blur, eww-cc
-layerrule = ignorealpha .5, eww-cc
-layerrule = blur, eww-audio
-layerrule = ignorealpha .5, eww-audio
-
-# Suppress maximize event from windows
-windowrulev2 = suppressevent maximize, class:.*
diff --git a/hypr/scripts/change-wallpaper.sh b/hypr/scripts/change-wallpaper.sh
deleted file mode 100644
index 0e40d8e..0000000
--- a/hypr/scripts/change-wallpaper.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env bash
-
-# This script is made by retrozinndev (João Dias), It is licensed under
-# the MIT License as in retrozinndev/Hyprland-Dots repository.
-# GitHub: https://github.com/retrozinndev
-# Dotfiles: https://github.com/retrozinndev/Hyprland-Dots
-
-# The script prompts the user with anyrun to choose an image file inside the defined
-# $WALLPAPER_DIR, after user selected a file, it automatically writes it to the
-# hyprpaper.conf file and hot reloads if hyprpaper is running.
-
-
-if [[ $WALLPAPER_DIR == "" ]]; then
- WALLPAPER_DIR="$HOME/wallpapers"
-fi
-
-HYPRPAPER_FILE="$HOME/.config/hypr/hyprpaper.conf"
-
-WALLPAPER_SELECT_CMD="anyrun --plugins libstdin.so"
-
-if [[ -z $(ls -A $WALLPAPER_DIR) ]]
-then
- exit 1
-fi
-
-Update_wallpaper_settings() {
- echo "Writing to hyprpaper config file"
-
- echo "" > $HYPRPAPER_FILE # Cleans Hyprpaper conf
-
- echo "\$wallpaper = $SET_WALLPAPER_FULL" >> $HYPRPAPER_FILE
- echo "" >> $HYPRPAPER_FILE
- echo "splash = true" >> $HYPRPAPER_FILE
- echo "preload = \$wallpaper" >> $HYPRPAPER_FILE
- echo "wallpaper = , \$wallpaper" >> $HYPRPAPER_FILE
-}
-
-Hot_reload_wallpaper() {
- echo "Hot-reloading wallpaper"
- hyprctl hyprpaper unload all
- hyprctl hyprpaper preload "$SET_WALLPAPER_FULL"
- hyprctl hyprpaper wallpaper ", $SET_WALLPAPER_FULL"
-}
-
-Reload_pywal() {
- echo "Reloading pywal colorscheme"
- wal -q -t --cols16 darken -i "$SET_WALLPAPER_FULL"
-}
-
-Reload_eww() {
- echo "Reloading Eww..."
- eww reload
-}
-
-# Prompt wallpapers via dmenu
-SET_WALLPAPER_NAME="$(ls $WALLPAPER_DIR | $WALLPAPER_SELECT_CMD)"
-SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME"
-
-echo "Wallpaper: $SET_WALLPAPER_NAME"
-
-# Check if input wallpaper is empty
-if [[ $SET_WALLPAPER_NAME == "" ]] || [[ $SET_WALLPAPER_NAME == " " ]]
-then
- echo "No wallpaper has been selected by user!"
- if [ $RANDOM_WALLPAPER_WHEN_EMPTY = true ]
- then
- SET_WALLPAPER_NAME=$(ls $WALLPAPER_DIR | shuf -n 1)
- echo "Selected random wallpaper from $HOME/wallpapers: $SET_WALLPAPER_NAME"
- SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME"
-
- else
- echo "Skipping hyprpaper changes and exiting."
- exit 1
- fi
-fi
-
-Hot_reload_wallpaper
-Reload_pywal
-Reload_eww
-Update_wallpaper_settings
-
-exit 0