From 592c4c52fcb9a7bb60f87db183ed47689a24a192 Mon Sep 17 00:00:00 2001 From: Kevin Kim Date: Thu, 13 Jun 2024 23:59:20 +0900 Subject: [PATCH] Update Shortcut and default setting --- debian/albert.gsettings-override | 7 --- debian/postinst | 51 +++++++++++++++++++ .../xdg/autostart/albert-autostart.desktop | 14 +++++ 3 files changed, 65 insertions(+), 7 deletions(-) delete mode 100644 debian/albert.gsettings-override create mode 100755 debian/postinst create mode 100644 hamonikr/etc/xdg/autostart/albert-autostart.desktop diff --git a/debian/albert.gsettings-override b/debian/albert.gsettings-override deleted file mode 100644 index 902df05..0000000 --- a/debian/albert.gsettings-override +++ /dev/null @@ -1,7 +0,0 @@ -[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='space' -command='albert toggle' -name='albert' diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..0d0ba0b --- /dev/null +++ b/debian/postinst @@ -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 / <&2 + exit 1 + ;; +esac + +exit 0 diff --git a/hamonikr/etc/xdg/autostart/albert-autostart.desktop b/hamonikr/etc/xdg/autostart/albert-autostart.desktop new file mode 100644 index 0000000..cfd0914 --- /dev/null +++ b/hamonikr/etc/xdg/autostart/albert-autostart.desktop @@ -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