From 34c18c8d3b864563226bdb06ad52412036e5b828 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sun, 1 Mar 2020 21:36:01 +0100 Subject: [PATCH] Remove few systemd services, use sxhkd instead --- dotfiles/sxhkd.org | 46 ++++++------ dotfiles/systemd.org | 166 ++++++++----------------------------------- 2 files changed, 49 insertions(+), 163 deletions(-) diff --git a/dotfiles/sxhkd.org b/dotfiles/sxhkd.org index 6c67648..34f8d80 100644 --- a/dotfiles/sxhkd.org +++ b/dotfiles/sxhkd.org @@ -68,8 +68,8 @@ rofi -show window # Bookmarks - super + shift + f - $HOME/bin/bukurun + # super + shift + f + # $HOME/bin/bukurun # Passwords super + shift + p @@ -91,8 +91,7 @@ # File Manager super + o - $TERMINAL -e "ranger" - # $TERMINAL -e "tmux -L ranger attach" + $TERMINAL -e "tmux new-session -A -s ranger ranger" # Browser super + i @@ -157,55 +156,50 @@ XF86Display # GUI Calendar (Google Calendar) super + space ; shift + c - qutebrowser https://calendar.google.com/ - - # Ranger - super + space ; r - $TERMINAL -e "tmux -L ranger attach" + $BROWSER https://calendar.google.com/ # pcmanfm: GUI file manager - super + space ; shift + r + super + space ; o pcmanfm; # Mails with neomutt super + space ; m - $TERMINAL -e "neomutt" - # $TERMINAL -e "tmux -L neomutt attach" + $TERMINAL -e "tmux new-session -A -s neomutt neomutt" super + space ; shift + m $TERMINAL -e "neomutt -R" # Weechat super + space ; w - $TERMINAL -e "tmux -L weechat attach" + $TERMINAL -e "tmux new-session -A -s weechat weechat" # News with newsboat super + space ; n - $TERMINAL -e "tmux -L newsboat attach" + $TERMINAL -e "tmux new-session -A -s newsboat newsboat" # Music with ncmpcpp super + space ; p - $TERMINAL -e "tmux -L ncmpcpp attach" + $TERMINAL -e "tmux new-session -A -s ncmpcpp ncmpcpp" # Print Screen super + space ; shift + p - ~/bin/screenshot + $HOME/scripts/mopidy-restart.sh - # Browser with qutebrowser + # Default Browser super + space ; i - qutebrowser; + $BROWSER; - # Browser with firefox + # Alternative Browser super + space ; shift + i - firefox; + brave; + + # Emacs + super + space ; e + emacs; # Emacs Client - super + space ; e - emacsclient -create-frame --alternate-editor="" - - # Full Emacs - Usefull when installing packages super + space ; shift + e - emacs; + emacsclient -create-frame --alternate-editor="" #+end_src * Change Keyboard Layout @@ -340,7 +334,7 @@ super + ctrl + space :header-args:conf+: :tangle ~/.config/sxhkd/sxhkdrc.i3 :END: -** BSPWM hotkeys +** Quit/Restart hotkeys #+begin_src conf # quit/restart bspwm super + alt + {q,r} diff --git a/dotfiles/systemd.org b/dotfiles/systemd.org index 559faaa..016b849 100644 --- a/dotfiles/systemd.org +++ b/dotfiles/systemd.org @@ -49,10 +49,10 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- RefuseManualStart=no RefuseManualStop=no Wants=network-online.target - After=network.target network-online.target dbus.socket + After=network-online.target [Timer] - OnCalendar=*-*-* 17:00:00 + OnCalendar=*-*-* 16:00:00 Persistent=true Unit=passgit.service @@ -101,7 +101,7 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- RefuseManualStart=no RefuseManualStop=no Wants=network-online.target - After=network.target network-online.target dbus.socket + After=network-online.target [Timer] OnCalendar=*-*-* 16:00:00 @@ -146,7 +146,7 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- [Service] Type=oneshot - ExecStart=%h/scripts/checkmail.sh -q -v + ExecStart=%h/scripts/checkmail.sh -q #+END_SRC ** Timer @@ -161,14 +161,14 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- RefuseManualStart=no RefuseManualStop=no Wants=network-online.target - After=network.target network-online.target dbus.socket + After=network-online.target Requires=checkmail.service [Timer] Persistent=false OnBootSec=2min OnUnitActiveSec=5min - AccuracySec=10s + AccuracySec=2min Unit=checkmail.service [Install] @@ -254,7 +254,7 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- [Service] Type=oneshot - ExecStart=%h/scripts/checkmail.sh -a -q -v + ExecStart=%h/scripts/checkmail.sh -a -q #+END_SRC ** Timer @@ -269,14 +269,14 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- RefuseManualStart=no RefuseManualStop=no Wants=network-online.target - After=network.target network-online.target dbus.socket + After=network-online.target Requires=syncmail.service [Timer] Persistent=false OnBootSec=30min OnUnitActiveSec=300min - AccuracySec=10s + AccuracySec=10min Unit=syncmail.service [Install] @@ -295,10 +295,10 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- Description=Synchronize calendars and contacts Documentation=https://vdirsyncer.readthedocs.org/ Wants=network-online.target - After=network.target network-online.target + After=network-online.target [Service] - ExecStart=/usr/bin/vdirsyncer sync + ExecStart=/usr/bin/vdirsyncer --verbosity "ERROR" sync Type=oneshot #+end_src @@ -321,132 +321,6 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- WantedBy=timers.target #+end_src -* Ranger -** Service -:PROPERTIES: -:header-args: :tangle ~/.config/systemd/user/ranger.service -:header-args+: :comments both :mkdirp yes -:END: -#+begin_src conf - [Unit] - Description=Ranger using Tmux - - [Service] - Type=forking - ExecStart=/usr/bin/tmux -L ranger new -d -s ranger ranger - ExecStop=/usr/bin/tmux -L ranger kill-session -t ranger - Restart=always - RestartSec=1 - - [Install] - WantedBy=multi-user.target -#+end_src - -* Weechat -** Service -:PROPERTIES: -:header-args: :tangle ~/.config/systemd/user/weechat.service -:header-args+: :comments both :mkdirp yes -:END: -#+begin_src conf - [Unit] - Description=A WeeChat client and relay service using Tmux - Wants=network-online.target - After=network.target network-online.target - - [Service] - Type=forking - ExecStart=/usr/bin/tmux -L weechat new -d -s weechat weechat - ExecStop=/usr/bin/tmux -L weechat kill-session -t weechat - Restart=always - RestartSec=3 - - [Install] - WantedBy=multi-user.target -#+end_src - -* Neomutt -** Service -:PROPERTIES: -:header-args: :tangle ~/.config/systemd/user/neomutt.service -:header-args+: :comments both :mkdirp yes -:END: -#+begin_src conf - [Unit] - Description=Neomutt - mail client - - [Service] - Type=forking - ExecStart=/usr/bin/tmux -L neomutt new -d -s neomutt neomutt - ExecStop=/usr/bin/tmux -L neomutt kill-session -t neomutt - Restart=always - RestartSec=3 - - [Install] - WantedBy=multi-user.target -#+end_src - -* Powertop -** Service -:PROPERTIES: -:header-args: :tangle ~/.config/systemd/user/powertop.service -:header-args+: :comments both :mkdirp yes -:END: -#+begin_src conf - [Unit] - Description=Powertop tunings - - [Service] - ExecStart=/usr/bin/powertop --auto-tune - RemainAfterExit=true - - [Install] - WantedBy=multi-user.target -#+end_src -* NCMPCPP -** Service -:PROPERTIES: -:header-args: :tangle ~/.config/systemd/user/ncmpcpp.service -:header-args+: :comments both :mkdirp yes -:END: - -#+begin_src conf - [Unit] - Description=Ncmpcpp - Music Player - - [Service] - Type=forking - ExecStart=/usr/bin/tmux -L ncmpcpp new -d -s ncmpcpp ncmpcpp - ExecStop=/usr/bin/tmux -L ncmpcpp kill-session -t ncmpcpp - Restart=always - RestartSec=3 - - [Install] - WantedBy=multi-user.target -#+end_src - -* Newsboat -** Service -:PROPERTIES: -:header-args: :tangle ~/.config/systemd/user/newsboat.service -:header-args+: :comments both :mkdirp yes -:END: - -#+begin_src conf - [Unit] - Description=Newsboat - RSS reader - - [Service] - Type=forking - ExecStart=/usr/bin/tmux -L newsboat new -d -s newsboat newsboat - ExecStop=/usr/bin/tmux -L newsboat kill-session -t newsboat - Restart=always - RestartSec=3 - - [Install] - WantedBy=multi-user.target -#+end_src - * SSH Agent ** Service :PROPERTIES: @@ -467,6 +341,24 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage- WantedBy=default.target #+end_src +* Powertop +** Service +:PROPERTIES: +:header-args: :tangle ~/.config/systemd/user/powertop.service +:header-args+: :comments both :mkdirp yes +:END: +#+begin_src conf + [Unit] + Description=Powertop tunings + + [Service] + ExecStart=/usr/bin/powertop --auto-tune + RemainAfterExit=true + + [Install] + WantedBy=multi-user.target +#+end_src + * Mopidy ** Service :PROPERTIES: