diff --git a/Makefile b/Makefile index 11173d0..fc9a366 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/arch.sh b/arch.sh index 89cd55b..08eac8e 100644 --- a/arch.sh +++ b/arch.sh @@ -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 \ diff --git a/pacman.d/hooks/blackbox-shortcut.hook b/pacman.d/hooks/blackbox-shortcut.hook new file mode 100644 index 0000000..dbd2d46 --- /dev/null +++ b/pacman.d/hooks/blackbox-shortcut.hook @@ -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' diff --git a/pacman.d/hooks/gnome-terminal-shortcut.hook b/pacman.d/hooks/gnome-terminal-shortcut.hook new file mode 100644 index 0000000..054ae71 --- /dev/null +++ b/pacman.d/hooks/gnome-terminal-shortcut.hook @@ -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'