Minor changes
This commit is contained in:
parent
e3fba965d1
commit
2364bd462c
@ -1,11 +1,11 @@
|
||||
#+TITLE: Binaries
|
||||
|
||||
* Select Screen
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/displayselect
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/displayselect
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
Script taken from Luke Smith.
|
||||
|
||||
#+begin_src bash
|
||||
@ -73,17 +73,16 @@ Script taken from Luke Smith.
|
||||
,*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
|
||||
esac
|
||||
|
||||
# setbg # Fix background if screen size/arangement has changed.
|
||||
$HOME/.config/polybar/scripts/launch.sh # restart polybar
|
||||
pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen
|
||||
#+end_src
|
||||
|
||||
* getbib
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/getbib
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/getbib
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+begin_src bash
|
||||
[ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit
|
||||
|
||||
@ -101,11 +100,11 @@ Script taken from Luke Smith.
|
||||
#+end_src
|
||||
|
||||
* vpnToggle
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/vpntoggle
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/vpntoggle
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
if [[ $(nordvpn status) == *"Connected"* ]]; then
|
||||
@ -118,11 +117,11 @@ Script taken from Luke Smith.
|
||||
#+end_src
|
||||
|
||||
* bukurun
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/bukurun
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/bukurun
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
_rofi () {
|
||||
@ -457,11 +456,11 @@ getTagsFromId () {
|
||||
mode=bookmarks main
|
||||
#+end_src
|
||||
* i3exit
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/i3exit
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/i3exit
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
# with openrc use loginctl
|
||||
@ -499,31 +498,31 @@ mode=bookmarks main
|
||||
#+end_src
|
||||
|
||||
* readbib
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/readbib
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/readbib
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+begin_src bash
|
||||
cd ~/Cloud/thesis/ressources/pdfs/ && ls | dmenu -l 20 | xargs -I {} zathura {}
|
||||
#+end_src
|
||||
|
||||
* readnotes
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/readnotes
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/readnotes
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+begin_src bash
|
||||
cd ~/Cloud/thesis/ressources/notes/ && ls *.pdf | dmenu -l 20 | xargs -I {} zathura {}
|
||||
#+end_src
|
||||
|
||||
* askpass
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/askpass-rofi
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/askpass-rofi
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
Take password prompt from STDIN, print password to STDOUT.
|
||||
The sed piece just removes the colon from the provided prompt: =rofi -p= already gives us a colon
|
||||
#+BEGIN_SRC bash
|
||||
@ -533,29 +532,12 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already
|
||||
-p "$(printf "$1" | sed s/://)"
|
||||
#+END_SRC
|
||||
|
||||
* buku-dmenu
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/buku-dmenu
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+BEGIN_SRC bash
|
||||
if [ "$1" == "--help" ] ; then
|
||||
echo "Run the script, start typing until the desired bookmark is selected."
|
||||
echo "buku and dmenu must be installed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#get all bmks | swap tabs for spaces | run dmenu | cut to ID | run buku if not empty
|
||||
buku -p -f 3 | sed 's/\t/ /g' | dmenu -i -l 20 | cut -d ' ' -f 1 | xargs --no-run-if-empty buku -o
|
||||
#+END_SRC
|
||||
|
||||
* Take Screenshot
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/screenshot
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/screenshot
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
status=$(echo -e "All\nGUI\nSelection\nCropped\nCopy\nShadow\nActive" | rofi -i -dmenu -p "Type")
|
||||
@ -587,11 +569,11 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already
|
||||
#+end_src
|
||||
|
||||
* Remote Desktop Connect
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/remote-desktop
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/remote-desktop
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
computer=$(echo -e 'RNICE\nPCMEL1\nPCNASS1\nPCMEG01' | dmenu -p 'Computer:' -l 20);
|
||||
@ -616,11 +598,11 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already
|
||||
#+end_src
|
||||
|
||||
* Toggle Network
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/network-toggle
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/network-toggle
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
result=$(nmcli device | sed '1d' | dmenu -l 20);
|
||||
@ -657,28 +639,13 @@ The sed piece just removes the colon from the provided prompt: =rofi -p= already
|
||||
#+end_src
|
||||
|
||||
* Mount TMP14DAYS
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/mnt_tmp_14_days
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/bin/mnt_tmp_14_days
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user