chore: moved hotkey daemon to it's own script and run with a terminal to allow prompting authentication
This commit is contained in:
17
bin/actions/hotkey-daemon.sh
Executable file
17
bin/actions/hotkey-daemon.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||
|
||||
# Kill any running swhkd and swhks processes
|
||||
if pgrep -x "swhkd" > /dev/null; then
|
||||
printfe "%s\n" "yellow" "swhkd is running, killing it..."
|
||||
sudo pkill swhkd
|
||||
fi
|
||||
|
||||
if pgrep -x "swhks" > /dev/null; then
|
||||
printfe "%s\n" "yellow" "swhks is running, killing it..."
|
||||
sudo pkill swhks
|
||||
fi
|
||||
|
||||
printfe "%s\n" "green" "Starting hotkey daemon..."
|
||||
swhks & pkexec swhkd -c ~/.config/swhkdrc
|
@@ -18,15 +18,18 @@ run_startup_scripts() {
|
||||
case $(date +%H) in
|
||||
0[0-9]|1[0-1])
|
||||
time_of_day="morning"
|
||||
emoji="🌅"
|
||||
;;
|
||||
1[2-7])
|
||||
time_of_day="afternoon"
|
||||
emoji="🌞"
|
||||
;;
|
||||
1[8-9]|2[0-3])
|
||||
time_of_day="evening"
|
||||
emoji="🌆"
|
||||
;;
|
||||
esac
|
||||
printfe "%s" "cyan" "Welcome and good $time_of_day $(whoami)!"
|
||||
printfe "%s" "cyan" "Hi $(whoami), good $time_of_day! $emoji"
|
||||
echo ""
|
||||
|
||||
# Initialize array to hold commands
|
||||
|
Reference in New Issue
Block a user