From 11047efa795f9d61fbbae26840bc825073a20d4e Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sat, 20 Jul 2019 17:45:53 +0200 Subject: [PATCH] Add reboottoos script --- dotfiles/binaries.org | 17 +++++++++++++++++ readme.org | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/dotfiles/binaries.org b/dotfiles/binaries.org index fb94ec0..4f0b5f9 100644 --- a/dotfiles/binaries.org +++ b/dotfiles/binaries.org @@ -594,6 +594,7 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already maim -i $(xdotool getactivewindow) ~/Pictures/$name.png ;; esac #+end_src +<<<<<<< Updated upstream * Remote Desktop Connect :PROPERTIES: @@ -665,6 +666,7 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already fi #+end_src +<<<<<<< Updated upstream * Mount TMP14DAYS :PROPERTIES: :header-args: :tangle ~/bin/mnt_tmp_14_days @@ -676,3 +678,18 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already sudo -A mkdir ~/tmp_14_days; sudo -A mount -o rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=160.103.232.103,mountvers=3,mountport=597,mountproto=tcp,local_lock=none,addr=160.103.232.103 rnice:/hz/tmp_14_days ~/tmp_14_days; #+end_src + +* Reboot to OS + :PROPERTIES: + :header-args: :tangle ~/bin/reboot-to-os + :header-args+: :comments both :mkdirp yes + :header-args+: :shebang "#!/usr/bin/env bash" + :END: + +#+begin_src bash + os_id=$(echo -e "0 Manjaro\n1 Windows10" | dmenu -i -l 20 | awk -F ' ' '{print $1}'); + + if [ -n "$os_id" ]; then + sudo -A grub-reboot $os_id && sudo -A reboot + fi +#+end_src diff --git a/readme.org b/readme.org index 4f5052f..94164b1 100644 --- a/readme.org +++ b/readme.org @@ -1603,6 +1603,11 @@ https://github.com/pimutils/vdirsyncer | =vdirsyncer sync= | Synchronize | *** Automation - Systemd +First, run +#+BEGIN_SRC bash + vdirsyncer discover google_calendar +#+END_SRC + #+BEGIN_SRC bash systemctl --user enable vdirsyncer.timer systemctl --user start vdirsyncer.timer