Change indentation of all blocks.
Use (setq org-src-preserve-indentation t) for Emacs.
This commit is contained in:
382
systemd.org
382
systemd.org
@@ -11,14 +11,14 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[Unit]
|
||||
Description=Sync Bookmarks every day
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=yes
|
||||
[Unit]
|
||||
Description=Sync Bookmarks every day
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=yes
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/buku_git_push
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/buku_git_push
|
||||
#+END_SRC
|
||||
|
||||
** Timer
|
||||
@@ -28,20 +28,20 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[Unit]
|
||||
Description=Sync All Mails every x hours
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=no
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
[Unit]
|
||||
Description=Sync All Mails every x hours
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=no
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 16:00:00
|
||||
Persistent=true
|
||||
Unit=bukugit.service
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 16:00:00
|
||||
Persistent=true
|
||||
Unit=bukugit.service
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
#+END_SRC
|
||||
|
||||
** Script
|
||||
@@ -52,21 +52,21 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
cd ~/.local/share/buku/
|
||||
cd ~/.local/share/buku/
|
||||
|
||||
if [[ ! -z $(git status -s bookmarks.db) ]]
|
||||
then
|
||||
rm bookmarks.org;
|
||||
buku -e bookmarks.org && \
|
||||
cat header.org bookmarks.org > index.org && \
|
||||
emacs index.org --batch -f org-html-export-to-html --kill && \
|
||||
git add index.html
|
||||
if [[ ! -z $(git status -s bookmarks.db) ]]
|
||||
then
|
||||
rm bookmarks.org;
|
||||
buku -e bookmarks.org && \
|
||||
cat header.org bookmarks.org > index.org && \
|
||||
emacs index.org --batch -f org-html-export-to-html --kill && \
|
||||
git add index.html
|
||||
|
||||
git add bookmarks.db && \
|
||||
git commit -m "Changed bookmarks - $(date +%F)" && \
|
||||
git push
|
||||
exit
|
||||
fi
|
||||
git add bookmarks.db && \
|
||||
git commit -m "Changed bookmarks - $(date +%F)" && \
|
||||
git push
|
||||
exit
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
* =braingit= - Automatic commit and push new brain pages
|
||||
@@ -77,14 +77,14 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[Unit]
|
||||
Description=Sync Brain Website everyday
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=yes
|
||||
[Unit]
|
||||
Description=Sync Brain Website everyday
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=yes
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/brain_git_push
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/brain_git_push
|
||||
#+END_SRC
|
||||
|
||||
** Timer
|
||||
@@ -94,20 +94,20 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[Unit]
|
||||
Description=Sync Brain Website everyday
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=no
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
[Unit]
|
||||
Description=Sync Brain Website everyday
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=no
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 16:00:00
|
||||
Persistent=true
|
||||
Unit=braingit.service
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 16:00:00
|
||||
Persistent=true
|
||||
Unit=braingit.service
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
#+END_SRC
|
||||
|
||||
** Script
|
||||
@@ -118,15 +118,15 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
cd ~/Cloud/brain-website/
|
||||
cd ~/Cloud/brain-website/
|
||||
|
||||
if [[ ! -z $(git status -s content/) ]]
|
||||
then
|
||||
git add content static && \
|
||||
git commit -m "Update Content - $(date +%F)" && \
|
||||
git push
|
||||
exit
|
||||
fi
|
||||
if [[ ! -z $(git status -s content/) ]]
|
||||
then
|
||||
git add content static && \
|
||||
git commit -m "Update Content - $(date +%F)" && \
|
||||
git push
|
||||
exit
|
||||
fi
|
||||
#+end_src
|
||||
* =checkmail= - Check new mails
|
||||
** Service
|
||||
@@ -136,14 +136,14 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[Unit]
|
||||
Description=Check new mails
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=yes
|
||||
[Unit]
|
||||
Description=Check new mails
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=yes
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/checkmail -q
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/checkmail -q
|
||||
#+END_SRC
|
||||
|
||||
** Timer
|
||||
@@ -153,23 +153,23 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[Unit]
|
||||
Description=Check Mail every x minutes
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=no
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
Requires=checkmail.service
|
||||
[Unit]
|
||||
Description=Check Mail every x minutes
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=no
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
Requires=checkmail.service
|
||||
|
||||
[Timer]
|
||||
Persistent=false
|
||||
OnBootSec=2min
|
||||
OnUnitActiveSec=5min
|
||||
AccuracySec=2min
|
||||
Unit=checkmail.service
|
||||
[Timer]
|
||||
Persistent=false
|
||||
OnBootSec=2min
|
||||
OnUnitActiveSec=5min
|
||||
AccuracySec=2min
|
||||
Unit=checkmail.service
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
#+END_SRC
|
||||
|
||||
** Script
|
||||
@@ -180,59 +180,59 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
while [ -n "$1" ]; do # while loop starts
|
||||
case "$1" in
|
||||
-a) opt_all='--all' ;; # Check All inboxes
|
||||
-v) opt_verbose='--verbose' ;; # Verbose
|
||||
-q) opt_quiet='--quiet' ;; # Quiet
|
||||
,*) echo "Option $1 not recognized" ;; # In case you typed a different option
|
||||
esac
|
||||
shift
|
||||
done
|
||||
while [ -n "$1" ]; do # while loop starts
|
||||
case "$1" in
|
||||
-a) opt_all='--all' ;; # Check All inboxes
|
||||
-v) opt_verbose='--verbose' ;; # Verbose
|
||||
-q) opt_quiet='--quiet' ;; # Quiet
|
||||
,*) echo "Option $1 not recognized" ;; # In case you typed a different option
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Count number of mails
|
||||
gmail_old="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
||||
esrf_old="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
|
||||
ulg_old="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
|
||||
uliege_old="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
|
||||
# =============================================================
|
||||
# =============================================================
|
||||
# Count number of mails
|
||||
gmail_old="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
||||
esrf_old="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
|
||||
ulg_old="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
|
||||
uliege_old="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Retreive mails
|
||||
mbsync $opt_all $opt_verbose gmail-Home esrf-Home ulg-Home uliege-Home 2>/tmp/mbsync.log
|
||||
# =============================================================
|
||||
# =============================================================
|
||||
# Retreive mails
|
||||
mbsync $opt_all $opt_verbose gmail-Home esrf-Home ulg-Home uliege-Home 2>/tmp/mbsync.log
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Count number of mails
|
||||
gmail_new="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
||||
esrf_new="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
|
||||
ulg_new="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
|
||||
uliege_new="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
|
||||
# =============================================================
|
||||
# =============================================================
|
||||
# Count number of mails
|
||||
gmail_new="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
||||
esrf_new="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
|
||||
ulg_new="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
|
||||
uliege_new="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Total Number of new mails since last checking
|
||||
new="$(($gmail_new+$esrf_new+$ulg_new+$uliege_new))"
|
||||
old="$(($gmail_old+$esrf_old+$ulg_old+$uliege_old))"
|
||||
# =============================================================
|
||||
# =============================================================
|
||||
# Total Number of new mails since last checking
|
||||
new="$(($gmail_new+$esrf_new+$ulg_new+$uliege_new))"
|
||||
old="$(($gmail_old+$esrf_old+$ulg_old+$uliege_old))"
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Notification
|
||||
if [ "$new" -gt 0 ]; then
|
||||
dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new+$ulg_new+$uliege_new)) new mail(s)"
|
||||
fi
|
||||
# =============================================================
|
||||
# =============================================================
|
||||
# Notification
|
||||
if [ "$new" -gt 0 ]; then
|
||||
dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new+$ulg_new+$uliege_new)) new mail(s)"
|
||||
fi
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Indexation and Tags
|
||||
if pgrep -f 'mu server'; then
|
||||
emacsclient --eval '(mu4e-update-index)'
|
||||
else
|
||||
mu index $opt_verbose $opt_quiet
|
||||
fi
|
||||
# =============================================================
|
||||
# =============================================================
|
||||
# Indexation and Tags
|
||||
if pgrep -f 'mu server'; then
|
||||
emacsclient --eval '(mu4e-update-index)'
|
||||
else
|
||||
mu index $opt_verbose $opt_quiet
|
||||
fi
|
||||
# =============================================================
|
||||
#+end_src
|
||||
|
||||
* =syncmail= - Synchronize all mails
|
||||
@@ -243,14 +243,14 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[Unit]
|
||||
Description=Sync all mails
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=yes
|
||||
[Unit]
|
||||
Description=Sync all mails
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=yes
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/checkmail -a -q
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/checkmail -a -q
|
||||
#+END_SRC
|
||||
|
||||
** Timer
|
||||
@@ -260,23 +260,23 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[Unit]
|
||||
Description=Sync All Mails every x hours
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=no
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
Requires=syncmail.service
|
||||
[Unit]
|
||||
Description=Sync All Mails every x hours
|
||||
RefuseManualStart=no
|
||||
RefuseManualStop=no
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
Requires=syncmail.service
|
||||
|
||||
[Timer]
|
||||
Persistent=false
|
||||
OnBootSec=30min
|
||||
OnUnitActiveSec=300min
|
||||
AccuracySec=10min
|
||||
Unit=syncmail.service
|
||||
[Timer]
|
||||
Persistent=false
|
||||
OnBootSec=30min
|
||||
OnUnitActiveSec=300min
|
||||
AccuracySec=10min
|
||||
Unit=syncmail.service
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
#+END_SRC
|
||||
|
||||
* =vdirsyncer= - Synchronize calendar and contacts
|
||||
@@ -287,15 +287,15 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+begin_src conf
|
||||
[Unit]
|
||||
Description=Synchronize calendars and contacts
|
||||
Documentation=https://vdirsyncer.readthedocs.org/
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
[Unit]
|
||||
Description=Synchronize calendars and contacts
|
||||
Documentation=https://vdirsyncer.readthedocs.org/
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/vdirsyncer --verbosity "ERROR" sync
|
||||
Type=oneshot
|
||||
[Service]
|
||||
ExecStart=/usr/bin/vdirsyncer --verbosity "ERROR" sync
|
||||
Type=oneshot
|
||||
#+end_src
|
||||
|
||||
** Timer
|
||||
@@ -305,16 +305,16 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+begin_src conf
|
||||
[Unit]
|
||||
Description=Synchronize vdirs
|
||||
[Unit]
|
||||
Description=Synchronize vdirs
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5m
|
||||
OnUnitActiveSec=15m
|
||||
AccuracySec=5m
|
||||
[Timer]
|
||||
OnBootSec=5m
|
||||
OnUnitActiveSec=15m
|
||||
AccuracySec=5m
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
#+end_src
|
||||
|
||||
* =ssh-agent= - SSH Agent
|
||||
@@ -325,16 +325,16 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:END:
|
||||
|
||||
#+begin_src conf
|
||||
[Unit]
|
||||
Description=SSH key agent
|
||||
[Unit]
|
||||
Description=SSH key agent
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
#+end_src
|
||||
|
||||
* =powertop= - Powertop
|
||||
@@ -344,14 +344,36 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:END:
|
||||
#+begin_src conf
|
||||
[Unit]
|
||||
Description=Powertop tunings
|
||||
[Unit]
|
||||
Description=Powertop tunings
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/powertop --auto-tune
|
||||
RemainAfterExit=true
|
||||
[Service]
|
||||
ExecStart=/usr/bin/powertop --auto-tune
|
||||
RemainAfterExit=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
#+end_src
|
||||
|
||||
|
||||
* =emacs= - Emacs
|
||||
** Service
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/systemd/user/emacs.service
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:END:
|
||||
#+begin_src conf
|
||||
[Unit]
|
||||
Description=Emacs text editor
|
||||
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/emacs --fg-daemon
|
||||
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
|
||||
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user