From f2305c3aaceef101f2e2aee8fbc87a9bae7c3047 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Thu, 17 Aug 2023 13:20:02 +0700 Subject: [PATCH] HLWM: Add notifications to bluetooth commands. Emacs: evil RET to calendar select --- .config/emacs/init.org | 2 ++ .config/herbstluftwm/autostart | 25 ++++++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.config/emacs/init.org b/.config/emacs/init.org index d162a9d..29db4ea 100644 --- a/.config/emacs/init.org +++ b/.config/emacs/init.org @@ -2320,6 +2320,8 @@ and there's no need for a middle-man when it's already been implemented. (define-key global-map (kbd "C-c n i") #'org-roam-node-insert) (define-key global-map (kbd "C-c n c") #'org-roam-capture) (org-roam-setup) + +(evil-define-key 'normal 'calendar-mode-map (kbd "RET") #'org-calendar-select) #+end_src ** Magit diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart index fe56dfb..4583404 100755 --- a/.config/herbstluftwm/autostart +++ b/.config/herbstluftwm/autostart @@ -115,13 +115,28 @@ hc mousebind $Mod-Button2 zoom hc mousebind $Mod-Button3 resize # media -hc keybind XF86AudioRaiseVolume spawn bash -c 'paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga; amixer sset Master 4%+' -hc keybind XF86AudioLowerVolume spawn bash -c 'paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga; amixer sset Master 4%-' -hc keybind XF86AudioPlay spawn bash -c 'playerctl -a play-pause; paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga' +vol_sound=/usr/share/sounds/freedesktop/stereo/audio-volume-change.oga +hc keybind XF86AudioRaiseVolume spawn bash -c "paplay $vol_sound; amixer sset Master 4%+" +hc keybind XF86AudioLowerVolume spawn bash -c "paplay $vol_sound; amixer sset Master 4%-" +play_sound=/usr/share/sounds/freedesktop/stereo/dialog-warning.oga +hc keybind XF86AudioPlay spawn bash -c "playerctl -a play-pause; paplay $play_sound" + # bluetooth -hc keybind $Mod-b spawn bluetoothctl connect F8:5B:6E:2A:6A:CF -hc keybind $Mod-Shift-b spawn sudo systemctl restart bluetooth.service +icon=/usr/share/icons/Adwaita/16x16/status/bluetooth-active-symbolic.symbolic.png + +hc keybind $Mod-b chain \ + '->' spawn bluetoothctl connect F8:5B:6E:2A:6A:CF \ + '->' spawn notify-send -t 2000 -i $icon "Bluetooth" "Connecting Galaxy Buds" + +hc keybind $Mod-Alt-b chain \ + '->' spawn bluetoothctl disconnect F8:5B:6E:2A:6A:CF \ + '->' spawn notify-send -t 2000 -i $icon "Bluetooth" "Disconnecting Galaxy Buds" + +hc keybind $Mod-Shift-b chain \ + '->' spawn sudo systemctl restart bluetooth.service \ + '->' spawn notify-send -t 2000 -i $icon "Bluetooth" "Restarting systemd service" + hc keybind $Mod-Ctrl-b spawn toggle-bt-codec # Lock