First Upload
commit
554fc9879d
|
|
@ -0,0 +1,52 @@
|
||||||
|
PREFIX ?= $(HOME)/.config/systemd/user
|
||||||
|
BIN ?= $(HOME)/eww-icons/bin/update-eww.sh
|
||||||
|
ICONDIR = $(HOME)/eww-icons/icons
|
||||||
|
|
||||||
|
.PHONY: all install enable update uninstall icons dev
|
||||||
|
|
||||||
|
all: install
|
||||||
|
|
||||||
|
install: icons
|
||||||
|
@echo ">>> Installiere systemd Units..."
|
||||||
|
mkdir -p $(PREFIX)
|
||||||
|
systemctl --user link $(HOME)/eww-icons/systemd/*.service
|
||||||
|
systemctl --user link $(HOME)/eww-icons/systemd/*.timer
|
||||||
|
systemctl --user link $(HOME)/eww-icons/systemd/*.path
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
$(MAKE) enable
|
||||||
|
|
||||||
|
enable:
|
||||||
|
@echo ">>> Aktiviere Timer & Watcher..."
|
||||||
|
systemctl --user enable --now eww-update.timer remmina-watch.path
|
||||||
|
|
||||||
|
update:
|
||||||
|
@echo ">>> Update eww-Konfig..."
|
||||||
|
$(BIN)
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
@echo ">>> Deaktiviere Dienste..."
|
||||||
|
systemctl --user disable --now eww-update.timer remmina-watch.path || true
|
||||||
|
@echo ">>> Entferne Links..."
|
||||||
|
for unit in $(HOME)/eww-icons/systemd/*; do \
|
||||||
|
systemctl --user disable --now $$unit || true; \
|
||||||
|
rm -f $(PREFIX)/$$(basename $$unit); \
|
||||||
|
done
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
|
||||||
|
icons:
|
||||||
|
@echo ">>> Erstelle Dummy-Icons (falls nicht vorhanden)..."
|
||||||
|
mkdir -p $(ICONDIR)
|
||||||
|
if [ ! -f $(ICONDIR)/remmina.png ]; then \
|
||||||
|
convert -size 64x64 xc:lightblue -gravity center -pointsize 20 -annotate 0 "R" $(ICONDIR)/remmina.png; \
|
||||||
|
fi
|
||||||
|
if [ ! -f $(ICONDIR)/help.png ]; then \
|
||||||
|
convert -size 64x64 xc:lightgreen -gravity center -pointsize 20 -annotate 0 "S" $(ICONDIR)/help.png; \
|
||||||
|
fi
|
||||||
|
if [ ! -f $(ICONDIR)/reboot.png ]; then \
|
||||||
|
convert -size 64x64 xc:tomato -gravity center -pointsize 20 -annotate 0 "⟳" $(ICONDIR)/reboot.png; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
dev:
|
||||||
|
@echo ">>> Starte eww-Dock für Tests..."
|
||||||
|
eww close desktop-icons || true
|
||||||
|
eww open desktop-icons
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd ~/eww-icons || exit 1
|
||||||
|
|
||||||
|
# Config aktualisieren
|
||||||
|
git pull --rebase --autostash
|
||||||
|
|
||||||
|
# Link setzen, damit eww sie nutzt
|
||||||
|
rm -rf ~/.config/eww
|
||||||
|
ln -s ~/eww-icons ~/.config/eww
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
(defwindow desktop-icons
|
||||||
|
:geometry (geometry
|
||||||
|
:x "50%"
|
||||||
|
:y "50%"
|
||||||
|
:anchor "top left"
|
||||||
|
:width "400px"
|
||||||
|
:height "120px")
|
||||||
|
:stacking "fg" ;; oder "bg", je nach Geschmack
|
||||||
|
(box
|
||||||
|
:orientation "h"
|
||||||
|
:halign "center"
|
||||||
|
:spacing 40
|
||||||
|
|
||||||
|
(button
|
||||||
|
:class "icon-btn"
|
||||||
|
:tooltip "Remmina"
|
||||||
|
:onclick "remmina"
|
||||||
|
(image :path "~/.config/eww/icons/remmina.png" :width 64 :height 64))
|
||||||
|
|
||||||
|
(button
|
||||||
|
:class "icon-btn"
|
||||||
|
:tooltip "Support (coming soon)"
|
||||||
|
:onclick "notify-send 'Support kommt später...'"
|
||||||
|
(image :path "~/.config/eww/icons/help.png" :width 64 :height 64))
|
||||||
|
|
||||||
|
(button
|
||||||
|
:class "icon-btn"
|
||||||
|
:tooltip "Reboot"
|
||||||
|
:onclick "systemctl reboot"
|
||||||
|
(image :path "~/.config/eww/icons/reboot.png" :width 64 :height 64))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
.icon-btn {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
padding: 10px;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-btn:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
;; Hauptkonfig für Eww
|
||||||
|
;; Lädt die Desktop-Icons
|
||||||
|
|
||||||
|
(include "desktop-icons.yuck")
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 973 B |
Binary file not shown.
|
After Width: | Height: | Size: 166 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Eww Dock mit Icons
|
||||||
|
After=graphical.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/eww open desktop-icons
|
||||||
|
ExecStop=/usr/bin/eww close desktop-icons
|
||||||
|
Restart=on-failure
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Update eww config from git
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=%h/eww-icons/bin/update-eww.sh
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run eww-update at boot and daily
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=30s
|
||||||
|
OnUnitActiveSec=1d
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Watch for remmina process changes
|
||||||
|
|
||||||
|
[Path]
|
||||||
|
PathChanged=/proc
|
||||||
|
Unit=remmina-watch.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Check if remmina is running
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/bin/bash -c '
|
||||||
|
if pgrep -x remmina >/dev/null; then
|
||||||
|
systemctl --user stop eww-icons.service
|
||||||
|
else
|
||||||
|
systemctl --user start eww-icons.service
|
||||||
|
fi
|
||||||
|
'
|
||||||
Loading…
Reference in New Issue