💥 eww(bar/workspaces): fix workspace indicator with a literal script
This commit is contained in:
+9
-19
@@ -1,20 +1,10 @@
|
|||||||
|
; Variables
|
||||||
|
(include "variables.yuck")
|
||||||
|
|
||||||
; Windows
|
; Windows
|
||||||
(include "./windows/calendar.yuck")
|
(include "windows/calendar.yuck")
|
||||||
(include "./windows/control-center.yuck")
|
(include "windows/control-center.yuck")
|
||||||
(include "./windows/bar.yuck")
|
(include "windows/bar.yuck")
|
||||||
(include "./windows/powermenu.yuck")
|
(include "windows/powermenu.yuck")
|
||||||
(include "./windows/audio-popup.yuck")
|
(include "windows/audio-popup.yuck")
|
||||||
|
(include "windows/notification-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
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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 <span foreground='$selected_color'>$selected_color</span>, it was also copied to your clipboard!"
|
||||||
|
fi
|
||||||
@@ -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()
|
||||||
@@ -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
|
|
||||||
@@ -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()
|
|
||||||
@@ -1,11 +1,37 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# display workspaces before checking for events
|
#!/usr/bin/env bash
|
||||||
hyprctl -j workspaces | jq -c
|
|
||||||
|
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() {
|
handle() {
|
||||||
case $1 in
|
case $1 in
|
||||||
workspace* | destroyworkspace*) hyprctl -j workspaces | jq -c ;;
|
workspace*) print_workspaces_literal;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ box.audio-popup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.audio-popup .separator {
|
.audio-popup .separator {
|
||||||
box-shadow: 0 0 0 1px darken($color: $foreground, $amount: 25);
|
border-top: .5px solid rgba(darken($color: $foreground, $amount: 25), .7);
|
||||||
margin: 4px 0;
|
margin-bottom: 8px;
|
||||||
|
margin-left: 6px;
|
||||||
|
margin-right: 6px;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,3 +28,27 @@ box.audio-popup {
|
|||||||
color: $background;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+7
-12
@@ -33,26 +33,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.workspaces {
|
// Styles the literal script for workspace indicators
|
||||||
|
.workspaces {
|
||||||
padding: 2px 0px;
|
padding: 2px 0px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
||||||
& > button {
|
& > button {
|
||||||
padding: 0 0;
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
|
padding: 5px 12px;
|
||||||
background: $color1;
|
background: $color1;
|
||||||
transition: ease-in 80ms;
|
|
||||||
transition-property: all;
|
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
padding: 0 22px;
|
padding: 5px 22px;
|
||||||
background: $foreground;
|
background: $foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.default {
|
|
||||||
padding: 0 12px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,11 +175,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.notifications button {
|
.control-center-toggle button {
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
|
||||||
&.open, &:hover {
|
&.open {
|
||||||
background: $color3;
|
background: darken($color: $color3, $amount: 15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,14 @@ box.cc {
|
|||||||
.button-row {
|
.button-row {
|
||||||
margin: 7px 0;
|
margin: 7px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.color-picker {
|
||||||
|
padding-right: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.powermenu {
|
||||||
|
padding-right: 11px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-center .mediaplayer {
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -58,17 +58,20 @@ box.vertical-button-row {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button,
|
||||||
|
.button {
|
||||||
padding: 6px 10px;
|
padding: 6px 10px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover {
|
button:hover,
|
||||||
|
.button:hover {
|
||||||
background: darken($color: $color2, $amount: 5);
|
background: darken($color: $color2, $amount: 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active {
|
button:active,
|
||||||
|
.button:active {
|
||||||
background: darken($color: $color3, $amount: 10);
|
background: darken($color: $color3, $amount: 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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"`)
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
(overlay
|
(overlay
|
||||||
(scale :min 0
|
(scale :min 0
|
||||||
:max 100
|
:max 100
|
||||||
:value "${volume_json.output}"
|
:value "${json_volume.output}"
|
||||||
:orientation "horizontal"
|
:orientation "horizontal"
|
||||||
:draw-value false
|
:draw-value false
|
||||||
:flipped false
|
:flipped false
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
(overlay
|
(overlay
|
||||||
(scale :min 0
|
(scale :min 0
|
||||||
:max 100
|
:max 100
|
||||||
:value "${volume_json.source}"
|
:value "${json_volume.source}"
|
||||||
:orientation "horizontal"
|
:orientation "horizontal"
|
||||||
:draw-value false
|
:draw-value false
|
||||||
:flipped false
|
:flipped false
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
|
|
||||||
(deflisten json_audio :initial `{ "output": 35, "source": 80 }`
|
|
||||||
`sh ./scripts/get-volume-watch.sh`)
|
|
||||||
|
|
||||||
(defwidget audio []
|
(defwidget audio []
|
||||||
(eventbox :onclick "eww open --toggle audio-popup"
|
(eventbox :onclick "eww open --toggle audio-popup"
|
||||||
:class "audio-eventbox"
|
:class "audio-eventbox"
|
||||||
(box :class "audio"
|
(box :class "audio"
|
||||||
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-`
|
(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%-`
|
(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}%"))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
(defwidget control-center-toggle []
|
(defwidget cc-toggle []
|
||||||
(box :class "control-center-toggle"
|
(box :class "control-center-toggle"
|
||||||
(button :onclick "eww open --toggle control-center"
|
(button :onclick "eww open --toggle control-center"
|
||||||
" ")
|
" ")
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
|
|
||||||
(defpoll datetime :interval "10s"
|
|
||||||
`date +"%A %d, %H:%M"`)
|
|
||||||
|
|
||||||
(defwidget clock []
|
(defwidget clock []
|
||||||
(box :class "clock"
|
(box :class "clock"
|
||||||
(button :onclick "eww open calendar-window --toggle"
|
(button :onclick "eww open calendar-window --toggle"
|
||||||
"${datetime}")
|
"${day-name} ${day}, ${time}")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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 []
|
(defwidget workspaces []
|
||||||
(eventbox :onscroll "[[ {} == up ]] && hyprctl dispatch workspace e+1 >> /dev/null || hyprctl dispatch workspace e-1 >> /dev/null"
|
(eventbox :onscroll "[[ {} == up ]] && hyprctl dispatch workspace e+1 >> /dev/null || hyprctl dispatch workspace e-1 >> /dev/null"
|
||||||
(box :class "workspaces"
|
(literal :content literal_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" }"
|
|
||||||
"")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
(include "widgets/control-center/notification.yuck")
|
(include "widgets/control-center/notification.yuck")
|
||||||
|
|
||||||
(deflisten json_notification_history :initial "{[]}"
|
|
||||||
`python ./scripts/notification-watcher.py`)
|
|
||||||
|
|
||||||
(defwidget notifications []
|
(defwidget notifications []
|
||||||
(box :class "cc-notifications"
|
(box :class "cc-notifications"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
@@ -11,7 +8,7 @@
|
|||||||
(scroll :class "vertical-scroll"
|
(scroll :class "vertical-scroll"
|
||||||
:hscroll false
|
:hscroll false
|
||||||
:vscroll true
|
:vscroll true
|
||||||
:height 400 ; Adjust according to your screen size
|
:height 400 ; Adjust according to control center size
|
||||||
:vexpand true
|
:vexpand true
|
||||||
|
|
||||||
(box :class "notifications"
|
(box :class "notifications"
|
||||||
@@ -49,7 +46,7 @@
|
|||||||
"")
|
"")
|
||||||
(button :class "clear-all"
|
(button :class "clear-all"
|
||||||
:onclick "dunstctl history-clear"
|
:onclick "dunstctl history-clear"
|
||||||
"Clear all ")
|
"Clear all")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
(deflisten hostname :initial "GNU/Linux"
|
(defpoll hostname :initial "GNU/Linux"
|
||||||
|
:interval "24h"
|
||||||
`cat /etc/hostname`)
|
`cat /etc/hostname`)
|
||||||
|
|
||||||
(defpoll uptime_info :interval "50s"
|
(defpoll uptime_info :interval "50s"
|
||||||
@@ -29,6 +30,9 @@
|
|||||||
(button :class "lock"
|
(button :class "lock"
|
||||||
:onclick "hyprctl dispatch exec hyprlock"
|
:onclick "hyprctl dispatch exec hyprlock"
|
||||||
"")
|
"")
|
||||||
|
(button :class "color-picker"
|
||||||
|
:onclick "sh $HOME/.config/eww/scripts/color-picker.sh"
|
||||||
|
"")
|
||||||
(button :class "powermenu"
|
(button :class "powermenu"
|
||||||
:onclick "eww close-all; eww open powermenu"
|
:onclick "eww close-all; eww open powermenu"
|
||||||
"")
|
"")
|
||||||
|
|||||||
@@ -1,36 +1,72 @@
|
|||||||
|
|
||||||
(defwidget toggle-grid []
|
(defwidget toggle-grid []
|
||||||
(box :class "toggle-grid"
|
(box :class "toggle-grid"
|
||||||
|
:orientation "vertical"
|
||||||
|
(box :orientation "horizontal"
|
||||||
|
:class "row"
|
||||||
(grid-toggle :class "network"
|
(grid-toggle :class "network"
|
||||||
:icon ""
|
:icon ""
|
||||||
:header "Network"
|
:header "Network"
|
||||||
:active true ; This sets if toggle is enabled or not, put condition check here
|
:active true ; This sets if toggle is enabled or not, put condition check here
|
||||||
:body "Connected" ; Generally put state here
|
:body "Connected" ; Put state here (e.g.: enabled, disabled)
|
||||||
:visible true
|
:visible true
|
||||||
:max-width 128
|
|
||||||
:max-height 48
|
|
||||||
:onclick "notify-send 'Network' 'toggle network with nmcli!'"
|
: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}"
|
(eventbox :visible "${visible}"
|
||||||
:onclick "${onclick}"
|
:onclick "${onclick}"
|
||||||
:class "${class} ${ active ? 'active' : '' }"
|
:class "grid-toggle ${class} ${ active == true ? 'active' : '' } button"
|
||||||
(box :class "toggle"
|
(box :class "toggle"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:orientation "horizontal"
|
:orientation "horizontal"
|
||||||
|
:width 142
|
||||||
|
:height 52
|
||||||
|
|
||||||
(label :class "icon"
|
(label :class "icon"
|
||||||
:visible { icon != "" ? true : false }
|
:visible { icon != "" ? true : false }
|
||||||
:valign "center"
|
:valign "center"
|
||||||
"${icon}")
|
:text "${icon}")
|
||||||
|
|
||||||
(box :orientation "vertical"
|
(box :orientation "vertical"
|
||||||
|
:space-evenly false
|
||||||
(label :class "header"
|
(label :class "header"
|
||||||
"${header}")
|
:text "${header}"
|
||||||
|
:xalign 0)
|
||||||
(label :class "body"
|
(label :class "body"
|
||||||
"${body}")
|
:text "${body}"
|
||||||
|
:xalign 0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
(include "./widgets/audio-popup/output-slider.yuck")
|
(include "./widgets/audio-popup/output-slider.yuck")
|
||||||
(include "./widgets/audio-popup/source-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 []
|
(defwindow audio-popup []
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:namespace "eww-audio"
|
:namespace "eww-audio"
|
||||||
@@ -26,7 +23,7 @@
|
|||||||
(box :class "vertical-button-row"
|
(box :class "vertical-button-row"
|
||||||
(button :class "more-settings"
|
(button :class "more-settings"
|
||||||
:onclick "eww close audio-popup; hyprctl dispatch exec pavucontrol"
|
:onclick "eww close audio-popup; hyprctl dispatch exec pavucontrol"
|
||||||
(label :text "Show on Volume Control"
|
(label :text "More devices"
|
||||||
:xalign 0))
|
:xalign 0))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
+11
-1
@@ -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
|
(defwindow bar
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:geometry (geometry :width "100%"
|
:geometry (geometry :width "100%"
|
||||||
@@ -33,7 +43,7 @@
|
|||||||
(audio)
|
(audio)
|
||||||
(battery)
|
(battery)
|
||||||
(network)
|
(network)
|
||||||
(control-center-toggle)
|
(cc-toggle)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
|
|
||||||
(label :class "calendar-header"
|
(label :class "calendar-header"
|
||||||
:text "Calendar")
|
:text "${month-name}")
|
||||||
(calendar :class "month-calendar"
|
(calendar :class "month-calendar"
|
||||||
:show-details true
|
:show-details true
|
||||||
:show-heading true
|
:show-heading true
|
||||||
|
|||||||
@@ -18,6 +18,6 @@
|
|||||||
(quickactions)
|
(quickactions)
|
||||||
(toggle-grid)
|
(toggle-grid)
|
||||||
(mediaplayer :album_background true)
|
(mediaplayer :album_background true)
|
||||||
(notifications)
|
(notifications :notification-history json_notification_history)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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}")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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%
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
@@ -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!"
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
@@ -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 = <i>$FAIL <b>($ATTEMPTS)</b></i>
|
|
||||||
capslock_color = $color1
|
|
||||||
position = 0, 40
|
|
||||||
halign = center
|
|
||||||
valign = bottom
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
$wallpaper = /home/joaov/wallpapers/Miku City Sky.png
|
|
||||||
|
|
||||||
splash = true
|
|
||||||
preload = $wallpaper
|
|
||||||
wallpaper = , $wallpaper
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
dwindle {
|
|
||||||
pseudotile = true
|
|
||||||
preserve_split = true
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
#}
|
|
||||||
}
|
|
||||||
@@ -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:.*
|
|
||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user