Restructure dotfiles : suppression outils abandonnés, migration sway→hyprland, neomutt→aerc

- Supprimés : fish, qtile, X, vim, sway, neomutt (+ package systemd vide)
- Nouveau package hyprland : waybar, rofi, mako, gammastep, rofi-pass, systemd (mail+kanata+mpd+voxtype), script rofi
- Nouveau package aerc : config aerc + infra mail (msmtp, khard, vdirsyncer) migrée depuis neomutt
- Nettoyage .gitignore : suppression entrées neomutt/vim, ajout patterns moc/mpd/vifm manquants, vdirsyncer/status pour aerc
- Mise à jour des configs trackées modifiées (nvim, zsh, tmux, git, newsboat)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 06:40:49 +02:00
parent d84f20edf0
commit 0a00251742
86 changed files with 2032 additions and 1717 deletions

View File

@@ -0,0 +1,89 @@
#! /usr/bin/zsh
set -e
PICTURES_DIR="$(xdg-user-dir PICTURES)"
ZK_NOTEBOOK_DIR="/home/lafrite/Nextcloud/Documents/zettelkasten/"
monitor="$(hyprctl monitors -j | jq '[.[].focused] | index(true)')"
# monitor="$(swaymsg -t get_outputs | jq '[.[].focused] | index(true)')"
alias myrofi="fuzzel --dmenu"
# alias myrofi="rofi -dmenu -matching fuzzy -i -sort -sorting-method fzf -monitor $monitor"
select_window() {
declare -A windows
swaymsg -t get_tree |
jq -r '..|.nodes? + .floating_nodes?|arrays|select(length > 0)|.[]|select((.nodes + .floating_nodes | length) == 0)|select(.visible)|(.app_id + ": " + .name + "\n" + (.rect.x | tostring) + "," + (.rect.y | tostring) + " " + (.rect.width | tostring) + "x" + (.rect.height | tostring))' |
while read window_name; read geometry; do
windows[$window_name]="$geometry"
done
echo ${windows[$(print -l ${(@k)windows} | myrofi)]}
}
main() {
actions="Copy region to clipboard\nSave region to $PICTURES_DIR\nCopy window to clipboard\nSave window to $PICTURES_DIR\nSave region to zk"
if [[ "$(swaymsg -t get_outputs | jq length)" == "1" ]]; then
actions+="\nCopy screen to clipboard\nSave screen to $PICTURES_DIR"
else
actions+="\nCopy current monitor to clipboard\nSave current monitor to $PICTURES_DIR\nCopy all monitors to clipboard\nSave all monitors to $PICTURES_DIR"
fi
selection="$(echo "$actions" | myrofi -p "Take a screenshot")"
filename="$(date +'screenshot_%Y%m%d%H%M%s.png')"
imagepath="${PICTURES_DIR}/$filename"
zkpath="${ZK_NOTEBOOK_DIR}/fig/$filename"
case "$selection" in
"Copy region to clipboard")
grim -g "$(slurp)" - | wl-copy
notify-send "Region copied to clipboard"
;;
"Save region to $PICTURES_DIR")
grim -g "$(slurp)" "$imagepath"
reply=$(notify-send -A 'open,Open' -i "$imagepath" "Screenshot saved")
;;
"Save region to zk")
grim -g "$(slurp)" "$zkpath"
sh_path="../fig/${zkpath##*/}"
wl-copy $sh_path
reply=$(notify-send -A 'open,Open' -i "$imagepath" "Screenshot saved" "$sh_path is copied")
;;
"Copy window to clipboard")
grim -g "$(select_window)" - | wl-copy
notify-send "Window copied to clipboard"
;;
"Save window to $PICTURES_DIR")
grim -g "$(select_window)" "$imagepath"
reply=$(notify-send -A 'open,Open' -i "$imagepath" "Screenshot saved")
;;
"Copy current monitor to clipboard")
monitor="$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')"
grim -o $monitor - | wl-copy
notify-send "Monitor $monitor copied to clipboard"
;;
"Save current monitor to $PICTURES_DIR")
grim -o "$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')" "$imagepath"
reply=$(notify-send -A 'open,Open' -i "$imagepath" "Screenshot saved")
;;
"Copy screen to clipboard"|"Copy all monitors to clipboard")
grim - | wl-copy
notify-send "Screen copied to clipboard"
;;
"Save screen to $PICTURES_DIR"|"Save all monitors to $PICTURES_DIR")
grim "$imagepath"
reply=$(notify-send -A 'open,Open' -i "$imagepath" "Screenshot saved")
;;
*)
exit 1
;;
esac
if [[ "$reply" == "2" ]]; then
nautilus -s $imagepath
fi
}
main "$@"