fix hooks + add shortcut hooks for terminal
This commit is contained in:
parent
09007399c9
commit
91cb7a3259
4 changed files with 33 additions and 1 deletions
4
Makefile
4
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
|
||||
|
||||
|
|
10
arch.sh
10
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 \
|
||||
|
|
10
pacman.d/hooks/blackbox-shortcut.hook
Normal file
10
pacman.d/hooks/blackbox-shortcut.hook
Normal 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'
|
10
pacman.d/hooks/gnome-terminal-shortcut.hook
Normal file
10
pacman.d/hooks/gnome-terminal-shortcut.hook
Normal 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'
|
Loading…
Reference in a new issue