diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | bin/.install.yml | 22 | ||||
| -rwxr-xr-x | bin/exit-menu-sway.sh (renamed from bin/exit-menu.sh) | 0 | ||||
| -rwxr-xr-x | bin/get-inhibit-idle-status.sh | 17 | ||||
| -rwxr-xr-x | bin/inhibit-idle.sh | 14 | ||||
| -rw-r--r-- | install-arch.yml | 9 | ||||
| -rw-r--r-- | vim/.install.yml | 2 | ||||
| -rw-r--r-- | zsh/config/environment.zsh | 2 |
8 files changed, 43 insertions, 24 deletions
@@ -1 +1,2 @@ **/__pycache__ +bin/compiled diff --git a/bin/.install.yml b/bin/.install.yml deleted file mode 100644 index e71e0ea..0000000 --- a/bin/.install.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Copy scripts -steps: - - !Link - from: "battery-notify.sh" - to: "~/bin/battery-notify.sh" - recursive: false - - !Link - from: "exit-menu.sh" - to: "~/bin/exit-menu.sh" - recursive: false - - !Link - from: "hyprctl-zoom-daemon.sh" - to: "~/bin/hyprctl-zoom-daemon.sh" - recursive: false - - !Link - from: "hyprctl-zoom.sh" - to: "~/bin/hyprctl-zoom.sh" - recursive: false - - !Link - from: "swayidle.sh" - to: "~/bin/swayidle.sh" - recursive: false diff --git a/bin/exit-menu.sh b/bin/exit-menu-sway.sh index 9c9f7ab..9c9f7ab 100755 --- a/bin/exit-menu.sh +++ b/bin/exit-menu-sway.sh diff --git a/bin/get-inhibit-idle-status.sh b/bin/get-inhibit-idle-status.sh new file mode 100755 index 0000000..9c74c4e --- /dev/null +++ b/bin/get-inhibit-idle-status.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -uo pipefail + +changescript="$(pidof "inhibit-idle.sh" || true)" +if [ -n "$changescript" ]; then + wait "$changescript" +fi + +idleprog="hypridle" + +isactive="$(systemctl --user is-active $idleprog)" +if [ "$isactive" = "active" ]; then + echo "{\"text\": \"running\", \"alt\": \"running\", \"tooltip\": \"$idleprog is running\", \"class\": \"running\" }" +else + echo "{\"text\": \"suspended\", \"alt\": \"suspended\", \"tooltip\": \"$idleprog is suspended\", \"class\": \"suspended\" }" +fi + diff --git a/bin/inhibit-idle.sh b/bin/inhibit-idle.sh new file mode 100755 index 0000000..c52ff41 --- /dev/null +++ b/bin/inhibit-idle.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -uo pipefail + +idleprog="hypridle" + +isactive="$(systemctl --user is-active $idleprog)" +if [ "$isactive" = "active" ]; then + systemctl --user stop $idleprog + notify-send "Idle Inhibitor" "$idleprog suspended (systemd)" +else + systemctl --user start $idleprog + notify-send "Idle Inhibitor" "$idleprog resumed (systemd)" +fi + diff --git a/install-arch.yml b/install-arch.yml index 3eab1b0..ef4d966 100644 --- a/install-arch.yml +++ b/install-arch.yml @@ -39,3 +39,12 @@ stages: symbolic: true - from_file: zsh/.install.yml + + - name: Link ~/bin + steps: + - !Link + from: "bin" + to: "~/.config/bin" + symbolic: true + + - !Shell "mkdir $HOME/bin/compiled" diff --git a/vim/.install.yml b/vim/.install.yml index 30935f4..b5782f5 100644 --- a/vim/.install.yml +++ b/vim/.install.yml @@ -8,5 +8,5 @@ steps: to: "~/.config/nvim" symbolic: true - # Install packer + # Install vim-plug - !Shell "sh -c 'curl -fLo \"${XDG_DATA_HOME:-$HOME/.local/share}\"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'" diff --git a/zsh/config/environment.zsh b/zsh/config/environment.zsh index 81f5f1c..0f9a8dd 100644 --- a/zsh/config/environment.zsh +++ b/zsh/config/environment.zsh @@ -6,7 +6,7 @@ ZSH_CONFIG=$HOME/.config/zsh export ZSH="$HOME/.oh-my-zsh" # User /bin -export PATH="$HOME/bin:$PATH:/home/leonardo/.local/bin" +export PATH="$HOME/bin:$HOME/bin/compiled:$PATH:/home/leonardo/.local/bin" # Exa colours export EXA_COLORS="uu=37:un=37:gu=37:gn=37:da=37" |
