Compare commits
3 commits
b8b0af0881
...
cf2f755791
Author | SHA1 | Date | |
---|---|---|---|
cf2f755791 | |||
cbb51fef2b | |||
8432b54eb0 |
10 changed files with 36 additions and 14 deletions
3
.bin/.e
3
.bin/.e
|
@ -20,6 +20,7 @@ declare -A mapper=(
|
||||||
["hyprland"]="$HOME/.config/hypr/hyprland.conf"
|
["hyprland"]="$HOME/.config/hypr/hyprland.conf"
|
||||||
["nvim"]="$HOME/.config/astronvim/lua/user/"
|
["nvim"]="$HOME/.config/astronvim/lua/user/"
|
||||||
["polybar"]="$HOME/.config/polybar"
|
["polybar"]="$HOME/.config/polybar"
|
||||||
|
["projectsrc"]="$HOME/.config/projectsrc"
|
||||||
["qutebrowser"]="$HOME/.config/qutebrowser/config.py"
|
["qutebrowser"]="$HOME/.config/qutebrowser/config.py"
|
||||||
["qutebrowser-kiosk"]="$HOME/.config/qutebrowser/config_kiosk.py"
|
["qutebrowser-kiosk"]="$HOME/.config/qutebrowser/config_kiosk.py"
|
||||||
["rclone"]="$HOME/.config/rclone/rclone.conf"
|
["rclone"]="$HOME/.config/rclone/rclone.conf"
|
||||||
|
@ -51,7 +52,7 @@ declare -A directory=(
|
||||||
)
|
)
|
||||||
|
|
||||||
declare -A hooks=(
|
declare -A hooks=(
|
||||||
["autostart.toml"]="autostart-manage sync"
|
["projectsrc"]="projects-status"
|
||||||
["qutebrowser"]="qutebrowser :config-source"
|
["qutebrowser"]="qutebrowser :config-source"
|
||||||
["qutebrowser-kiosk"]="qutebrowser-kiosk :config-source" # broken due to qutebrowser-kiosk being an alias
|
["qutebrowser-kiosk"]="qutebrowser-kiosk :config-source" # broken due to qutebrowser-kiosk being an alias
|
||||||
["sway"]="sway reload"
|
["sway"]="sway reload"
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
project_dir="$(git rev-parse --show-toplevel)"
|
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
|
if [ -z "$project_dir" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd "$project_dir" || exit 1
|
||||||
|
|
||||||
url="$(git remote get-url origin)"
|
url="$(git remote get-url origin)"
|
||||||
|
|
||||||
re="^(https|git)(:\/\/|@)([^\/:]+)[\/:]([^\/:]+)\/(.+)(.git)*$"
|
re="^(https|git)(:\/\/|@)([^\/:]+)[\/:]([^\/:]+)\/(.+)(.git)*$"
|
||||||
|
@ -26,24 +34,32 @@ if ! pass "ansible/$project" >/dev/null 2>&1; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pass_content=$(pass "ansible/$project")
|
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
|
case "$action" in
|
||||||
show)
|
show)
|
||||||
echo "$pass_content" | head -n 1
|
echo "$pass_content" | head -n 1
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
view)
|
view)
|
||||||
ansible-vault view "$pass_path"
|
ansible-vault view "${pass_paths[@]}"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
edit)
|
edit)
|
||||||
ansible-vault edit "$pass_path"
|
ansible-vault edit "${pass_paths[@]}"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
deploy)
|
deploy)
|
||||||
pass show "ansible/$project.file" > "$pass_path"
|
pass show "ansible/$project.tar" | tar x
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
save)
|
save)
|
||||||
pass insert -m "ansible/$project.file" < "$pass_path"
|
tar c "${pass_paths[@]}" | pass insert -m "ansible/$project.tar"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
pass-edit)
|
pass-edit)
|
||||||
pass edit "ansible/$project"
|
pass edit "ansible/$project"
|
||||||
|
|
|
@ -64,6 +64,8 @@ alias sudo='sudo '
|
||||||
alias taketemp='take $(mktemp -d)'
|
alias taketemp='take $(mktemp -d)'
|
||||||
alias tokei='tokei --hidden'
|
alias tokei='tokei --hidden'
|
||||||
|
|
||||||
|
alias vim-rg="vim-grep"
|
||||||
|
|
||||||
alias watch='watch -c'
|
alias watch='watch -c'
|
||||||
alias wget='wget -c'
|
alias wget='wget -c'
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,13 @@ AUTOINSTALL_ITEM_TARGET="pkl"
|
||||||
AUTOINSTALL_ITEM_GROUPS="base"
|
AUTOINSTALL_ITEM_GROUPS="base"
|
||||||
|
|
||||||
AUTOINSTALL_ITEM_TYPE="exe"
|
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_TARGET="autostart-manage"
|
||||||
AUTOINSTALL_ITEM_GROUPS="base,personal"
|
AUTOINSTALL_ITEM_GROUPS="base,personal"
|
||||||
AUTOINSTALL_ITEM_COMPLETIONS="completions"
|
AUTOINSTALL_ITEM_COMPLETIONS="completions"
|
||||||
|
|
||||||
AUTOINSTALL_ITEM_TYPE="exe"
|
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_TARGET="autoinstall"
|
||||||
AUTOINSTALL_ITEM_GROUPS="base,personal"
|
AUTOINSTALL_ITEM_GROUPS="base,personal"
|
||||||
AUTOINSTALL_ITEM_COMPLETIONS="completions"
|
AUTOINSTALL_ITEM_COMPLETIONS="completions"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[hosts.portalo]
|
[hosts.portalo]
|
||||||
groups = ['common', 'wayland', 'chat', 'messenger', 'hyprland']
|
groups = ['common', 'chat', 'messenger']
|
||||||
|
|
||||||
[apps.autotiling]
|
[apps.autotiling]
|
||||||
command = 'autotiling'
|
command = 'autotiling'
|
||||||
|
@ -50,7 +50,7 @@ group = 'chat'
|
||||||
[apps.hyprland-handler]
|
[apps.hyprland-handler]
|
||||||
command = '$XDG_CONFIG_HOME/hypr/handler.sh'
|
command = '$XDG_CONFIG_HOME/hypr/handler.sh'
|
||||||
hosts = []
|
hosts = []
|
||||||
group = 'wayland'
|
group = 'hyprland'
|
||||||
|
|
||||||
[apps.kdeconnect]
|
[apps.kdeconnect]
|
||||||
command = '$HOME/.nix-profile/libexec/kdeconnectd'
|
command = '$HOME/.nix-profile/libexec/kdeconnectd'
|
||||||
|
@ -96,7 +96,7 @@ group = ''
|
||||||
[apps.sxhkd]
|
[apps.sxhkd]
|
||||||
command = 'sxhkd'
|
command = 'sxhkd'
|
||||||
hosts = []
|
hosts = []
|
||||||
group = 'x11'
|
group = 'bspwm'
|
||||||
|
|
||||||
[apps.syncthing]
|
[apps.syncthing]
|
||||||
command = 'syncthing serve --no-browser --verbose'
|
command = 'syncthing serve --no-browser --verbose'
|
||||||
|
@ -138,7 +138,7 @@ group = 'x11'
|
||||||
[apps.waybar]
|
[apps.waybar]
|
||||||
command = 'waybar'
|
command = 'waybar'
|
||||||
hosts = []
|
hosts = []
|
||||||
group = 'hyprland'
|
group = 'wayland'
|
||||||
|
|
||||||
[apps.webhook]
|
[apps.webhook]
|
||||||
command = 'webhook -hooks $XDG_CONFIG_HOME/hooks.yaml -verbose -hotreload'
|
command = 'webhook -hooks $XDG_CONFIG_HOME/hooks.yaml -verbose -hotreload'
|
||||||
|
|
|
@ -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-default:Mail' desktop='messenger' locked='true'
|
||||||
bspc rule -a 'thunderbird' desktop='messenger' locked='true'
|
bspc rule -a 'thunderbird' desktop='messenger' locked='true'
|
||||||
|
|
||||||
|
autostart-manage sync x11,bspwm
|
||||||
autostart-manage run-xorg &
|
autostart-manage run-xorg &
|
||||||
|
|
|
@ -10,4 +10,5 @@ source = ~/.config/hypr/binds.conf
|
||||||
source = ~/.config/hypr/rules.conf
|
source = ~/.config/hypr/rules.conf
|
||||||
|
|
||||||
exec-once = autostart-manage start wallpaper
|
exec-once = autostart-manage start wallpaper
|
||||||
|
exec-once = autostart-manage sync wayland,hyprland
|
||||||
exec-once = autostart-manage run-wayland
|
exec-once = autostart-manage run-wayland
|
||||||
|
|
|
@ -32,6 +32,7 @@ def init(c):
|
||||||
'!lh': 'http://localhost:{}/',
|
'!lh': 'http://localhost:{}/',
|
||||||
'!12ft': 'http://12ft.io/proxy?q={}/',
|
'!12ft': 'http://12ft.io/proxy?q={}/',
|
||||||
'!osm': 'https://www.openstreetmap.org/search?query={}',
|
'!osm': 'https://www.openstreetmap.org/search?query={}',
|
||||||
|
'!cheatsheet': 'https://cheatsheets.zip/?q={}',
|
||||||
}
|
}
|
||||||
c.url.start_pages = [
|
c.url.start_pages = [
|
||||||
'https://rss.serguzim.me/',
|
'https://rss.serguzim.me/',
|
||||||
|
|
|
@ -2,4 +2,5 @@ include ~/.config/sway/config.d/*.conf
|
||||||
|
|
||||||
bar swaybar_command waybar
|
bar swaybar_command waybar
|
||||||
|
|
||||||
|
exec_always autostart-manage sync wayland,sway
|
||||||
exec_always autostart-manage run-wayland
|
exec_always autostart-manage run-wayland
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
.bin/host-backup-portalo
|
|
||||||
.config/autorestic/.autorestic.yml##hostname.portalo,default
|
.config/autorestic/.autorestic.yml##hostname.portalo,default
|
||||||
.config/env.d/99-secrets
|
.config/env.d/99-secrets
|
||||||
.config/projectsrc
|
.config/projectsrc
|
||||||
|
|
Loading…
Reference in a new issue