Compare commits

...

3 commits

10 changed files with 36 additions and 14 deletions

View file

@ -20,6 +20,7 @@ declare -A mapper=(
["hyprland"]="$HOME/.config/hypr/hyprland.conf"
["nvim"]="$HOME/.config/astronvim/lua/user/"
["polybar"]="$HOME/.config/polybar"
["projectsrc"]="$HOME/.config/projectsrc"
["qutebrowser"]="$HOME/.config/qutebrowser/config.py"
["qutebrowser-kiosk"]="$HOME/.config/qutebrowser/config_kiosk.py"
["rclone"]="$HOME/.config/rclone/rclone.conf"
@ -51,7 +52,7 @@ declare -A directory=(
)
declare -A hooks=(
["autostart.toml"]="autostart-manage sync"
["projectsrc"]="projects-status"
["qutebrowser"]="qutebrowser :config-source"
["qutebrowser-kiosk"]="qutebrowser-kiosk :config-source" # broken due to qutebrowser-kiosk being an alias
["sway"]="sway reload"

View file

@ -1,11 +1,19 @@
#!/usr/bin/env bash
project_dir="$(git rev-parse --show-toplevel)"
action="${1:-show}"
target="${2:-}"
if [ "$action" = "save" ]; then
target="" # Save all files
fi
if [ -z "$project_dir" ]; then
exit 1
fi
cd "$project_dir" || exit 1
url="$(git remote get-url origin)"
re="^(https|git)(:\/\/|@)([^\/:]+)[\/:]([^\/:]+)\/(.+)(.git)*$"
@ -26,24 +34,32 @@ if ! pass "ansible/$project" >/dev/null 2>&1; then
fi
pass_content=$(pass "ansible/$project")
pass_path=$project_dir/$(echo "$pass_content" | grep "path:" | cut -d' ' -f2-)
pass_paths=()
grep_filter="^path:"
if [ -n "$target" ]; then
grep_filter="^path: $target$"
fi
while read -r pass_path; do
pass_paths+=("$pass_path")
done <<< "$(echo "$pass_content" | grep "$grep_filter" | cut -d' ' -f2-)"
action="${1:-show}"
case "$action" in
show)
echo "$pass_content" | head -n 1
exit 0 ;;
view)
ansible-vault view "$pass_path"
ansible-vault view "${pass_paths[@]}"
exit 0 ;;
edit)
ansible-vault edit "$pass_path"
ansible-vault edit "${pass_paths[@]}"
exit 0 ;;
deploy)
pass show "ansible/$project.file" > "$pass_path"
pass show "ansible/$project.tar" | tar x
exit 0 ;;
save)
pass insert -m "ansible/$project.file" < "$pass_path"
tar c "${pass_paths[@]}" | pass insert -m "ansible/$project.tar"
exit 0 ;;
pass-edit)
pass edit "ansible/$project"

View file

@ -64,6 +64,8 @@ alias sudo='sudo '
alias taketemp='take $(mktemp -d)'
alias tokei='tokei --hidden'
alias vim-rg="vim-grep"
alias watch='watch -c'
alias wget='wget -c'

View file

@ -32,13 +32,13 @@ AUTOINSTALL_ITEM_TARGET="pkl"
AUTOINSTALL_ITEM_GROUPS="base"
AUTOINSTALL_ITEM_TYPE="exe"
AUTOINSTALL_ITEM_SOURCE="https://git.serguzim.me/serguzim/tools/releases/download/latest/autostart-manage"
AUTOINSTALL_ITEM_SOURCE="https://git.serguzim.me/serguzim/autostart-manage/releases/download/latest/autostart-manage"
AUTOINSTALL_ITEM_TARGET="autostart-manage"
AUTOINSTALL_ITEM_GROUPS="base,personal"
AUTOINSTALL_ITEM_COMPLETIONS="completions"
AUTOINSTALL_ITEM_TYPE="exe"
AUTOINSTALL_ITEM_SOURCE="https://git.serguzim.me/serguzim/tools/releases/download/latest/autoinstall"
AUTOINSTALL_ITEM_SOURCE="https://git.serguzim.me/serguzim/autoinstall/releases/download/latest/autoinstall"
AUTOINSTALL_ITEM_TARGET="autoinstall"
AUTOINSTALL_ITEM_GROUPS="base,personal"
AUTOINSTALL_ITEM_COMPLETIONS="completions"

View file

@ -1,5 +1,5 @@
[hosts.portalo]
groups = ['common', 'wayland', 'chat', 'messenger', 'hyprland']
groups = ['common', 'chat', 'messenger']
[apps.autotiling]
command = 'autotiling'
@ -50,7 +50,7 @@ group = 'chat'
[apps.hyprland-handler]
command = '$XDG_CONFIG_HOME/hypr/handler.sh'
hosts = []
group = 'wayland'
group = 'hyprland'
[apps.kdeconnect]
command = '$HOME/.nix-profile/libexec/kdeconnectd'
@ -96,7 +96,7 @@ group = ''
[apps.sxhkd]
command = 'sxhkd'
hosts = []
group = 'x11'
group = 'bspwm'
[apps.syncthing]
command = 'syncthing serve --no-browser --verbose'
@ -138,7 +138,7 @@ group = 'x11'
[apps.waybar]
command = 'waybar'
hosts = []
group = 'hyprland'
group = 'wayland'
[apps.webhook]
command = 'webhook -hooks $XDG_CONFIG_HOME/hooks.yaml -verbose -hotreload'

View file

@ -108,4 +108,5 @@ bspc rule -a 'Thunderbird:Mail' desktop='messenger' locked='true'
bspc rule -a 'thunderbird-default:Mail' desktop='messenger' locked='true'
bspc rule -a 'thunderbird' desktop='messenger' locked='true'
autostart-manage sync x11,bspwm
autostart-manage run-xorg &

View file

@ -10,4 +10,5 @@ source = ~/.config/hypr/binds.conf
source = ~/.config/hypr/rules.conf
exec-once = autostart-manage start wallpaper
exec-once = autostart-manage sync wayland,hyprland
exec-once = autostart-manage run-wayland

View file

@ -32,6 +32,7 @@ def init(c):
'!lh': 'http://localhost:{}/',
'!12ft': 'http://12ft.io/proxy?q={}/',
'!osm': 'https://www.openstreetmap.org/search?query={}',
'!cheatsheet': 'https://cheatsheets.zip/?q={}',
}
c.url.start_pages = [
'https://rss.serguzim.me/',

View file

@ -2,4 +2,5 @@ include ~/.config/sway/config.d/*.conf
bar swaybar_command waybar
exec_always autostart-manage sync wayland,sway
exec_always autostart-manage run-wayland

View file

@ -1,4 +1,3 @@
.bin/host-backup-portalo
.config/autorestic/.autorestic.yml##hostname.portalo,default
.config/env.d/99-secrets
.config/projectsrc