commit 52a9d18aafb82645beff2fa738675907ed20a123 Author: r0r-5chach Date: Thu Jul 6 19:26:47 2023 +0100 .config files diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc new file mode 100644 index 0000000..b04ec58 --- /dev/null +++ b/.config/dunst/dunstrc @@ -0,0 +1,7 @@ +[global] +font = "OpenDyslexic Nerd Font" +follow = mouse +background = "#17002FBF" +foreground = "#04FFF7" +frame_color = "#17002FBF" +corner_radius= 10 diff --git a/.config/eww/colors.scss b/.config/eww/colors.scss new file mode 100644 index 0000000..001a46d --- /dev/null +++ b/.config/eww/colors.scss @@ -0,0 +1,21 @@ +$text_color: #04FFF7; + +$clock_background: linear-gradient(0deg, rgba(218,34,255,1) 0%, rgba(151,51,238) 100%); + +$workspace_button_background: linear-gradient(0deg, rgba(168,192,255,1) 0%, rgba(63,43,150,1) 100%); + +$volume_scale_color: rgba(247,121,125); + +$hardware_background: linear-gradient(0deg, rgba(255,226,89,1) 0%, rgba(255,167,81,1) 100%); + +$ram_scale_color: #C6FFDD; +$disk_scale_color: #12C2E9; +$battery_scale_color: #FF0099; + +$font: OpenDyslexic Nerd Font; + +$bar_background: transparent; + +$drop_shadow_color: gray; + +$notification_draw_background: $clock_background; diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss new file mode 100644 index 0000000..c0e2ffd --- /dev/null +++ b/.config/eww/eww.scss @@ -0,0 +1,18 @@ +@import "colors.scss"; +@import "widgets/clock/clock.scss"; +@import "widgets/hardware_stats/hardware-tab/hardware.scss"; +@import "widgets/active_window/active_window.scss"; +@import "widgets/workspaces/workspaces.scss"; +@import "widgets/volume/volume.scss"; +@import "widgets/notification-draw/notification-draw.scss"; + +* { + all: unset; + font-family: $font; + font-weight: bold; +} + +.bar { + background-color: $bar_background; +} + diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck new file mode 100644 index 0000000..1de7565 --- /dev/null +++ b/.config/eww/eww.yuck @@ -0,0 +1,43 @@ +(include "widgets/hardware_stats/hardware-tab/hardware_tab.yuck") +(include "widgets/bar/bar.yuck") +(include "widgets/active_window/active_window.yuck") + +(defwindow bar + :monitor 0 + :geometry (geometry :x "0%" + :y "0px" + :width "100%" + :height "30px" + :anchor "top center") + :stacking "fg" + :windowtype "dock" + :wm-ignore false + :exclusive true + (box + (active_window) + (bar))) + +(defwindow hardware_stats + :monitor 0 + :geometry (geometry :x "0%" + :y "0px" + :width "0px" + :height "100px" + :anchor "right top") + :stacking "fg" + :focusable false + :wm-ignore false + (box + (hardware_tab))) + +(defwindow notification_draw + :monitor 0 + :geometry (geometry :x "0%" + :y "0px" + :width "0px" + :height "100%" + :anchor "top right") + :stacking "fg" + :focusable false + :wm-ignore false + (box)) diff --git a/.config/eww/widgets/active_window/active_window.scss b/.config/eww/widgets/active_window/active_window.scss new file mode 100644 index 0000000..852b046 --- /dev/null +++ b/.config/eww/widgets/active_window/active_window.scss @@ -0,0 +1,4 @@ +.active_window { + margin-right: -10em; + color: $text_color; +} diff --git a/.config/eww/widgets/active_window/active_window.yuck b/.config/eww/widgets/active_window/active_window.yuck new file mode 100644 index 0000000..59d5f91 --- /dev/null +++ b/.config/eww/widgets/active_window/active_window.yuck @@ -0,0 +1,10 @@ +(defwidget active_window [] + (box :orientation "h" + :halign "end" + :space-evenly false + :class "active_window" + {active_window_name == "" ? "" : "${active_window_name}: ${active_window_title}"})) + +(defpoll active_window_name :interval "1s" "hyprctl activewindow | awk 'FNR==9{print substr($0,9)}'") + +(defpoll active_window_title :interval "1s" "hyprctl activewindow | awk 'FNR==10{print substr($0,9,40)}'") diff --git a/.config/eww/widgets/bar/bar.yuck b/.config/eww/widgets/bar/bar.yuck new file mode 100644 index 0000000..5ce7c8c --- /dev/null +++ b/.config/eww/widgets/bar/bar.yuck @@ -0,0 +1,14 @@ +(include "widgets/clock/clock.yuck") +(include "widgets/hardware_stats/hardware-tab/hardware_button.yuck") +(include "widgets/volume/volume.yuck") +(include "widgets/workspaces/workspaces.yuck") + +(defwidget bar [] + (box :orientation "h" + :class "bar" + :halign "end" + :space-evenly "false" + (volume_button) + (hardware_button) + (workspaces_button) + (clock))) diff --git a/.config/eww/widgets/clock/clock.scss b/.config/eww/widgets/clock/clock.scss new file mode 100644 index 0000000..413018c --- /dev/null +++ b/.config/eww/widgets/clock/clock.scss @@ -0,0 +1,12 @@ +.clock { + color: $text_color; + background: $clock_background; + /* Shaping and positioning */ + border-radius: 10em; /* Pill-Shaped */ + padding-right: 1em; + padding-left: 1em; + margin-right: 0.25em; + margin-top: 0.25em; + margin-bottom: 0.25em; + box-shadow: 1px 0px 1px 1px $drop_shadow_color; +} diff --git a/.config/eww/widgets/clock/clock.yuck b/.config/eww/widgets/clock/clock.yuck new file mode 100644 index 0000000..1ae2bd4 --- /dev/null +++ b/.config/eww/widgets/clock/clock.yuck @@ -0,0 +1,14 @@ +(defwidget clock [] + (eventbox :halign "end" + :onhover "eww update clock_hover=true" + :onhoverlost "eww update clock_hover=false" + :onclick notification_cmd + (box :class "clock" + {clock_hover ? clock_time_s : clock_time_ns}))) + +(defvar clock_hover false) + +(defvar notification_cmd "widgets/notification-draw/toggle-notification-draw") + +(defpoll clock_time_ns :interval "1s" "date '+\%H:\%M'") +(defpoll clock_time_s :interval "1s" "date '+\%H:\%M:\%S'") diff --git a/.config/eww/widgets/hardware_stats/battery/battery-icon.png b/.config/eww/widgets/hardware_stats/battery/battery-icon.png new file mode 100644 index 0000000..dafe67e Binary files /dev/null and b/.config/eww/widgets/hardware_stats/battery/battery-icon.png differ diff --git a/.config/eww/widgets/hardware_stats/battery/battery.scss b/.config/eww/widgets/hardware_stats/battery/battery.scss new file mode 100644 index 0000000..87256a5 --- /dev/null +++ b/.config/eww/widgets/hardware_stats/battery/battery.scss @@ -0,0 +1,3 @@ +.battery-scale { + color: $battery_scale_color; +} diff --git a/.config/eww/widgets/hardware_stats/battery/battery.yuck b/.config/eww/widgets/hardware_stats/battery/battery.yuck new file mode 100644 index 0000000..ca44758 --- /dev/null +++ b/.config/eww/widgets/hardware_stats/battery/battery.yuck @@ -0,0 +1,15 @@ +(defwidget battery [] + (circular-progress :class "battery-scale" + :value {EWW_BATTERY["BAT0"].capacity} + :start-at 75 + :thickness 2.5 + :clockwise true + (box :orientation "v" + (box :class "hardware" + (image + :image-width 16 + :path {matches(EWW_BATTERY["BAT0"].status, "Full")? bat_full_icon : matches(EWW_BATTERY["BAT0"].status, "Charging") ? bat_charging_icon : bat_icon}))))) + +(defvar bat_full_icon "widgets/hardware_stats/battery/full-icon.png") +(defvar bat_charging_icon "widgets/hardware_stats/battery/charging-icon.png") +(defvar bat_icon "widgets/hardware_stats/battery/battery-icon.png") diff --git a/.config/eww/widgets/hardware_stats/battery/charging-icon.png b/.config/eww/widgets/hardware_stats/battery/charging-icon.png new file mode 100644 index 0000000..03fe32d Binary files /dev/null and b/.config/eww/widgets/hardware_stats/battery/charging-icon.png differ diff --git a/.config/eww/widgets/hardware_stats/battery/full-icon.png b/.config/eww/widgets/hardware_stats/battery/full-icon.png new file mode 100644 index 0000000..748747f Binary files /dev/null and b/.config/eww/widgets/hardware_stats/battery/full-icon.png differ diff --git a/.config/eww/widgets/hardware_stats/disk-used/disk-icon.png b/.config/eww/widgets/hardware_stats/disk-used/disk-icon.png new file mode 100644 index 0000000..7a41428 Binary files /dev/null and b/.config/eww/widgets/hardware_stats/disk-used/disk-icon.png differ diff --git a/.config/eww/widgets/hardware_stats/disk-used/disk-used.scss b/.config/eww/widgets/hardware_stats/disk-used/disk-used.scss new file mode 100644 index 0000000..493eb14 --- /dev/null +++ b/.config/eww/widgets/hardware_stats/disk-used/disk-used.scss @@ -0,0 +1,3 @@ +.disk-scale { + color: $disk_scale_color; +} diff --git a/.config/eww/widgets/hardware_stats/disk-used/disk-used.yuck b/.config/eww/widgets/hardware_stats/disk-used/disk-used.yuck new file mode 100644 index 0000000..b93e14f --- /dev/null +++ b/.config/eww/widgets/hardware_stats/disk-used/disk-used.yuck @@ -0,0 +1,11 @@ +(defwidget disk_used [] + (circular-progress :class "disk-scale" + :value {EWW_DISK["/"].used_perc} + :start-at 75 + :thickness 2.5 + :clockwise true + (image + :path disk_icon + :image-width 16))) + +(defvar disk_icon "widgets/hardware_stats/disk-used/disk-icon.png") diff --git a/.config/eww/widgets/hardware_stats/hardware-tab/button-icon.png b/.config/eww/widgets/hardware_stats/hardware-tab/button-icon.png new file mode 100644 index 0000000..de49a7e Binary files /dev/null and b/.config/eww/widgets/hardware_stats/hardware-tab/button-icon.png differ diff --git a/.config/eww/widgets/hardware_stats/hardware-tab/hardware.scss b/.config/eww/widgets/hardware_stats/hardware-tab/hardware.scss new file mode 100644 index 0000000..f4bd739 --- /dev/null +++ b/.config/eww/widgets/hardware_stats/hardware-tab/hardware.scss @@ -0,0 +1,37 @@ +@import "../ram-used/ram-used.scss"; +@import "../disk-used/disk-used.scss"; +@import "../battery/battery.scss"; + +.hardware_button { + border-radius: 100em; /* Circle shaped */ + background: $hardware_background; + /* Positioning */ + margin-top: 0.25em; + margin-right: 0.25em; + margin-bottom: 0.25em; + box-shadow: 1px 0px 1px 1px $drop_shadow_color; +} + +.hardware_icon { + padding: 0.25em; +} + +.hardware_tab { + background: $hardware_background; + border-radius: 1em; + padding: 0.5em; + margin-top: 0.5em; + margin-right: 0.5em; +} + +.hardware_tab > box { + margin-bottom: 0.25em; +} + +.hardware { + font-size: 0.4em; +} + +.hardware_text { + color: $text_color; +} diff --git a/.config/eww/widgets/hardware_stats/hardware-tab/hardware_button.yuck b/.config/eww/widgets/hardware_stats/hardware-tab/hardware_button.yuck new file mode 100644 index 0000000..08ca9fc --- /dev/null +++ b/.config/eww/widgets/hardware_stats/hardware-tab/hardware_button.yuck @@ -0,0 +1,18 @@ +(defwidget hardware_button [] + (box :class "hardware_button" + (eventbox + :onhover "${update_hardware_reveal}true" + :onhoverlost "${hardware_clicked ? "echo" : "${update_hardware_reveal}false"}" + :onclick "${hardware_clicked ? "${update_hardware_clicked}false" : "${update_hardware_clicked}true"}" + (image + :class "hardware_icon" + :path hardware_icon + :image-width 16 + )))) + +(defvar hardware_clicked false) + +(defvar update_hardware_clicked "eww update hardware_clicked=") +(defvar update_hardware_reveal "eww update hardware_reveal=") + +(defvar hardware_icon "widgets/hardware_stats/hardware-tab/button-icon.png") diff --git a/.config/eww/widgets/hardware_stats/hardware-tab/hardware_tab.yuck b/.config/eww/widgets/hardware_stats/hardware-tab/hardware_tab.yuck new file mode 100644 index 0000000..ac985af --- /dev/null +++ b/.config/eww/widgets/hardware_stats/hardware-tab/hardware_tab.yuck @@ -0,0 +1,21 @@ +(include "widgets/hardware_stats/ram-used/ram-used.yuck") +(include "widgets/hardware_stats/disk-used/disk-used.yuck") +(include "widgets/hardware_stats//temps/temps.yuck") +(include "widgets/hardware_stats/network-used/network-used.yuck") +(include "widgets/hardware_stats/battery/battery.yuck") + +(defwidget hardware_tab [] + (revealer + :reveal hardware_reveal + :transition "slideleft" + :duration "500ms" + (box :class "hardware_tab" :orientation "v" + (box :orientation "h" + (ram_used) + (disk_used)) + (box :orientation "h" + (battery) + (temps)) + (network_used)))) + +(defvar hardware_reveal false) diff --git a/.config/eww/widgets/hardware_stats/network-used/down-icon.png b/.config/eww/widgets/hardware_stats/network-used/down-icon.png new file mode 100644 index 0000000..f0b0b84 Binary files /dev/null and b/.config/eww/widgets/hardware_stats/network-used/down-icon.png differ diff --git a/.config/eww/widgets/hardware_stats/network-used/network-used.yuck b/.config/eww/widgets/hardware_stats/network-used/network-used.yuck new file mode 100644 index 0000000..1e540dc --- /dev/null +++ b/.config/eww/widgets/hardware_stats/network-used/network-used.yuck @@ -0,0 +1,15 @@ +(defwidget network_used [] + (box :orientation "h" + (box :class "hardware_text" + (image + :path net_up_icon + :image-width 16) + "${EWW_NET["wlan0"].NET_UP / 1000} kB/s") + (box :class "hardware_text" + (image + :path net_down_icon + :image-width 16) + "${EWW_NET["wlan0"].NET_DOWN / 1000 } kB/s"))) + +(defvar net_up_icon "widgets/hardware_stats/network-used/up-icon.png") +(defvar net_down_icon "widgets/hardware_stats/network-used/down-icon.png") diff --git a/.config/eww/widgets/hardware_stats/network-used/up-icon.png b/.config/eww/widgets/hardware_stats/network-used/up-icon.png new file mode 100644 index 0000000..17fd7d8 Binary files /dev/null and b/.config/eww/widgets/hardware_stats/network-used/up-icon.png differ diff --git a/.config/eww/widgets/hardware_stats/ram-used/ram-icon.png b/.config/eww/widgets/hardware_stats/ram-used/ram-icon.png new file mode 100644 index 0000000..52382ad Binary files /dev/null and b/.config/eww/widgets/hardware_stats/ram-used/ram-icon.png differ diff --git a/.config/eww/widgets/hardware_stats/ram-used/ram-used.scss b/.config/eww/widgets/hardware_stats/ram-used/ram-used.scss new file mode 100644 index 0000000..ea087ab --- /dev/null +++ b/.config/eww/widgets/hardware_stats/ram-used/ram-used.scss @@ -0,0 +1,3 @@ +.ram-scale { + color: $ram_scale_color; +} diff --git a/.config/eww/widgets/hardware_stats/ram-used/ram-used.yuck b/.config/eww/widgets/hardware_stats/ram-used/ram-used.yuck new file mode 100644 index 0000000..705f3ac --- /dev/null +++ b/.config/eww/widgets/hardware_stats/ram-used/ram-used.yuck @@ -0,0 +1,11 @@ +(defwidget ram_used [] + (circular-progress :class "ram-scale" + :value {EWW_RAM.used_mem_perc} + :start-at 75 + :thickness 2.5 + :clockwise true + (image + :path ram_icon + :image-width 24))) + +(defvar ram_icon "widgets/hardware_stats/ram-used/ram-icon.png") diff --git a/.config/eww/widgets/hardware_stats/temps/temps.yuck b/.config/eww/widgets/hardware_stats/temps/temps.yuck new file mode 100644 index 0000000..25c0681 --- /dev/null +++ b/.config/eww/widgets/hardware_stats/temps/temps.yuck @@ -0,0 +1,6 @@ +(defwidget temps [] + (box :orientation "v" + (box :class "hardware_text" + "CORE 0: ${EWW_TEMPS.CORETEMP_CORE_0}°C") + (box :class "hardware_text" + "CORE 1: ${EWW_TEMPS.CORETEMP_CORE_1}°C"))) diff --git a/.config/eww/widgets/notification-draw/notification-controls/muted-icon.png b/.config/eww/widgets/notification-draw/notification-controls/muted-icon.png new file mode 100644 index 0000000..cef59ed Binary files /dev/null and b/.config/eww/widgets/notification-draw/notification-controls/muted-icon.png differ diff --git a/.config/eww/widgets/notification-draw/notification-controls/normal-icon.png b/.config/eww/widgets/notification-draw/notification-controls/normal-icon.png new file mode 100644 index 0000000..6d2ba93 Binary files /dev/null and b/.config/eww/widgets/notification-draw/notification-controls/normal-icon.png differ diff --git a/.config/eww/widgets/notification-draw/notification-controls/notification-controls.yuck b/.config/eww/widgets/notification-draw/notification-controls/notification-controls.yuck new file mode 100644 index 0000000..3da04af --- /dev/null +++ b/.config/eww/widgets/notification-draw/notification-controls/notification-controls.yuck @@ -0,0 +1,16 @@ +(defwidget notification_controls [] + (box :orientation "h" + (eventbox + :onclick "dunstctl set-paused toggle && ${bell_toggle ? "${update_bell_toggle}false" : "${update_bell_toggle}true"}" + (image + :image-width 32 + :path {bell_toggle ? muted_icon : normal_icon})) + (button + :onclick "dunstctl history-clear" + "Clear") + )) + +(defvar bell_toggle false) +(defvar update_bell_toggle "eww update bell_toggle=") +(defvar muted_icon "widgets/notification-draw/notification-controls/muted-icon.png") +(defvar normal_icon "widgets/notification-draw/notification-controls/normal-icon.png") diff --git a/.config/eww/widgets/notification-draw/notification-draw.scss b/.config/eww/widgets/notification-draw/notification-draw.scss new file mode 100644 index 0000000..5bf70c1 --- /dev/null +++ b/.config/eww/widgets/notification-draw/notification-draw.scss @@ -0,0 +1,4 @@ +.draw { + background: $notification_draw_background; + padding: 1em; +} diff --git a/.config/eww/widgets/notification-draw/notification-draw.yuck b/.config/eww/widgets/notification-draw/notification-draw.yuck new file mode 100644 index 0000000..902b757 --- /dev/null +++ b/.config/eww/widgets/notification-draw/notification-draw.yuck @@ -0,0 +1,18 @@ +(include "widgets/notification-draw/notification-controls/notification-controls.yuck") +(include "widgets/notification-draw/notifications.yuck") + +(defwidget notification_draw [] + (revealer + :reveal notification_reveal + :transition "slideleft" + :duration "500ms" + (box :class "draw" + :orientation "v" + :space-evenly false + (box "Notifications") + (notification_controls) + {notification_history == "[]" ? "All Caught Up!" : "" } + (notifications :json notification_history)))) + +(defvar notification_reveal false) +(defpoll notification_history :interval "1s" "dunstctl history | jq '.data[]'") diff --git a/.config/eww/widgets/notification-draw/notification.yuck b/.config/eww/widgets/notification-draw/notification.yuck new file mode 100644 index 0000000..a6d4f6c --- /dev/null +++ b/.config/eww/widgets/notification-draw/notification.yuck @@ -0,0 +1,4 @@ +(defwidget notification [id text] + (box + text)) + diff --git a/.config/eww/widgets/notification-draw/notifications.yuck b/.config/eww/widgets/notification-draw/notifications.yuck new file mode 100644 index 0000000..12e5de2 --- /dev/null +++ b/.config/eww/widgets/notification-draw/notifications.yuck @@ -0,0 +1,8 @@ +(include "widgets/notification-draw/notification.yuck") + +(defwidget notifications [json] + (box :orientation "v" + (for entry in json + (notification + :id {entry.id,data} + :text {entry.summary.data})))) diff --git a/.config/eww/widgets/notification-draw/toggle-notification-draw b/.config/eww/widgets/notification-draw/toggle-notification-draw new file mode 100755 index 0000000..37085d7 --- /dev/null +++ b/.config/eww/widgets/notification-draw/toggle-notification-draw @@ -0,0 +1,5 @@ +if [ $(eww get notification_reveal) == true ]; then + eww update notification_reveal=false +else + eww update notification_reveal=true +fi diff --git a/.config/eww/widgets/volume/high-icon.png b/.config/eww/widgets/volume/high-icon.png new file mode 100644 index 0000000..19c9110 Binary files /dev/null and b/.config/eww/widgets/volume/high-icon.png differ diff --git a/.config/eww/widgets/volume/low-icon.png b/.config/eww/widgets/volume/low-icon.png new file mode 100644 index 0000000..82de5ab Binary files /dev/null and b/.config/eww/widgets/volume/low-icon.png differ diff --git a/.config/eww/widgets/volume/mid-icon.png b/.config/eww/widgets/volume/mid-icon.png new file mode 100644 index 0000000..74da8aa Binary files /dev/null and b/.config/eww/widgets/volume/mid-icon.png differ diff --git a/.config/eww/widgets/volume/mute-icon.png b/.config/eww/widgets/volume/mute-icon.png new file mode 100644 index 0000000..4fe5133 Binary files /dev/null and b/.config/eww/widgets/volume/mute-icon.png differ diff --git a/.config/eww/widgets/volume/setvolume b/.config/eww/widgets/volume/setvolume new file mode 100755 index 0000000..6e81108 --- /dev/null +++ b/.config/eww/widgets/volume/setvolume @@ -0,0 +1,8 @@ +case $1 in +up) + amixer sset Master 5%+ + ;; +down) + amixer sset Master 5%- + ;; +esac diff --git a/.config/eww/widgets/volume/volume.scss b/.config/eww/widgets/volume/volume.scss new file mode 100644 index 0000000..58f044f --- /dev/null +++ b/.config/eww/widgets/volume/volume.scss @@ -0,0 +1,8 @@ +.volume_button { + margin-top: 0.25em; + margin-right: 0.25em; +} + +.scale { + color: $volume_scale_color; +} diff --git a/.config/eww/widgets/volume/volume.yuck b/.config/eww/widgets/volume/volume.yuck new file mode 100644 index 0000000..e2eb8ba --- /dev/null +++ b/.config/eww/widgets/volume/volume.yuck @@ -0,0 +1,27 @@ +(defwidget volume_button [] + (eventbox + :onscroll "widgets/volume/setvolume {}" + :onclick "amixer sset Master ${mute_save} && ${muted ? '${update_mute_save}\'0%\' && ${update_muted}false' : '${update_mute_save}${volume_percent} && ${update_muted}true' }" + (box :class "volume_button" + (circular-progress :class "scale" + :value {replace(volume_percent, "%", "")} + :start-at 75 + :thickness 2.5 + :clockwise true + :width 24 + (image + :image-width 16 + :path {replace(volume_percent, "%", "") == 100 ? vol_high_icon : replace(volume_percent, "%", "") <= 0 ? vol_mute_icon : replace(volume_percent, "%", "") <= 25 ? vol_low_icon : replace(volume_percent, "%", "") <= 75 ? vol_mid_icon : vol_high_icon}))))) + +(defpoll volume_percent :interval "0.1s" "awk -F\"[][]\" '/Mono:/ { print $2 }' <(amixer sget Master)") + +(defvar mute_save "0%") +(defvar muted false) + +(defvar update_mute_save "eww update mute_save=") +(defvar update_muted "eww update muted=") + +(defvar vol_high_icon "widgets/volume/high-icon.png") +(defvar vol_mute_icon "widgets/volume/mute-icon.png") +(defvar vol_low_icon "widgets/volume/low-icon.png") +(defvar vol_mid_icon "widgets/volume/mid-icon.png") diff --git a/.config/eww/widgets/workspaces/setworkspace b/.config/eww/widgets/workspaces/setworkspace new file mode 100755 index 0000000..19725aa --- /dev/null +++ b/.config/eww/widgets/workspaces/setworkspace @@ -0,0 +1,18 @@ +case $1 in +up) + if [ "$2" -eq "$3" ]; then + hyprctl dispatch workspace 1 + else + new=$(($2+1)) + hyprctl dispatch workspace $new + fi + ;; +down) + if [ "$2" -eq 1 ]; then + hyprctl dispatch workspace $3 + else + new=$(($2-1)) + hyprctl dispatch workspace $new + fi + ;; +esac diff --git a/.config/eww/widgets/workspaces/workspaces.scss b/.config/eww/widgets/workspaces/workspaces.scss new file mode 100644 index 0000000..c316aaa --- /dev/null +++ b/.config/eww/widgets/workspaces/workspaces.scss @@ -0,0 +1,10 @@ +.workspace_button { + margin-top: 0.25em; + margin-right: 0.25em; + margin-bottom: 0.25em; + color: $text_color; + border-radius: 1em; + background: $workspace_button_background; + padding: 0.25em; + box-shadow: 1px 0px 1px 1px $drop_shadow_color; +} diff --git a/.config/eww/widgets/workspaces/workspaces.yuck b/.config/eww/widgets/workspaces/workspaces.yuck new file mode 100644 index 0000000..70915ab --- /dev/null +++ b/.config/eww/widgets/workspaces/workspaces.yuck @@ -0,0 +1,11 @@ +(defwidget workspaces_button [] + (eventbox + :onscroll "${setworkspace_cmd} {} ${workspace_active} ${workspace_total}" + :onclick "hyprctl dispatch workspace ${workspace_total + 1}" + (box :class "workspace_button" + "${workspace_active}/${workspace_total}"))) + +(defpoll workspace_total :interval "1s" "hyprctl workspaces | grep ID | awk 'BEGIN{max=0}{if(($3)>max) max=($3)}END {print max}'") +(defpoll workspace_active :interval "1s" "hyprctl activeworkspace | grep ID | awk 'END {print $3}'") + +(defvar setworkspace_cmd "widgets/workspaces/setworkspace") diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf new file mode 100644 index 0000000..55704e5 --- /dev/null +++ b/.config/hypr/hyprland.conf @@ -0,0 +1,113 @@ +monitor=,preferred,auto,auto + +# Source a file (multi-file configs) +source = ~/.config/hypr/prefs/app_shortcut_commands.conf +source = ~/.config/hypr/prefs/settings.conf +source = ~/.config/hypr/prefs/shortcuts.conf +source = ~/.config/hypr/prefs/startup.conf + +# Execute your favorite apps at launch +exec-once = $authentication_agent & $wallpaper_manager & $notification_manager & $widgets + +env = XCURSOR_SIZE,24 + +input { + kb_layout = $keyboard_layout + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +general { + + gaps_in = $inside_gaps + gaps_out = $outside_gaps + border_size = $border_size + col.active_border = $active_border_color + col.inactive_border = $inactive_border_color + + layout = dwindle +} + +decoration { + + rounding = 10 + blur = yes + blur_size = 3 + blur_passes = 1 + blur_new_optimizations = on + + inactive_opacity = 0.75 + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +dwindle { + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + new_is_master = true +} + +gestures { + workspace_swipe = off +} + +bind = $open_terminal, exec, $terminal_emulator +bind = $close_window, killactive, +bind = $exit_hyprland, exit, +bind = $open_file_explorer, exec, $file_explorer +bind = $toggle_floating, togglefloating, +bindr = $open_app_launcher,exec, $app_launcher +bind = $toggle_tile_split, togglesplit, # dwindle +bind = $open_browser, exec, $browser +bind = $lock_screen, exec ,$lockscreen_manager +bind = $window_to_new_workspace, $move_to_new_workspace +bind = $cycle_workspace, exec, $cycle_workspaces +bind = $maximise_window, fullscreen +bind = $fake_maximise, fakefullscreen +bind = $toggle_notifications, exec, $toggle_notification_draw + +binde = $volume_down, exec, $volume_down_percent +binde = $volume_up, exec, $volume_up_percent +bind = $volume_mute, exec, $volume_mute_cmd + +binde = $brightness_up, exec, $brightness_up_percent +binde = $brightness_down, exec, $brightness_down_percent + +# 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/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..d6d2063 --- /dev/null +++ b/.config/hypr/hyprpaper.conf @@ -0,0 +1,2 @@ +preload = ~/.config/hypr/wallpapers/bg.jpg +wallpaper = eDP-1,~/.config/hypr/wallpapers/bg.jpg diff --git a/.config/hypr/prefs/app_shortcut_commands.conf b/.config/hypr/prefs/app_shortcut_commands.conf new file mode 100644 index 0000000..55afbc8 --- /dev/null +++ b/.config/hypr/prefs/app_shortcut_commands.conf @@ -0,0 +1,22 @@ +$terminal_emulator=kitty + +$file_explorer=dolphin + +$browser=firefox + +$app_launcher=rofi -config ~/.config/rofi/runner.rasi -show + +$lockscreen_manager=swaylock + +$volume_percent=amixer sset Master +$volume_up_percent=$volume_percent 5%+ +$volume_down_percent=$volume_percent 5%- +$volume_mute_cmd=$volume_percent 0% + +$brightness_percent=brightnessctl set +$brightness_up_percent=$brightness_percent 10%+ +$brightness_down_percent=$brightness_percent 10%- + +$move_to_new_workspace=movetoworkspacesilent ,empty +$cycle_workspaces=~/.config/eww/widgets/workspaces/setworkspace up $(eww get workspace_active) $(eww get workspace_total) +$toggle_notification_draw=~/.config/eww/widgets/notification-draw/toggle-notification-draw diff --git a/.config/hypr/prefs/settings.conf b/.config/hypr/prefs/settings.conf new file mode 100644 index 0000000..c2cb020 --- /dev/null +++ b/.config/hypr/prefs/settings.conf @@ -0,0 +1,7 @@ +$keyboard_layout=gb + +$outside_gaps=10 +$inside_gaps=5 +$border_size=3.5 +$active_border_color=rgb(da22ff) rgb(9733ee) 45deg +$inactive_border_color=rgba(595959aa) diff --git a/.config/hypr/prefs/shortcuts.conf b/.config/hypr/prefs/shortcuts.conf new file mode 100644 index 0000000..e42dc9f --- /dev/null +++ b/.config/hypr/prefs/shortcuts.conf @@ -0,0 +1,33 @@ +$mainMod= SUPER + +$open_terminal= $mainMod, T + +$close_window= $mainMod, Q + +$exit_hyprland= $mainMod, O + +$open_file_explorer= $mainMod, E + +$toggle_floating= $mainMod, F + +$open_app_launcher= $mainMod, SUPER_L + +$toggle_tile_split= $mainMod, J + +$open_browser= $mainMod, B + +$lock_screen= $mainMod, L + +$maximise_window= $mainMod, M +$fake_maximise= SUPER_SHIFT, M + +$volume_up=, code:123 +$volume_down=, code:122 +$volume_mute=, code:121 + +$brightness_up=, code:233 +$brightness_down=, code:232 + +$window_to_new_workspace= $mainMod, W +$cycle_workspace= $mainMod, Tab +$toggle_notifications= $mainMod, N diff --git a/.config/hypr/prefs/startup.conf b/.config/hypr/prefs/startup.conf new file mode 100644 index 0000000..b6641b7 --- /dev/null +++ b/.config/hypr/prefs/startup.conf @@ -0,0 +1,7 @@ +$wallpaper_manager=hyprpaper + +$authentication_agent=/usr/lib/polkit-kde-authentication-agent-1 + +$notification_manager=dunst -c ~/.config/dunst/dunstrc + +$widgets=eww --restart open bar && eww open hardware_stats && eww open notification_draw diff --git a/.config/hypr/wallpapers/bg.jpg b/.config/hypr/wallpapers/bg.jpg new file mode 100644 index 0000000..6672e6c Binary files /dev/null and b/.config/hypr/wallpapers/bg.jpg differ diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..edb6498 --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,17 @@ +font_family OpenDyslexicM Nerd Font +font_size 7.5 + +background_opacity 0.5 +background #17002F +foreground #04FFF7 +cursor #04FFF7 + +color0 #04FFF7 +color1 #27388f +color2 #4D99DE +color3 #4DDEDA +color4 #DE68AF +color5 #8861DE +color6 #DEDA4D +color7 #667EEA +color8 #04FFF7 diff --git a/.config/rofi/runner.rasi b/.config/rofi/runner.rasi new file mode 100644 index 0000000..57d2f8d --- /dev/null +++ b/.config/rofi/runner.rasi @@ -0,0 +1,45 @@ +configuration { + show-icons: true; + modi: "drun"; + drun-display-format: "{name}"; + cycle: true; + display-drun: ">>> "; +} + +* { + font: "OpenDyslexic Nerd Font 12"; + foreground: #04FFF7; + background: rgba(23,0,47,0.75); +} + +inputbar { + children: [prompt,entry]; +} + +entry { + placeholder: "{App Name}"; +} + +element.alternate.normal { + background-color: transparent; +} + +element.normal.normal { + background-color: transparent; +} + +element.selected.normal { + background-color: #9733EE; + border-radius: 10; +} + +window { + y-offset: 50; + location: center; + anchor: center; + border: 0; +} + +listview { + lines: 5; +}