From 80d659878094ab1fe9014621cc65ef87c048a814 Mon Sep 17 00:00:00 2001
From: nils <nilspe@proton.me>
Date: Tue, 31 Dec 2024 02:23:01 +0100
Subject: [PATCH] closes #1, closes #2

---
 .config/dinit.d/graphical.d/mako  |  1 +
 .config/dinit.d/mako              |  2 ++
 .config/dinit.d/swaybg            |  2 +-
 .config/dinit.d/waybar            |  1 -
 .config/mako/config               |  9 +++++++
 .config/river/binds               |  4 +--
 .config/wal/templates/colors-mako |  9 +++++++
 .config/waybar/config             | 24 +++++++++---------
 .config/waybar/style.css          | 41 +++++++++----------------------
 .local/bin/update-greeter.sh      |  5 ++++
 .local/bin/wall.sh                | 22 +++++++++++++++++
 .zshrc                            |  6 ++---
 12 files changed, 76 insertions(+), 50 deletions(-)
 create mode 120000 .config/dinit.d/graphical.d/mako
 create mode 100644 .config/dinit.d/mako
 create mode 100644 .config/mako/config
 create mode 100644 .config/wal/templates/colors-mako
 create mode 100755 .local/bin/update-greeter.sh
 create mode 100755 .local/bin/wall.sh

diff --git a/.config/dinit.d/graphical.d/mako b/.config/dinit.d/graphical.d/mako
new file mode 120000
index 0000000..5ddb174
--- /dev/null
+++ b/.config/dinit.d/graphical.d/mako
@@ -0,0 +1 @@
+../mako
\ No newline at end of file
diff --git a/.config/dinit.d/mako b/.config/dinit.d/mako
new file mode 100644
index 0000000..a016eaf
--- /dev/null
+++ b/.config/dinit.d/mako
@@ -0,0 +1,2 @@
+type = process
+command = mako
diff --git a/.config/dinit.d/swaybg b/.config/dinit.d/swaybg
index fcad4eb..ce3445b 100644
--- a/.config/dinit.d/swaybg
+++ b/.config/dinit.d/swaybg
@@ -1,2 +1,2 @@
 type = process
-command = swaybg -m fill -i /home/n/Pictures/wallpaper.png
+command = swaybg -m fill -i /home/n/.cache/current_wallpaper.png
diff --git a/.config/dinit.d/waybar b/.config/dinit.d/waybar
index c399449..37f004e 100644
--- a/.config/dinit.d/waybar
+++ b/.config/dinit.d/waybar
@@ -1,3 +1,2 @@
 type = process
 command = waybar
-waits-for = swaync
diff --git a/.config/mako/config b/.config/mako/config
new file mode 100644
index 0000000..61a10eb
--- /dev/null
+++ b/.config/mako/config
@@ -0,0 +1,9 @@
+font=ProFontWindowsNerdFontMono 12
+default-timeout=8000
+margin=8
+border-size=2
+icon-path=/usr/share/icons/Papirus-Dark
+
+text-color=#c3c4c7
+background-color=#121320
+border-color=#5D629A
diff --git a/.config/river/binds b/.config/river/binds
index 48c6827..1157160 100755
--- a/.config/river/binds
+++ b/.config/river/binds
@@ -3,8 +3,8 @@
 # Things to spawn
 riverctl map normal Super Return spawn footclient
 riverctl map normal Super Space spawn fuzzel
-riverctl map normal Super Tab spawn "swaync-client -t -sw"
-riverctl map normal Super+Control S spawn 'pkill -9 slurp ; grim -g "$(slurp -d)" - | wl-copy -t image/png'
+riverctl map normal Super+Control S spawn 'pkill -9 slurp || grim -g "$(slurp)" - | wl-copy -t image/png'
+riverctl map normal Super Print spawn 'grim | wl-copy -t image/png'
 riverctl map normal Super V spawn pavucontrol
 
 # Super+Q to close the focused view
diff --git a/.config/wal/templates/colors-mako b/.config/wal/templates/colors-mako
new file mode 100644
index 0000000..fc168cc
--- /dev/null
+++ b/.config/wal/templates/colors-mako
@@ -0,0 +1,9 @@
+font=ProFontWindowsNerdFontMono 12
+default-timeout=8000
+margin=8
+border-size=2
+icon-path=/usr/share/icons/Papirus-Dark
+
+text-color={foreground}
+background-color={background}
+border-color={color1}
diff --git a/.config/waybar/config b/.config/waybar/config
index 3a36001..406478a 100644
--- a/.config/waybar/config
+++ b/.config/waybar/config
@@ -9,13 +9,16 @@
     "modules-right": [
       "tray",
       "battery",
-      "custom/notification"
     ],
+
     "layer": "bottom",
     "mode": "dock",
     "position": "top",
     "start_hidden": false,
     "fixed-center": true,
+    "height": 27,
+    "margin": 4,
+
     "battery": {
       "format": "{icon} {capacity}%",
       "format-charging": "󱟦 {capacity}%",
@@ -32,8 +35,11 @@
         "󰂂",
         "󰁹"
       ],
-      "format-plugged": "󱟦 {capacity}%"
+      "format-plugged": "󱟦 {capacity}%",
+      "tooltip": true,
+      "tooltip-format": "{timeTo}"
     },
+
     "clock": {
       "format": "{:L%H:%M  %A, %d %B}",
       "interval": 1,
@@ -41,6 +47,7 @@
       "locale": "C",
       "timezone": "Europe/Amsterdam"
     },
+
     "custom/notification": {
       "escape": "true",
       "exec": "swaync-client -swb",
@@ -50,22 +57,13 @@
       "return-type": "json",
       "tooltip": "false"
     },
+
     "tray": {
       "icon-size": 16,
       "reverse-direction": "true",
       "spacing": 10
     },
-    "height": 27,
-    "margin": 4,
-    "wlr/taskbar": {
-      "format": "{icon}",
-      "icon-size": 16,
-      "on-click": "activate",
-      "on-click-middle": "minimize-raise",
-      "on-click-right": "close",
-      "tooltip": "true",
-      "tooltip-format": "{title}"
-    },
+
     "river/tags": {
       "num-tags": 9,
       "tag-labels": [
diff --git a/.config/waybar/style.css b/.config/waybar/style.css
index fa37e42..d4ca263 100644
--- a/.config/waybar/style.css
+++ b/.config/waybar/style.css
@@ -6,6 +6,7 @@
   margin: 0;
   padding: 0;
   color: @foreground;
+  font-weight: 900;
 }
 
 #waybar {
@@ -16,48 +17,29 @@
   border-radius: 100px;
 }
 
-#taskbar, #battery, #tray, #custom-notification, #clock, #pulseaudio-slider, #tags {
-  margin: 2px 5px;
-  padding: 0 6px;
-  background-color: @color0;
-  border-radius: 5px;
-}
-
-#taskbar {
+#battery, #tray, #custom-notification, #clock, #tags, tooltip {
   margin: 0px 5px;
-  margin-left: 10px;
-}
-
-#taskbar button {
-  padding: 0 2px;
-  background-color: transparent;
-  border-radius: 2px;
-}
-
-#taskbar button.active {
-  border: 0px solid @color0;
-  border-bottom: 2px solid @color2;
-}
-
-#taskbar.empty {
-  padding: 0;
+  padding: 0 6px;
+  border-radius: 0px;
 }
 
 tooltip {
   background-color: @background;
-  border-radius: 3px;
-  color: @color1;
-  font-size:14px;
+  padding: 0 2px;
+}
+
+tooltip label {
+  color: @foreground;
+  font-size: 14px;
 }
 
 #battery {
   font-size: 16px;
-  font-weight: 900;
   color: @foreground;
+  margin-right: 10px;
 }
 
 #clock {
-  font-weight: 900;
   font-size: 16px;
   min-width: 50px;
   color: @foreground;
@@ -79,7 +61,6 @@ tooltip {
 }
 
 #tags * {
-  font-weight: 900;
   font-size: 16px;
   margin: 0;
   padding: 0;
diff --git a/.local/bin/update-greeter.sh b/.local/bin/update-greeter.sh
new file mode 100755
index 0000000..073a591
--- /dev/null
+++ b/.local/bin/update-greeter.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+doas cp ~/.cache/current_wallpaper.png /etc/greetd/
+doas cp ~/.cache/wal/colors-waybar.css /etc/greetd/wal/
+exit 0
diff --git a/.local/bin/wall.sh b/.local/bin/wall.sh
new file mode 100755
index 0000000..d9a449d
--- /dev/null
+++ b/.local/bin/wall.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [ "$#" -ne 1 ]; then
+  echo "Usage: wall.sh <path/to/wallpaper.png>"
+  exit 1
+fi
+
+cp "$1" ~/.cache/current_wallpaper.png
+
+wal -i ~/.cache/current_wallpaper.png -stne
+
+rm ~/.config/mako/config
+cp ~/.cache/wal/colors-mako ~/.config/mako/config
+makoctl reload
+
+notify-send "Kleuren geupdate!" -t 2000
+
+for service in swaybg waybar foot-server; do
+  dinitctl restart "$service"
+done
+
+exit 0
diff --git a/.zshrc b/.zshrc
index 5f8a5cc..072a016 100644
--- a/.zshrc
+++ b/.zshrc
@@ -2,13 +2,13 @@ HISTFILE=~/.histfile
 HISTSIZE=1000
 SAVEHIST=1000
 unsetopt autocd beep notify
+setopt PRINT_EXIT_VALUE
 bindkey -e
 zstyle :compinstall filename '~/.zshrc'
-autoload -Uz compinit promptinit 
+autoload -Uz compinit
 compinit
-promptinit
 export TERM=xterm-256color
-prompt redhat
+export PS1="[%n@%m %1~]%(#.#.$) "
 
 # Aliases
 alias ls="ls --color=auto"