fix hooks + add shortcut hooks for terminal

This commit is contained in:
Mylloon 2024-05-20 22:00:06 +02:00
parent 09007399c9
commit 91cb7a3259
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
4 changed files with 33 additions and 1 deletions

View file

@ -155,7 +155,9 @@ sync-arch:
# Pacman hooks
@sudo $(MKDIR) /etc/pacman.d/hooks
@sudo $(WGET) $(REPO_SRC)/pacman.d/hooks/stop-wine-associations.hook -P /etc/pacman.d/hooks/stop-wine-associations.hook
@sudo $(WGET) $(REPO_SRC)/pacman.d/hooks/stop-wine-associations.hook -P /etc/pacman.d/hooks/
@sudo $(WGET) $(REPO_SRC)/pacman.d/hooks/gnome-terminal-shortcut.hook -P /etc/pacman.d/hooks/
@sudo $(WGET) $(REPO_SRC)/pacman.d/hooks/blackbox-shortcut.hook -P /etc/pacman.d/hooks/
@echo "Pacman hooks synced!"
@echo

10
arch.sh
View file

@ -34,6 +34,16 @@ function main {
curl ${repo}/meta.sh -s | bash -s -- ${repo}
# === Add pacman hooks ==
sudo mkdir -p /etc/pacman.d/hooks
local hooks
hooks=("stop-wine-associations" "gnome-terminal-shortcut" "blackbox-shortcut")
for hook in "${hooks[@]}"
do
sudo wget -q --show-progress ${repo}/pacman.d/hooks/"$hook".hook -P /etc/pacman.d/hooks/
done
# === AUR packages ==
paru -S --noconfirm \
obsidian parsec-bin evolution-etesync-git x11-emoji-picker \

View file

@ -0,0 +1,10 @@
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = blackbox
[Action]
Description = Update BlackBox desktop entry on package upgrade
When = PostTransaction
Exec = /bin/sh -c 'sudo sed -i "s/Name[fr]=Boîte Noire/Name[fr]=Terminal/g" /usr/share/applications/com.raggesilver.BlackBox.desktop'

View file

@ -0,0 +1,10 @@
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = gnome-terminal
[Action]
Description = Update Gnome Terminal desktop entry on package upgrade
When = PostTransaction
Exec = /bin/sh -c 'sudo sed -i "s/Name[fr]=Terminal/Name[fr]=Gnome Terminal/g" /usr/share/applications/org.gnome.Terminal.desktop'