Skip to content

Commit

Permalink
Update Shortcut and default setting
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeya committed Jun 13, 2024
1 parent a79275e commit 592c4c5
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 7 deletions.
7 changes: 0 additions & 7 deletions debian/albert.gsettings-override

This file was deleted.

51 changes: 51 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/sh
# postinst script
# see: dh_installdeb(1)

set -e

case "$1" in
configure)

glib-compile-schemas /usr/share/glib-2.0/schemas

# Get the Real Username
RUID=$(who | awk 'FNR == 1 {print $1}')

# Translate Real Username to Real User ID
RUSER_UID=$(id -u ${RUID})

# Register in System shortcut key setting as Ctrl+Space
sudo -u ${RUID} DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/${RUSER_UID}/bus" dconf load / <<EOF
[org/gnome/settings-daemon/plugins/media-keys]
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
binding='<Control>space'
command='albert toggle'
name='albert'
EOF

# Copy the configuration file to existing users' home directory
for user in /home/*; do
if [ -d "$user" ]; then
mkdir -p "$user/.config"
cp /etc/skel/.config/albert.conf "$user/.config/albert.conf"
chown $(basename "$user"):$(basename "$user") "$user/.config/albert.conf"
fi
done

;;
abort-upgrade|abort-remove|abort-deconfigure)

;;
triggered)

;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

exit 0
14 changes: 14 additions & 0 deletions hamonikr/etc/xdg/autostart/albert-autostart.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Desktop Entry]
Type=Application
Name[en_US]=Albert
Name=Albert
Name[ko]=Albert 런처
Comment[en_US]=Start Albert launcher at system startup
Comment[ko_KR]=빠른 데스크톱 런처
Comment=Start Albert launcher at system startup
Exec=albert --platform xcb
Hidden=false
NoDisplay=false
StartupNotify=false
X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=3

0 comments on commit 592c4c5

Please sign in to comment.