mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
feat(config): add projects-sync systemd service and timer
This commit is contained in:
1 parent
cf1c0e2e3e
commit
542619cd4d
8 files changed
+33
-8
No files matched your search
@@ -16,6 +16,12 @@ if [ -f "$HOME/.config/systemd/user/kitty-day-save.service" ] && command -v syst
|
|||||||
systemctl --user daemon-reload || true
|
systemctl --user daemon-reload || true
|
||||||
systemctl --user enable --now kitty-day-save.service || true
|
systemctl --user enable --now kitty-day-save.service || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Symlink ~/Code repos into ~/Projects every 5 min (same role gate).
|
||||||
|
if [ -f "$HOME/.config/systemd/user/projects-sync.timer" ] && command -v systemctl >/dev/null 2>&1; then
|
||||||
|
systemctl --user daemon-reload || true
|
||||||
|
systemctl --user enable --now projects-sync.timer || true
|
||||||
|
fi
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -77,7 +77,3 @@ command -v atuin >/dev/null 2>&1 && eval "$(atuin init bash)"
|
|||||||
case ":$PATH:" in *:'/home/prad/.local/bin':*) ;; *) export PATH='/home/prad/.local/bin':"$PATH" ;; esac
|
case ":$PATH:" in *:'/home/prad/.local/bin':*) ;; *) export PATH='/home/prad/.local/bin':"$PATH" ;; esac
|
||||||
# <<< termium <<<
|
# <<< termium <<<
|
||||||
|
|
||||||
# Added by LM Studio CLI (lms)
|
|
||||||
export PATH="$PATH:/home/prad/.lmstudio/bin"
|
|
||||||
# End of LM Studio CLI section
|
|
||||||
|
|
||||||
@@ -75,6 +75,7 @@ keybind = ctrl+shift+x=text:\x02x
|
|||||||
|
|
||||||
# session picker: tmux-sessionx on prefix o
|
# session picker: tmux-sessionx on prefix o
|
||||||
keybind = ctrl+shift+o=text:\x02o
|
keybind = ctrl+shift+o=text:\x02o
|
||||||
|
keybind = super+enter=text:\x02o
|
||||||
keybind = ctrl+shift+enter=text:\x02z
|
keybind = ctrl+shift+enter=text:\x02z
|
||||||
keybind = ctrl+shift+z=text:\x02z
|
keybind = ctrl+shift+z=text:\x02z
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
GOPATH={{ .chezmoi.homeDir }}/.local/share/go
|
||||||
|
GOBIN={{ .chezmoi.homeDir }}/.local/share/go/bin
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Symlink ~/Code repos into ~/Projects
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=%h/.local/bin/projects-sync
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Keep ~/Projects in sync with ~/Code
|
||||||
|
|
||||||
|
# ponytail: polls every 5 min; ghq clones land two levels below ~/Code, out
|
||||||
|
# of reach of a non-recursive .path unit. Switch to inotify if 5 min is slow.
|
||||||
|
[Timer]
|
||||||
|
OnStartupSec=30s
|
||||||
|
OnUnitActiveSec=5min
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
@@ -7,3 +7,10 @@
|
|||||||
igpu=$(readlink -f /dev/dri/by-path/pci-0000:c4:00.0-card 2>/dev/null)
|
igpu=$(readlink -f /dev/dri/by-path/pci-0000:c4:00.0-card 2>/dev/null)
|
||||||
[ -e "$igpu" ] && export AQ_DRM_DEVICES="$igpu"
|
[ -e "$igpu" ] && export AQ_DRM_DEVICES="$igpu"
|
||||||
unset igpu
|
unset igpu
|
||||||
|
|
||||||
|
# EGL through Mesa only, for Hyprland and every app in the session. glvnd
|
||||||
|
# otherwise tries NVIDIA's vendor first (10_nvidia.json sorts before
|
||||||
|
# 50_mesa.json), so the compositor and GL apps open /dev/nvidiactl even
|
||||||
|
# though they render on the iGPU; when the eGPU drops off the bus, they
|
||||||
|
# would be holding it. CUDA does not go through EGL and is unaffected.
|
||||||
|
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
|
||||||
@@ -118,7 +118,3 @@ command -v atuin >/dev/null 2>&1 && eval "$(atuin init zsh)"
|
|||||||
case ":$PATH:" in *:'/home/prad/.local/bin':*) ;; *) export PATH='/home/prad/.local/bin':"$PATH" ;; esac
|
case ":$PATH:" in *:'/home/prad/.local/bin':*) ;; *) export PATH='/home/prad/.local/bin':"$PATH" ;; esac
|
||||||
# <<< termium <<<
|
# <<< termium <<<
|
||||||
|
|
||||||
# Added by LM Studio CLI (lms)
|
|
||||||
export PATH="$PATH:/home/prad/.lmstudio/bin"
|
|
||||||
# End of LM Studio CLI section
|
|
||||||
|
|
||||||
Reference in new issue
Block a user