Compare commits
2 Commits
19a927c9ea
...
master
Author | SHA1 | Date | |
---|---|---|---|
d00a33ad43 | |||
fcbfdac14f |
@@ -53,6 +53,25 @@ MimeType=message/rfc822;x-scheme-handler/mailto;application/x-xpinstall;
|
|||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Weechat
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.local/share/applications/weechat.desktop
|
||||||
|
:END:
|
||||||
|
#+begin_src conf
|
||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
MultipleArgs=false
|
||||||
|
Terminal=false
|
||||||
|
Exec=$TERMINAL --class=WeeChat -e 'weechat'
|
||||||
|
StartupWMClass=WeeChat
|
||||||
|
Icon=/usr/share/icons/Papirus/64x64/apps/weechat.svg
|
||||||
|
Type=Application
|
||||||
|
Categories=Network;IRCClient;
|
||||||
|
StartupNotify=true
|
||||||
|
Name=WeeChat
|
||||||
|
GenericName=IRC Client
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Matlab
|
* Matlab
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.local/share/applications/matlab.desktop
|
:header-args: :tangle ~/.local/share/applications/matlab.desktop
|
||||||
@@ -63,7 +82,7 @@ Version=R2020b
|
|||||||
Type=Application
|
Type=Application
|
||||||
Terminal=false
|
Terminal=false
|
||||||
MimeType=text/x-matlab
|
MimeType=text/x-matlab
|
||||||
Exec=/home/thomas/.local/bin/matlab -desktop
|
Exec=/usr/local/MATLAB/R2020b/bin/matlab -desktop
|
||||||
Name=MATLAB
|
Name=MATLAB
|
||||||
Icon=matlab
|
Icon=matlab
|
||||||
Categories=Development;Math;Science
|
Categories=Development;Math;Science
|
||||||
@@ -147,6 +166,17 @@ Terminal=false
|
|||||||
Categories=Utility;TextEditor;
|
Categories=Utility;TextEditor;
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Torrent with Transmission
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.local/share/applications/torrent.desktop
|
||||||
|
:END:
|
||||||
|
#+begin_src conf
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Torrent
|
||||||
|
Exec=tremc %U
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Qutebrowser
|
* Qutebrowser
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.local/share/applications/qutebrowser.desktop
|
:header-args: :tangle ~/.local/share/applications/qutebrowser.desktop
|
||||||
|
30
bash.org
30
bash.org
@@ -21,8 +21,7 @@
|
|||||||
|
|
||||||
** FZF
|
** FZF
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
. /usr/share/doc/fzf/examples/completion.bash
|
source /usr/share/fzf/key-bindings.bash
|
||||||
. /usr/share/doc/fzf/examples/key-bindings.bash
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Ignore case for auto-completion
|
** Ignore case for auto-completion
|
||||||
@@ -117,11 +116,6 @@ alias :e=nvim
|
|||||||
alias path='echo -e ${PATH//:/\\n}'
|
alias path='echo -e ${PATH//:/\\n}'
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Other
|
|
||||||
#+begin_src bash
|
|
||||||
alias fd="fdfind"
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Functions
|
** Functions
|
||||||
*** =colors= - Display colors
|
*** =colors= - Display colors
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
@@ -195,6 +189,25 @@ function nullify() {
|
|||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** =sms= - Send SMS
|
||||||
|
https://doronbehar.com/articles/using-kdeconnect-to-comfortably-send-sms-messages-from-the-shell/#kdeconnects-builtin-sms-interface
|
||||||
|
|
||||||
|
#+begin_src bash :tangle no
|
||||||
|
sms(){
|
||||||
|
local args="$@"
|
||||||
|
# local phone_number name phone_type
|
||||||
|
# khard phone --parsable | sort -u | fzf | IFS=$'\t' read -r phone_number name phone_type
|
||||||
|
local phone_number=$(khard phone --parsable | sort -u | fzf | cut -f1 -d$'\t')
|
||||||
|
if [[ -z "${phone_number}" ]]; then
|
||||||
|
echo No recipient was chosen >&2
|
||||||
|
return
|
||||||
|
else
|
||||||
|
kdeconnect-cli --send-sms "${args}" --destination "${phone_number}" --device 4de3b5de2264a17c
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Bash History
|
** Bash History
|
||||||
Undocumented feature which sets the size to "unlimited". http://stackoverflow.com/questions/9457233/unlimited-bash-history
|
Undocumented feature which sets the size to "unlimited". http://stackoverflow.com/questions/9457233/unlimited-bash-history
|
||||||
|
|
||||||
@@ -314,9 +327,6 @@ PATH=$HOME/appimages:$PATH
|
|||||||
PATH=$HOME/.gem/ruby/2.5.0/bin:$PATH
|
PATH=$HOME/.gem/ruby/2.5.0/bin:$PATH
|
||||||
PATH=$GOPATH:$GOPATH/bin:$PATH
|
PATH=$GOPATH:$GOPATH/bin:$PATH
|
||||||
PATH=~/.config/emacs/bin:$PATH
|
PATH=~/.config/emacs/bin:$PATH
|
||||||
PATH=~/.local/bin:$PATH
|
|
||||||
PATH=~/.npm-global/bin:$PATH
|
|
||||||
PATH=~/miniconda3/bin:$PATH
|
|
||||||
export PATH
|
export PATH
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@@ -5,15 +5,6 @@
|
|||||||
#+PROPERTY: header-args:bash+ :shebang "#!/usr/bin/env bash"
|
#+PROPERTY: header-args:bash+ :shebang "#!/usr/bin/env bash"
|
||||||
#+PROPERTY: header-args:bash+ :tangle-mode (identity #o555)
|
#+PROPERTY: header-args:bash+ :tangle-mode (identity #o555)
|
||||||
|
|
||||||
* =qutebrowser=
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: qutebrowser
|
|
||||||
:END:
|
|
||||||
|
|
||||||
#+begin_src bash :tangle ~/.local/bin/qutebrowser
|
|
||||||
~/.local/soft/qutebrowser/.venv/bin/python3 -m qutebrowser "$@"
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* =remote-desktop= - Remote Desktop Connect
|
* =remote-desktop= - Remote Desktop Connect
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: remote-desktop
|
:CUSTOM_ID: remote-desktop
|
||||||
@@ -22,75 +13,59 @@
|
|||||||
#+begin_src bash :tangle ~/.local/bin/remote-desktop
|
#+begin_src bash :tangle ~/.local/bin/remote-desktop
|
||||||
computer=$(echo -e 'RNICE\nPCDEHAEZE\nPCNASS1' | rofi -dmenu -no-custom -p 'Computer:' -l 20);
|
computer=$(echo -e 'RNICE\nPCDEHAEZE\nPCNASS1' | rofi -dmenu -no-custom -p 'Computer:' -l 20);
|
||||||
|
|
||||||
if [[ -z "$computer" ]]; then
|
dunstify --replace=89891 'Rdesktop' "Connection to ${computer}..."
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
notify-send 'Rdesktop' "Connection to ${computer}..."
|
case $computer in
|
||||||
|
PCDEHAEZE)
|
||||||
proxy_arg=""
|
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$(pass esrf.fr/dehaeze | sed -n 1p) /v:PCDEHAEZE.esrf.fr > /tmp/freerdp_pcdehaeze.log 2>&1 &
|
||||||
if [ -z "$(timeout 1s dig +short proxy.esrf.fr.)" ]; then
|
;;
|
||||||
proxy_arg="/proxy:socks5://localhost:8080"
|
PCNASS1)
|
||||||
fi
|
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$(pass esrf.fr/dehaeze | sed -n 1p) /v:PCNASS1.esrf.fr > /tmp/freerdp_pcnass1.log 2>&1 &
|
||||||
|
;;
|
||||||
xfreerdp $proxy_arg /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /wm-class:RDP_$computer /grab-keyboard /p:$(pass esrf.fr/dehaeze | sed -n 1p) /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 &
|
RNICE)
|
||||||
|
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$(pass esrf.fr/dehaeze | sed -n 1p) /v:rnice.esrf.fr > /tmp/freerdp_rnice.log 2>&1 &
|
||||||
|
;;
|
||||||
|
,*)
|
||||||
|
echo "Not existing" && \
|
||||||
|
dunstify --replace=89891 --urgency=critical 'Rdesktop' "No config for $computer";
|
||||||
|
;;
|
||||||
|
esac
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* =mount-dir= - Mount/Unmout directories
|
* =mount-dir= - Mount/Unmout directories
|
||||||
#+begin_src text :tangle no
|
#+begin_src text :tangle no
|
||||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||||
homelab:/srv/storage/ /home/thomas/mnt/homelab fuse.sshfs noauto,allow_other,user,default_permissions 0 0
|
homelab:/srv/storage/ /home/thomas/mnt/NAS fuse.sshfs noauto,allow_other,default_permissions 0 0
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src text :tangle no
|
#+begin_src text :tangle no
|
||||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||||
dehaeze@rnice:/tmp_14_days/ /home/thomas/mnt/tmp_14_days fuse.sshfs noauto,allow_other,user,default_permissions 0 0
|
dehaeze@rnice:/tmp_14_days/ /home/thomas/mnt/ESRF fuse.sshfs noauto,allow_other,default_permissions 0 0
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src text :tangle no
|
|
||||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
|
||||||
dehaeze@rnice:/home/esrf/dehaeze/ /home/thomas/mnt/unix_home fuse.sshfs noauto,allow_other,user,default_permissions 0 0
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src text :tangle no
|
|
||||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
|
||||||
//wfiles/groupshare /home/thomas/mnt/groupshare vsifs noauto,user,credentials=/home/thomas/.smbcredentials,uid=1001,gid=1001,forceuid,forcegid 0 0
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src bash :tangle ~/.local/bin/mount-dir
|
#+begin_src bash :tangle ~/.local/bin/mount-dir
|
||||||
if [ $# -eq 0 ]; then
|
drive=$(echo -e 'ESRF\nNAS' | rofi -dmenu -no-custom -p 'Drive:' -l 20);
|
||||||
drive=$(echo -e 'tmp_14_days\nhomelab\ngroupshare\nunix_home\ndata_id21' | rofi -dmenu -no-custom -p 'Drive:' -l 20);
|
|
||||||
if [[ -z "$drive" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
drive=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if grep -qs "/home/thomas/mnt/$drive" /proc/mounts; then
|
if grep -qs "/home/thomas/mnt/$drive" /proc/mounts; then
|
||||||
umount "/home/thomas/mnt/$drive" && \
|
umount "/home/thomas/mnt/$drive" && \
|
||||||
notify-send "$drive " 'Successfully unmounted' || \
|
dunstify --replace=58249 "$drive " 'Successfully unmounted' || \
|
||||||
notify-send --urgency=critical "$drive " 'Error while unmounted'
|
dunstify --replace=58249 --urgency=critical "$drive " 'Error while unmounted'
|
||||||
else
|
else
|
||||||
echo "It's not mounted."
|
echo "It's not mounted."
|
||||||
mount "/home/thomas/mnt/$drive" && \
|
mount "/home/thomas/mnt/$drive" && \
|
||||||
notify-send "$drive " 'Successfully mounted' || \
|
dunstify --replace=58249 "$drive " 'Successfully mounted' || \
|
||||||
notify-send --urgency=critical "$drive " 'Error while mounted'
|
dunstify --replace=58249 --urgency=critical "$drive " 'Error while mounted'
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
* =screen-select= - Xrandr pre-defined scripts
|
* =screen-select= - Xrandr pre-defined scripts
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: screen-select
|
:CUSTOM_ID: screen-select
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src bash :tangle ~/.local/bin/screen-select
|
#+begin_src bash :tangle ~/.local/bin/screen-select
|
||||||
option=$(echo -e "Work\nLaptop\nHome" | rofi -dmenu -no-custom -p 'Screen:' -l 20)
|
option=$(echo -e "Work\nXPS\nHome" | rofi -i -dmenu)
|
||||||
|
|
||||||
if [[ -z "$option" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
after_screen_change () {
|
after_screen_change () {
|
||||||
# Fix background if screen size/arangement has changed.
|
# Fix background if screen size/arangement has changed.
|
||||||
@@ -108,15 +83,15 @@ after_screen_change () {
|
|||||||
|
|
||||||
case "$option" in
|
case "$option" in
|
||||||
"Work")
|
"Work")
|
||||||
xrandr --output eDP-1 --off --output DP-3-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && \
|
xrandr --output eDP1 --off --output DP1 --off --output DP2 --off --output DP2-1 --off --output VIRTUAL1 --off --output DP2-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && \
|
||||||
after_screen_change
|
after_screen_change
|
||||||
;;
|
;;
|
||||||
"Laptop")
|
"XPS")
|
||||||
xrandr --output DP-1-2 --off --output eDP-1 --primary --mode 1920x1200 --pos 0x0 --rotate normal && \
|
xrandr --output DP1 --off --output DP2 --off --output DP2-1 --off --output VIRTUAL1 --off --output DP2-2 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal && \
|
||||||
after_screen_change
|
after_screen_change
|
||||||
;;
|
;;
|
||||||
"Home")
|
"Home")
|
||||||
xrandr --output eDP-1 --off --output DP-3-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && \
|
xrandr --output eDP1 --off --output DP1 --off --output DP2 --off --output DP2-2 --off --output VIRTUAL1 --off --output DP2-1 --primary --mode 2560x1440 --pos 0x0 --rotate normal && \
|
||||||
after_screen_change
|
after_screen_change
|
||||||
;;
|
;;
|
||||||
,*)
|
,*)
|
||||||
@@ -127,22 +102,70 @@ esac
|
|||||||
exit 0
|
exit 0
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* =print-esrf= - Print on Rnice
|
* =print-rnice= - Print on Rnice
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: print-esrf
|
:CUSTOM_ID: print-rnice
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src bash :tangle ~/.local/bin/print-esrf
|
#+begin_src bash :tangle ~/.local/bin/print-rnice
|
||||||
nbpage=$(echo -e '1\n2\n4' | rofi -dmenu -no-custom -p 'Number of pages per sheet' -l 20);
|
nbpage=$(echo -e '1\n2\n4' | rofi -dmenu -no-custom -p 'Number of pages per sheet' -l 20);
|
||||||
sides=$(echo -e 'one-sided\ntwo-sided-long-edge\ntwo-sided-short-edge' | rofi -dmenu -no-custom -p 'Two Sided:' -l 20);
|
sides=$(echo -e 'one-sided\ntwo-sided-long-edge\ntwo-sided-short-edge' | rofi -dmenu -no-custom -p 'Two Sided:' -l 20);
|
||||||
media=$(echo -e 'A4\nA3' | rofi -dmenu -no-custom -p 'Size:' -l 20);
|
media=$(echo -e 'A4\nA3' | rofi -dmenu -no-custom -p 'Size:' -l 20);
|
||||||
printer=$(echo -e 'ctb127c1u\nctb110c1u' | rofi -dmenu -no-custom -p 'Size:' -l 20);
|
|
||||||
|
|
||||||
if [[ -z "$nbpage" || -z "$side" || -z "$media" || -z "$printer" ]]; then
|
# First copy the file to Rnice
|
||||||
exit 1
|
if sshpass -p "$(pass esrf.fr/dehaeze | sed -n 1p)" scp $1 dehaeze@rnice:/home/esrf/dehaeze/Downloads/; then
|
||||||
|
# Then print on Rnice
|
||||||
|
sshpass -p "$(pass esrf.fr/dehaeze | sed -n 1p)" ssh dehaeze@rnice "lpr -o media=$media -o sides=$sides -o number-up=$nbpage -P ctb127c1w \"/home/esrf/dehaeze/Downloads/$1\"";
|
||||||
|
# Finally, delete the file
|
||||||
|
else
|
||||||
|
echo "Command Failed"
|
||||||
fi
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
lpr -o media=$media -o sides=$sides -o number-up=$nbpage -P $printer "$1";
|
* =torrent-add= - Download Torrent
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: torrent-add
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash :tangle ~/.local/bin/torrent-add :noweb yes
|
||||||
|
transmission-remote <<get-password(passname="ip/homelab")>>:9091 --auth tdehaeze:$(pass nas/transmission | sed -n 1p) -a $1 && \
|
||||||
|
dunstify 'Torrent' 'Successfully added' || \
|
||||||
|
dunstify 'Torrent' 'Error'
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* =dl-add= - Direct Download with Aria2
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: dl-add
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash :tangle ~/.local/bin/dl-add
|
||||||
|
aria2p --port 6800 --host http://dl.tdehaeze.xyz --secret $(pass dl.tdehaeze.xyz/tdehaeze | sed -n 1p) add $1
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* =note-extract-fig= - Extract Figure from note file
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: note-extract-fig
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Script used to convert a figure drawn on my Boox note2 to a png file that can then be imported into a document.
|
||||||
|
|
||||||
|
#+begin_src bash :tangle ~/.local/bin/note-extract-fig
|
||||||
|
# First check that the first argument is a pdf file
|
||||||
|
if [[ -f $1 && $1 == *.pdf ]]; then
|
||||||
|
pngfile=$(echo $1 | cut -f 1 -d '.' | sed 's/$/.png/')
|
||||||
|
|
||||||
|
# Convert to png and crop png
|
||||||
|
pdf2png $1 && convert -trim "$pngfile" "$pngfile"
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* =color-picker= - Pick color and copy to clipboard
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: color-picker
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash :tangle ~/.local/bin/color-picker
|
||||||
|
xcolor | tr -d '\n' | xsel -b
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* =readbib= - Open Bibliography File
|
* =readbib= - Open Bibliography File
|
||||||
|
372
binaries.org
372
binaries.org
@@ -135,7 +135,7 @@ if [ ! -z "$ps_line" ]; then
|
|||||||
name=$(echo $ps_line | awk '{print $4}')
|
name=$(echo $ps_line | awk '{print $4}')
|
||||||
|
|
||||||
kill -15 $pid && \
|
kill -15 $pid && \
|
||||||
notify-send "Kill" "$name (PID $pid)" &
|
dunstify "Kill" "$name (PID $pid)" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -152,18 +152,358 @@ tmpfile="/tmp/vpnstatus";
|
|||||||
|
|
||||||
if [[ $(nordvpn status) == *"Connected"* ]]; then
|
if [[ $(nordvpn status) == *"Connected"* ]]; then
|
||||||
nordvpn disconnect && \
|
nordvpn disconnect && \
|
||||||
notify-send "VPN" "Disconnected" && \
|
dunstify --replace=23198 "VPN" "Disconnected" && \
|
||||||
echo "off" > $tmpfile;
|
echo "off" > $tmpfile;
|
||||||
else
|
else
|
||||||
# Select Country to connect to
|
# Select Country to connect to
|
||||||
country=`cat ~/.local/data/nordvpn_countries.txt | rofi -i -dmenu | sed 's/\s/_/g'`;
|
country=`cat ~/.local/data/nordvpn_countries.txt | rofi -i -dmenu | sed 's/\s/_/g'`;
|
||||||
notify-send "VPN" "Connecting to $country...";
|
dunstify --replace=23198 "VPN" "Connecting to $country...";
|
||||||
nordvpn connect $country && \
|
nordvpn connect $country && \
|
||||||
notify-send "VPN" "Connected to $country" && \
|
dunstify --replace=23198 "VPN" "Connected to $country" && \
|
||||||
echo "on" > $tmpfile;
|
echo "on" > $tmpfile;
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* =bukurun= - Open link from Buku
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: bukurun
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Script taken from [[https://github.com/carnager/buku_run][here]] that acts as a buku frontend using Rofi.
|
||||||
|
|
||||||
|
#+begin_src bash :tangle ~/.local/bin/bukurun
|
||||||
|
_rofi () {
|
||||||
|
rofi -dmenu -i -no-levenshtein-sort -width 1000 "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# display settings
|
||||||
|
display_type=1
|
||||||
|
max_str_width=80
|
||||||
|
|
||||||
|
# keybindings
|
||||||
|
switch_view="Alt+Tab"
|
||||||
|
new_bookmark="Alt+n"
|
||||||
|
actions="Alt+a"
|
||||||
|
edit="Alt+e"
|
||||||
|
delete="Alt+d"
|
||||||
|
|
||||||
|
# colors
|
||||||
|
help_color="#334433"
|
||||||
|
|
||||||
|
# source global config
|
||||||
|
if [[ -f /etc/buku_run.config ]]
|
||||||
|
then
|
||||||
|
source /etc/buku_run.config
|
||||||
|
fi
|
||||||
|
|
||||||
|
# source local config:
|
||||||
|
if [[ -z $XDG_CONFIG_DIR ]]
|
||||||
|
then
|
||||||
|
if [[ -f $HOME/.config/buku_run/config ]]
|
||||||
|
then
|
||||||
|
source $HOME/.config/buku_run/config
|
||||||
|
else
|
||||||
|
echo "User config file \'~/.config/buku_run/config\' not found. using global config"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ -f "${XDG_CONFIG_DIR}/buku_run/config" ]]
|
||||||
|
then
|
||||||
|
source "${XDG_CONFIG_DIR}/buku_run/config"
|
||||||
|
else
|
||||||
|
echo "User config file \'~/.config/buku_run/config\' not found. using global config"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
main () {
|
||||||
|
HELP="Welcome to Buku. Use <span color='${help_color}'>${new_bookmark}</span> to add a new Bookmark
|
||||||
|
Use <span color='${help_color}'>${switch_view}</span> to switch View. <span color='${help_color}'>${actions}</span> for actions"
|
||||||
|
if [[ $mode == "bookmarks" ]]; then
|
||||||
|
content=$(parseBuku)
|
||||||
|
menu=$(echo "${content}" | _rofi -p '> ' -filter "${filter}" -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
|
||||||
|
elif [[ $mode == "tags" ]]; then
|
||||||
|
menu=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
|
||||||
|
fi
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 12 ]]; then
|
||||||
|
optionsMenu
|
||||||
|
elif [[ $val -eq 10 ]]; then
|
||||||
|
addMark
|
||||||
|
elif [[ $val -eq 14 ]]; then
|
||||||
|
deleteMenu
|
||||||
|
elif [[ $val -eq 13 ]]; then
|
||||||
|
editMenu
|
||||||
|
elif [[ $val -eq 11 ]]; then
|
||||||
|
if [[ $mode == "bookmarks" ]]; then
|
||||||
|
export mode="tags"
|
||||||
|
mode=tags main
|
||||||
|
elif [[ $mode == "tags" ]]; then
|
||||||
|
export mode="bookmarks"
|
||||||
|
mode=bookmarks main
|
||||||
|
fi
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $mode == "bookmarks" ]]; then
|
||||||
|
id=$(getId "$content" "$menu")
|
||||||
|
for bm in ${id}; do
|
||||||
|
buku -o "${bm}"
|
||||||
|
done
|
||||||
|
elif [[ $mode == "tags" ]]; then
|
||||||
|
filter="${menu}" mode="bookmarks" main
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
optionsMenu () {
|
||||||
|
if [[ $mode == "bookmarks" ]]; then
|
||||||
|
askmenu=$(echo -e "< Return\n---\n1. Edit\n2. Delete" | _rofi -p '> ' -mesg "Choose Action for bookmark")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $askmenu == "< Return" ]]; then
|
||||||
|
export mode=bookmarks
|
||||||
|
main
|
||||||
|
elif [[ $askmenu == "1. Edit" ]]; then
|
||||||
|
editMenu
|
||||||
|
elif [[ $askmenu == "2. Delete" ]]; then
|
||||||
|
deleteMenu
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [[ $mode == "tags" ]]; then
|
||||||
|
askmenu=$(echo -e "< Return\n---\n1. Replace Tag\n2. Delete Tag" | _rofi -p '> ' -mesg "Choose Action for tag \"${menu}\"")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $askmenu == "< Return" ]]; then
|
||||||
|
export mode=tags
|
||||||
|
main
|
||||||
|
elif [[ $askmenu == "1. Replace Tag" ]]; then
|
||||||
|
newtag=$(echo | _rofi -p '> ' -mesg "Enter new tag name for tag \"${menu}\"")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $newtag == "" ]]; then
|
||||||
|
mode=tags main
|
||||||
|
else
|
||||||
|
buku -r "${menu}" "${newtag}"
|
||||||
|
mode=tags main
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
elif [[ $askmenu == "2. Delete Tag" ]]; then
|
||||||
|
delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete tag?")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $delask == "1. Yes" ]]; then
|
||||||
|
buku -r "${menu}"
|
||||||
|
mode=tags main
|
||||||
|
elif [[ $delask == "2. No" ]]; then
|
||||||
|
mode=tags main
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteMenu () {
|
||||||
|
id=$(getId "$content" "$menu")
|
||||||
|
delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete bookmark?")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $delask == "1. Yes" ]]; then
|
||||||
|
buku -d ${id} --tacit
|
||||||
|
mode=bookmarks main
|
||||||
|
elif [[ $delask == "2. No" ]]; then
|
||||||
|
optionsMenu
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
editMenu () {
|
||||||
|
id=$(getId "$content" "$menu")
|
||||||
|
title="$(getTitleFromId $id)"
|
||||||
|
bookmark="$(getUrlFromId $id)"
|
||||||
|
tags="$(getTagsFromId $id)"
|
||||||
|
content=$(echo -e "1. title: $title\n2. url: $bookmark\n3. tags: $tags")
|
||||||
|
editmenu=$(echo -e "< Return\n---\n${content}" | _rofi -p '> ')
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $editmenu == "< Return" ]]; then
|
||||||
|
main
|
||||||
|
elif [[ $editmenu == "tags: NOTAG" ]]; then
|
||||||
|
addTags --update
|
||||||
|
elif [[ $editmenu =~ tags:* ]]; then
|
||||||
|
tags="${tags}" editTags
|
||||||
|
elif [[ $editmenu =~ url:* ]]; then
|
||||||
|
editBookmark
|
||||||
|
elif [[ $editmenu =~ title:* ]]; then
|
||||||
|
editTitle
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
editTags () {
|
||||||
|
edittagsmenu=$(echo | _rofi -filter "${tags}" -p '> ' -mesg "Edit Tags and hit Enter")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
buku -u ${id} --tag "${edittagsmenu}"
|
||||||
|
fi
|
||||||
|
mode=bookmarks main
|
||||||
|
}
|
||||||
|
|
||||||
|
editBookmark () {
|
||||||
|
bmarkmenu=$(echo "" | _rofi -p "> " -filter "${bookmark}" -mesg "Edit Bookmark and hit Enter")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $bmarkmenu == "http"* ]]; then
|
||||||
|
buku -u "${id}" --url "${bmarkmenu}"
|
||||||
|
else
|
||||||
|
echo "" | rofi -e "Not a valid URI, Make sure URLs start with http"
|
||||||
|
editBookmark
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
mode=bookmarks main
|
||||||
|
}
|
||||||
|
|
||||||
|
editTitle () {
|
||||||
|
titlemenu=$(echo "" | _rofi -p "> " -filter "${title}" -mesg "Edit Title and hit Enter")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
buku -u "${id}" --title "${titlemenu}"
|
||||||
|
fi
|
||||||
|
mode=bookmarks main
|
||||||
|
}
|
||||||
|
|
||||||
|
addMark () {
|
||||||
|
inserturl=$(echo -e "$(xclip -o)" | _rofi -p '> ' -mesg "Use URL below or type manually")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
addTags
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
addTags () {
|
||||||
|
inserttags=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "Add some tags. Separate tags with ', '")
|
||||||
|
val=$?
|
||||||
|
if [[ $val -eq 1 ]]; then
|
||||||
|
exit
|
||||||
|
elif [[ $val -eq 0 ]]; then
|
||||||
|
if [[ $(echo "${inserttags}" | wc -l) -gt 1 ]]; then
|
||||||
|
taglist=$(echo "${inserttags}" | tr '\n' ',')
|
||||||
|
tags=()
|
||||||
|
for tag in $taglist; do
|
||||||
|
tags+=("$tag")
|
||||||
|
done
|
||||||
|
else
|
||||||
|
tags=${inserttags}
|
||||||
|
fi
|
||||||
|
if [[ $1 == "--update" ]]; then
|
||||||
|
buku -u "${id}" --tag ${tags}
|
||||||
|
else
|
||||||
|
buku -a ${inserturl} ${tags}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
parseBuku () {
|
||||||
|
echo "$(buku --nc -p | gawk -v max="$max_str_width" -v type="$display_type" '
|
||||||
|
BEGIN {
|
||||||
|
RS=""
|
||||||
|
FS="\n"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if ($3 == "")
|
||||||
|
$3 = " # NOTAG"
|
||||||
|
id = gensub(/([0-9]+)\.(.*)/, "\\1", "g", $1)
|
||||||
|
url = substr(gensub(/\s+> (.*)/, "\\1", "g", $2),0,max)
|
||||||
|
tags = gensub(/\s+# (.*)/, "\\1", "g", $3)
|
||||||
|
title = substr(gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1),0,max)
|
||||||
|
|
||||||
|
if (type == 1)
|
||||||
|
print id "\t" url "\t" tags
|
||||||
|
else
|
||||||
|
print id "\t" title "\t" tags
|
||||||
|
if (type == 3)
|
||||||
|
print " \t" url "\t "
|
||||||
|
print ""
|
||||||
|
}
|
||||||
|
' | column -t -s $'\t')"
|
||||||
|
}
|
||||||
|
|
||||||
|
getId () {
|
||||||
|
id=$(echo "${2%% *}")
|
||||||
|
if [ -z "$id" ]; then
|
||||||
|
prev=""
|
||||||
|
IFS=$'\n'
|
||||||
|
for line in $1; do
|
||||||
|
if [ "$2" = "$line" ]; then
|
||||||
|
id=$(echo "${prev%% *}")
|
||||||
|
break
|
||||||
|
else
|
||||||
|
prev="$line"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
echo $id
|
||||||
|
}
|
||||||
|
|
||||||
|
getTitleFromId () {
|
||||||
|
echo "$(buku --nc -p $1 | gawk '
|
||||||
|
BEGIN {
|
||||||
|
RS=""
|
||||||
|
FS="\n"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
print gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1)
|
||||||
|
}
|
||||||
|
')"
|
||||||
|
}
|
||||||
|
|
||||||
|
getUrlFromId () {
|
||||||
|
echo "$(buku --nc -p $1 | gawk '
|
||||||
|
BEGIN {
|
||||||
|
RS=""
|
||||||
|
FS="\n"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
print gensub(/\s+> (.*)/, "\\1", "g", $2)
|
||||||
|
}
|
||||||
|
')"
|
||||||
|
}
|
||||||
|
|
||||||
|
getTagsFromId () {
|
||||||
|
echo "$(buku --nc -p $1 | gawk '
|
||||||
|
BEGIN {
|
||||||
|
RS=""
|
||||||
|
FS="\n"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
print gensub(/\s+# (.*)/, "\\1", "g", $3)
|
||||||
|
}
|
||||||
|
')"
|
||||||
|
}
|
||||||
|
|
||||||
|
mode=bookmarks main
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* =i3exit= - Manage lock, suspend, reboot, ...
|
* =i3exit= - Manage lock, suspend, reboot, ...
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: i3exit
|
:CUSTOM_ID: i3exit
|
||||||
@@ -227,15 +567,6 @@ rofi -dmenu \
|
|||||||
-p "$(printf "$1" | sed s/://)"
|
-p "$(printf "$1" | sed s/://)"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* =get-pass= - Get Stored Password
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: get-pass
|
|
||||||
:END:
|
|
||||||
|
|
||||||
#+BEGIN_SRC bash :tangle ~/.local/bin/get-pass
|
|
||||||
pass $1 | sed -n 1p
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
* =screenshot= - Take Screenshot
|
* =screenshot= - Take Screenshot
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: screenshot
|
:CUSTOM_ID: screenshot
|
||||||
@@ -384,7 +715,7 @@ if [ -n "$1" ]; then
|
|||||||
xdotool key Shift+Insert
|
xdotool key Shift+Insert
|
||||||
else
|
else
|
||||||
echo "$chosen" | tr -d '\n' | xsel -ib
|
echo "$chosen" | tr -d '\n' | xsel -ib
|
||||||
notify-send "'$chosen' copied to clipboard." &
|
dunstify "'$chosen' copied to clipboard." &
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -408,7 +739,7 @@ if [ -n "$1" ]; then
|
|||||||
xdotool key Shift+Insert
|
xdotool key Shift+Insert
|
||||||
else
|
else
|
||||||
echo "$chosen" | tr -d '\n' | xsel -ib
|
echo "$chosen" | tr -d '\n' | xsel -ib
|
||||||
notify-send "'$chosen' copied to clipboard." &
|
dunstify "'$chosen' copied to clipboard." &
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -519,8 +850,8 @@ if [ $TMUX ]; then
|
|||||||
tmux split -v -l 1 "curl --progress-bar -F\"file=@$1\" https://0x0.st | xsel -ib;" && tmux select-pane -U
|
tmux split -v -l 1 "curl --progress-bar -F\"file=@$1\" https://0x0.st | xsel -ib;" && tmux select-pane -U
|
||||||
else
|
else
|
||||||
curl --progress-bar -F"file=@$1" https://0x0.st | xsel -ib && \
|
curl --progress-bar -F"file=@$1" https://0x0.st | xsel -ib && \
|
||||||
notify-send 'Upload' 'Successful' || \
|
dunstify 'Upload' 'Successful' || \
|
||||||
notify-send --urgency=critical 'Upload' 'Failed'
|
dunstify --urgency=critical 'Upload' 'Failed'
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -583,8 +914,8 @@ fi
|
|||||||
|
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
doi2bib $doi | xsel -ib && \
|
doi2bib $doi | xsel -ib && \
|
||||||
notify-send 'BibTeX' 'Copied to Clipboard' || \
|
dunstify 'BibTeX' 'Copied to Clipboard' || \
|
||||||
notify-send --urgency=critical 'BibTeX' 'Failed'
|
dunstify --urgency=critical 'BibTeX' 'Failed'
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -1244,9 +1575,10 @@ fi
|
|||||||
|
|
||||||
# Send the password to the clipboard
|
# Send the password to the clipboard
|
||||||
printf "$pass" | xclip -sel clip && \
|
printf "$pass" | xclip -sel clip && \
|
||||||
notify-send 'Password' 'Generated'
|
dunstify 'Password' 'Generated'
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
* =sxhkd-help= - List of keybindings using Rofi
|
* =sxhkd-help= - List of keybindings using Rofi
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: sxhkd-help
|
:CUSTOM_ID: sxhkd-help
|
||||||
|
@@ -21,7 +21,7 @@ conflict_resolution = "a wins"
|
|||||||
type = "caldav"
|
type = "caldav"
|
||||||
url = "https://radicale.tdehaeze.xyz/tdehaeze/"
|
url = "https://radicale.tdehaeze.xyz/tdehaeze/"
|
||||||
username = "tdehaeze"
|
username = "tdehaeze"
|
||||||
password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
|
password = "<<get-password(passname='radicale.tdehaeze.xyz/tdehaeze')>>"
|
||||||
|
|
||||||
[storage radicale_calendar_local]
|
[storage radicale_calendar_local]
|
||||||
type = "filesystem"
|
type = "filesystem"
|
||||||
@@ -38,7 +38,7 @@ conflict_resolution = "a wins"
|
|||||||
type = "caldav"
|
type = "caldav"
|
||||||
url = "https://calendar.esrf.fr/egroupware/groupdav.php/calendar"
|
url = "https://calendar.esrf.fr/egroupware/groupdav.php/calendar"
|
||||||
username = "dehaeze"
|
username = "dehaeze"
|
||||||
password.fetch = ["command", "get-pass", "esrf.fr/dehaeze"]
|
password = "<<get-password(passname='esrf.fr/dehaeze')>>"
|
||||||
|
|
||||||
[storage esrf_calendar_local]
|
[storage esrf_calendar_local]
|
||||||
type = "filesystem"
|
type = "filesystem"
|
||||||
@@ -60,7 +60,7 @@ fileext = ".vcf"
|
|||||||
type = "carddav"
|
type = "carddav"
|
||||||
url = "https://radicale.tdehaeze.xyz/tdehaeze/"
|
url = "https://radicale.tdehaeze.xyz/tdehaeze/"
|
||||||
username = "tdehaeze"
|
username = "tdehaeze"
|
||||||
password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
|
password = "<<get-password(passname='radicale.tdehaeze.xyz/tdehaeze')>>"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* =khal= - CLI calendar application
|
* =khal= - CLI calendar application
|
||||||
@@ -188,7 +188,7 @@ if [[ -f $1 ]]; then
|
|||||||
exit;
|
exit;
|
||||||
fi
|
fi
|
||||||
khal import -a "$calendar" --batch $1 && \
|
khal import -a "$calendar" --batch $1 && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:fJeNG8gc "Calendar" "Even added";
|
dunstify "Calendar" "Even added";
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
118
config.org
118
config.org
@@ -2,12 +2,13 @@
|
|||||||
#+SETUPFILE: ./setup/org-setup-file.org
|
#+SETUPFILE: ./setup/org-setup-file.org
|
||||||
|
|
||||||
* SSH
|
* SSH
|
||||||
#+begin_src conf :noweb yes :tangle ~/.ssh/config :comments none :mkdirp yes
|
:PROPERTIES:
|
||||||
AddKeysToAgent yes
|
:header-args: :tangle ~/.ssh/config
|
||||||
|
:header-args+: :comments none :mkdirp yes
|
||||||
|
:END:
|
||||||
|
|
||||||
Host *
|
#+begin_src conf :noweb yes
|
||||||
ControlMaster auto
|
AddKeysToAgent yes
|
||||||
ControlPath ~/.ssh/master-%r@%h:%p.socket
|
|
||||||
|
|
||||||
Host homelab
|
Host homelab
|
||||||
hostname <<get-password(passname="ip/homelab")>>
|
hostname <<get-password(passname="ip/homelab")>>
|
||||||
@@ -15,26 +16,22 @@ Host homelab
|
|||||||
user thomas
|
user thomas
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
Host *.esrf.fr
|
Host router
|
||||||
User dehaeze
|
hostname 192.168.1.1
|
||||||
IdentityFile ~/.ssh/id_rsa
|
|
||||||
|
|
||||||
Host firewall.esrf.fr
|
|
||||||
Port 5022
|
|
||||||
Compression yes
|
|
||||||
|
|
||||||
Match host *.esrf.fr !host firewall.esrf.fr !exec "~/.ssh/esrf-test"
|
|
||||||
ProxyJump firewall.esrf.fr
|
|
||||||
|
|
||||||
|
|
||||||
Host rnice
|
|
||||||
Port 22
|
Port 22
|
||||||
user dehaeze
|
user root
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_rsa
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src bash :tangle ~/.ssh/esrf-test :comments none :mkdirp yes :shebang "#!/usr/bin/env bash" :tangle-mode (identity #o555)
|
Host smarttv
|
||||||
test -n "$(timeout 1s dig +short proxy.esrf.fr.)"
|
hostname 192.168.1.73
|
||||||
|
Port 22
|
||||||
|
user thomas
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
Host oneplus
|
||||||
|
hostname 192.168.1.101
|
||||||
|
Port 8022
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Font
|
* Font
|
||||||
@@ -724,7 +721,84 @@ include "/usr/share/X11/locale/en_US.UTF-8/Compose"
|
|||||||
It is very important that =~/.netrc= as =600= permissions.
|
It is very important that =~/.netrc= as =600= permissions.
|
||||||
|
|
||||||
#+begin_src conf :comments none :mkdirp yes :noweb yes :tangle ~/.netrc :tangle-mode (identity #o600)
|
#+begin_src conf :comments none :mkdirp yes :noweb yes :tangle ~/.netrc :tangle-mode (identity #o600)
|
||||||
|
machine traefik.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="traefik.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine portainer.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="portainer.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine cloud.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="cloud.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine syncthing.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="syncthing.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
machine torrent.tdehaeze.xyz
|
machine torrent.tdehaeze.xyz
|
||||||
login tdehaeze
|
login tdehaeze
|
||||||
password <<get-password(passname="nas/transmission")>>
|
password <<get-password(passname="nas/transmission")>>
|
||||||
|
|
||||||
|
machine dl.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="dl.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine deemix.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="deemix.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine octoprint.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="octoprint.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine adguardhome.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="adguardhome.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine qobuz.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="qobuz.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine down.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="down.tdehaeze.xyz/tdehaeze")>>
|
||||||
|
|
||||||
|
machine joal.tdehaeze.xyz
|
||||||
|
login tdehaeze
|
||||||
|
password <<get-password(passname="joal.tdehaeze.xyz/tdehaeze")>>
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* =bukurun= Rofi Frontend for Buku (Bookmark Manager)
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.config/buku_run/config
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
_rofi () {
|
||||||
|
rofi -dmenu -i -no-levenshtein-sort -width 1000 "$@"
|
||||||
|
}
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Display settings
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
display_type=1
|
||||||
|
max_str_width=80
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Keybindings
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
switch_view="Alt+Tab"
|
||||||
|
new_bookmark="Alt+n"
|
||||||
|
actions="Alt+a"
|
||||||
|
edit="Alt+e"
|
||||||
|
delete="Alt+d"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Colors
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
help_color="#2d7ed8"
|
||||||
|
#+END_SRC
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-10-25 lun. 14:33 -->
|
<!-- 2021-11-03 mer. 10:59 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>Bash Configuration</title>
|
<title>Bash Configuration</title>
|
||||||
<meta name="author" content="Dehaeze Thomas" />
|
<meta name="author" content="Dehaeze Thomas" />
|
||||||
@@ -563,7 +563,7 @@ Enable the keyring for applications run through the terminal
|
|||||||
<h4 id="org2895615">Linkding</h4>
|
<h4 id="org2895615">Linkding</h4>
|
||||||
<div class="outline-text-4" id="text-org2895615">
|
<div class="outline-text-4" id="text-org2895615">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-bash"><span class="org-builtin">export</span> <span class="org-variable-name">LINKDING_URL</span>=<span class="org-string">"localhost:9090"</span>
|
<pre class="src src-bash"><span class="org-builtin">export</span> <span class="org-variable-name">LINKDING_URL</span>=<span class="org-sh-quoted-exec">`pass nas/linkding_url`</span>
|
||||||
<span class="org-builtin">export</span> <span class="org-variable-name">LINKDING_TOKEN</span>=<span class="org-sh-quoted-exec">`pass nas/linkding_token`</span>
|
<span class="org-builtin">export</span> <span class="org-variable-name">LINKDING_TOKEN</span>=<span class="org-sh-quoted-exec">`pass nas/linkding_token`</span>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -678,7 +678,7 @@ Don’t echo <code>^C</code> after <code>Ctrl+C</code> is pressed.
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: Dehaeze Thomas</p>
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-10-25 lun. 14:33 -->
|
<!-- 2021-11-03 mer. 10:59 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>My own specific binaries</title>
|
<title>My own specific binaries</title>
|
||||||
<meta name="author" content="Dehaeze Thomas" />
|
<meta name="author" content="Dehaeze Thomas" />
|
||||||
@@ -23,13 +23,12 @@
|
|||||||
<div id="text-table-of-contents" role="doc-toc">
|
<div id="text-table-of-contents" role="doc-toc">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#remote-desktop"><code>remote-desktop</code> - Remote Desktop Connect</a></li>
|
<li><a href="#remote-desktop"><code>remote-desktop</code> - Remote Desktop Connect</a></li>
|
||||||
|
<li><a href="#orgd5ee6e7"><code>mount-dir</code> - Mount/Unmout directories</a></li>
|
||||||
|
<li><a href="#screen-select"><code>screen-select</code> - Xrandr pre-defined scripts</a></li>
|
||||||
<li><a href="#print-rnice"><code>print-rnice</code> - Print on Rnice</a></li>
|
<li><a href="#print-rnice"><code>print-rnice</code> - Print on Rnice</a></li>
|
||||||
<li><a href="#tmp14"><code>tmp14</code> - Mount/Umount tmp_14_days folder</a></li>
|
|
||||||
<li><a href="#nas"><code>nas</code> - Interact with the NAS</a></li>
|
|
||||||
<li><a href="#torrent-add"><code>torrent-add</code> - Download Torrent</a></li>
|
<li><a href="#torrent-add"><code>torrent-add</code> - Download Torrent</a></li>
|
||||||
<li><a href="#dl-add"><code>dl-add</code> - Direct Download with Aria2</a></li>
|
<li><a href="#dl-add"><code>dl-add</code> - Direct Download with Aria2</a></li>
|
||||||
<li><a href="#note-extract-fig"><code>note-extract-fig</code> - Extract Figure from note file</a></li>
|
<li><a href="#note-extract-fig"><code>note-extract-fig</code> - Extract Figure from note file</a></li>
|
||||||
<li><a href="#screen-select"><code>screen-select</code> - Xrandr pre-defined scripts</a></li>
|
|
||||||
<li><a href="#color-picker"><code>color-picker</code> - Pick color and copy to clipboard</a></li>
|
<li><a href="#color-picker"><code>color-picker</code> - Pick color and copy to clipboard</a></li>
|
||||||
<li><a href="#readbib"><code>readbib</code> - Open Bibliography File</a></li>
|
<li><a href="#readbib"><code>readbib</code> - Open Bibliography File</a></li>
|
||||||
<li><a href="#readnotes"><code>readnotes</code> - Open Note</a></li>
|
<li><a href="#readnotes"><code>readnotes</code> - Open Note</a></li>
|
||||||
@@ -41,22 +40,19 @@
|
|||||||
<h2 id="remote-desktop"><code>remote-desktop</code> - Remote Desktop Connect</h2>
|
<h2 id="remote-desktop"><code>remote-desktop</code> - Remote Desktop Connect</h2>
|
||||||
<div class="outline-text-2" id="text-remote-desktop">
|
<div class="outline-text-2" id="text-remote-desktop">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-bash"><span class="org-variable-name">computer</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'RNICE\nPCMEL1\nPCNASS1\nPCMEG01'</span> | dmenu -p <span class="org-string">'Computer:'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
<pre class="src src-bash"><span class="org-variable-name">computer</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'RNICE\nPCDEHAEZE\nPCNASS1'</span> | rofi -dmenu -no-custom -p <span class="org-string">'Computer:'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||||
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">89891</span> <span class="org-string">'Rdesktop'</span> <span class="org-string">"Connection to </span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">{computer}</span></span><span class="org-string">..."</span>
|
dunstify --replace=<span class="org-highlight-numbers-number">89891</span> <span class="org-string">'Rdesktop'</span> <span class="org-string">"Connection to </span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">{computer}</span></span><span class="org-string">..."</span>
|
||||||
|
|
||||||
<span class="org-keyword">case</span> $<span class="org-variable-name">computer</span><span class="org-keyword"> in</span>
|
<span class="org-keyword">case</span> $<span class="org-variable-name">computer</span><span class="org-keyword"> in</span>
|
||||||
PCMEL1)
|
PCDEHAEZE)
|
||||||
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pass</span> ssl.esrf.fr/dehaeze | sed -n 1p<span class="org-rainbow-delimiters-depth-1">)</span> /v:PCMEL1.esrf.fr;
|
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pass</span> esrf.fr/dehaeze | sed -n 1p<span class="org-rainbow-delimiters-depth-1">)</span> /v:PCDEHAEZE.esrf.fr > /tmp/freerdp_pcdehaeze.log <span class="org-highlight-numbers-number">2</span>>&<span class="org-highlight-numbers-number">1</span> &
|
||||||
;;
|
|
||||||
PCMEG01)
|
|
||||||
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pass</span> ssl.esrf.fr/dehaeze | sed -n 1p<span class="org-rainbow-delimiters-depth-1">)</span> /v:PCMEG01.esrf.fr;
|
|
||||||
;;
|
;;
|
||||||
PCNASS1)
|
PCNASS1)
|
||||||
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pass</span> ssl.esrf.fr/dehaeze | sed -n 1p<span class="org-rainbow-delimiters-depth-1">)</span> /v:PCNASS1.esrf.fr;
|
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pass</span> esrf.fr/dehaeze | sed -n 1p<span class="org-rainbow-delimiters-depth-1">)</span> /v:PCNASS1.esrf.fr > /tmp/freerdp_pcnass1.log <span class="org-highlight-numbers-number">2</span>>&<span class="org-highlight-numbers-number">1</span> &
|
||||||
;;
|
;;
|
||||||
RNICE)
|
RNICE)
|
||||||
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pass</span> ssl.esrf.fr/dehaeze | sed -n 1p<span class="org-rainbow-delimiters-depth-1">)</span> /v:rnice.esrf.fr;
|
xfreerdp /u:dehaeze /d:ESRF /clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /p:$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pass</span> esrf.fr/dehaeze | sed -n 1p<span class="org-rainbow-delimiters-depth-1">)</span> /v:rnice.esrf.fr > /tmp/freerdp_rnice.log <span class="org-highlight-numbers-number">2</span>>&<span class="org-highlight-numbers-number">1</span> &
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
<span class="org-type">echo</span> <span class="org-string">"Not existing"</span> && <span class="org-sh-escaped-newline">\</span>
|
<span class="org-type">echo</span> <span class="org-string">"Not existing"</span> && <span class="org-sh-escaped-newline">\</span>
|
||||||
@@ -68,13 +64,91 @@ dunstify --replace=<span class="org-highlight-numbers-number">89891</span> <span
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="outline-container-orgd5ee6e7" class="outline-2">
|
||||||
|
<h2 id="orgd5ee6e7"><code>mount-dir</code> - Mount/Unmout directories</h2>
|
||||||
|
<div class="outline-text-2" id="text-orgd5ee6e7">
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-text"># <file system> <mount point> <type> <options> <dump> <pass>
|
||||||
|
homelab:/srv/storage/ /home/thomas/mnt/NAS fuse.sshfs noauto,allow_other,default_permissions 0 0
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-text"># <file system> <mount point> <type> <options> <dump> <pass>
|
||||||
|
dehaeze@rnice:/tmp_14_days/ /home/thomas/mnt/ESRF fuse.sshfs noauto,allow_other,default_permissions 0 0
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-bash"><span class="org-variable-name">drive</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'ESRF\nNAS'</span> | rofi -dmenu -no-custom -p <span class="org-string">'Drive:'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||||
|
|
||||||
|
<span class="org-keyword">if</span> <span class="org-type">grep</span> -qs <span class="org-string">"/home/thomas/mnt/</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">drive</span></span><span class="org-string">"</span> /proc/mounts; <span class="org-keyword">then</span>
|
||||||
|
umount <span class="org-string">"/home/thomas/mnt/</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">drive</span></span><span class="org-string">"</span> && <span class="org-sh-escaped-newline">\</span>
|
||||||
|
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">drive</span></span><span class="org-string"> "</span> <span class="org-string">'Successfully unmounted'</span> || <span class="org-sh-escaped-newline">\</span>
|
||||||
|
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> --urgency=critical <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">drive</span></span><span class="org-string"> "</span> <span class="org-string">'Error while unmounted'</span>
|
||||||
|
<span class="org-keyword">else</span>
|
||||||
|
<span class="org-type">echo</span> <span class="org-string">"It's not mounted."</span>
|
||||||
|
mount <span class="org-string">"/home/thomas/mnt/</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">drive</span></span><span class="org-string">"</span> && <span class="org-sh-escaped-newline">\</span>
|
||||||
|
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">drive</span></span><span class="org-string"> "</span> <span class="org-string">'Successfully mounted'</span> || <span class="org-sh-escaped-newline">\</span>
|
||||||
|
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> --urgency=critical <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">drive</span></span><span class="org-string"> "</span> <span class="org-string">'Error while mounted'</span>
|
||||||
|
<span class="org-keyword">fi</span>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="outline-container-screen-select" class="outline-2">
|
||||||
|
<h2 id="screen-select"><code>screen-select</code> - Xrandr pre-defined scripts</h2>
|
||||||
|
<div class="outline-text-2" id="text-screen-select">
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-bash"><span class="org-variable-name">option</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">"Work\nXPS\nHome"</span> | rofi -i -dmenu<span class="org-rainbow-delimiters-depth-1">)</span>
|
||||||
|
|
||||||
|
<span class="org-function-name">after_screen_change</span> <span class="org-rainbow-delimiters-depth-1">()</span> <span class="org-rainbow-delimiters-depth-1">{</span>
|
||||||
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Fix background if screen size/arangement has changed.</span>
|
||||||
|
setbg
|
||||||
|
|
||||||
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Kill polybar</span>
|
||||||
|
killall -q polybar
|
||||||
|
|
||||||
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Wait until the processes have been shut down</span>
|
||||||
|
<span class="org-keyword">while</span> <span class="org-type">pgrep</span> -u $<span class="org-variable-name">UID</span> -x polybar >/dev/null; <span class="org-keyword">do</span> <span class="org-type">sleep</span> <span class="org-highlight-numbers-number">1</span>; <span class="org-keyword">done</span>
|
||||||
|
|
||||||
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Launch bars</span>
|
||||||
|
polybar top &
|
||||||
|
<span class="org-rainbow-delimiters-depth-1">}</span>
|
||||||
|
|
||||||
|
<span class="org-keyword">case</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">option</span></span><span class="org-string">"</span><span class="org-keyword"> in</span>
|
||||||
|
<span class="org-string">"Work"</span>)
|
||||||
|
xrandr --output eDP1 --off --output DP1 --off --output DP2 --off --output DP2-1 --off --output VIRTUAL1 --off --output DP2-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && <span class="org-sh-escaped-newline">\</span>
|
||||||
|
after_screen_change
|
||||||
|
;;
|
||||||
|
<span class="org-string">"XPS"</span>)
|
||||||
|
xrandr --output DP1 --off --output DP2 --off --output DP2-1 --off --output VIRTUAL1 --off --output DP2-2 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal && <span class="org-sh-escaped-newline">\</span>
|
||||||
|
after_screen_change
|
||||||
|
;;
|
||||||
|
<span class="org-string">"Home"</span>)
|
||||||
|
xrandr --output eDP1 --off --output DP1 --off --output DP2 --off --output DP2-2 --off --output VIRTUAL1 --off --output DP2-1 --primary --mode 2560x1440 --pos 0x0 --rotate normal && <span class="org-sh-escaped-newline">\</span>
|
||||||
|
after_screen_change
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
<span class="org-type">echo</span> <span class="org-string">"== ! missing or invalid argument ! =="</span>
|
||||||
|
<span class="org-keyword">exit</span> <span class="org-highlight-numbers-number">2</span>
|
||||||
|
<span class="org-keyword">esac</span>
|
||||||
|
|
||||||
|
<span class="org-keyword">exit</span> <span class="org-highlight-numbers-number">0</span>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-print-rnice" class="outline-2">
|
<div id="outline-container-print-rnice" class="outline-2">
|
||||||
<h2 id="print-rnice"><code>print-rnice</code> - Print on Rnice</h2>
|
<h2 id="print-rnice"><code>print-rnice</code> - Print on Rnice</h2>
|
||||||
<div class="outline-text-2" id="text-print-rnice">
|
<div class="outline-text-2" id="text-print-rnice">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-bash"><span class="org-variable-name">nbpage</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'1\n2\n4'</span> | dmenu -p <span class="org-string">'Number of pages per sheet'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
<pre class="src src-bash"><span class="org-variable-name">nbpage</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'1\n2\n4'</span> | rofi -dmenu -no-custom -p <span class="org-string">'Number of pages per sheet'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||||
<span class="org-variable-name">sides</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'one-sided\ntwo-sided-long-edge\ntwo-sided-short-edge'</span> | dmenu -p <span class="org-string">'Two Sided:'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
<span class="org-variable-name">sides</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'one-sided\ntwo-sided-long-edge\ntwo-sided-short-edge'</span> | rofi -dmenu -no-custom -p <span class="org-string">'Two Sided:'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||||
<span class="org-variable-name">media</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'A4\nA3'</span> | dmenu -p <span class="org-string">'Size:'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
<span class="org-variable-name">media</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">'A4\nA3'</span> | rofi -dmenu -no-custom -p <span class="org-string">'Size:'</span> -l <span class="org-highlight-numbers-number">20</span><span class="org-rainbow-delimiters-depth-1">)</span>;
|
||||||
|
|
||||||
<span class="org-comment-delimiter"># </span><span class="org-comment">First copy the file to Rnice</span>
|
<span class="org-comment-delimiter"># </span><span class="org-comment">First copy the file to Rnice</span>
|
||||||
<span class="org-keyword">if</span> sshpass -p <span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">pass</span><span class="org-string"><span class="org-sh-quoted-exec"> esrf.fr/dehaeze | sed -n 1p)</span></span><span class="org-string">"</span> scp $<span class="org-highlight-numbers-number">1</span> dehaeze@rnice:/home/esrf/dehaeze/Downloads/; <span class="org-keyword">then</span>
|
<span class="org-keyword">if</span> sshpass -p <span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">pass</span><span class="org-string"><span class="org-sh-quoted-exec"> esrf.fr/dehaeze | sed -n 1p)</span></span><span class="org-string">"</span> scp $<span class="org-highlight-numbers-number">1</span> dehaeze@rnice:/home/esrf/dehaeze/Downloads/; <span class="org-keyword">then</span>
|
||||||
@@ -89,59 +163,6 @@ dunstify --replace=<span class="org-highlight-numbers-number">89891</span> <span
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-tmp14" class="outline-2">
|
|
||||||
<h2 id="tmp14"><code>tmp14</code> - Mount/Umount tmp_14_days folder</h2>
|
|
||||||
<div class="outline-text-2" id="text-tmp14">
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-highlight-numbers-number">1</span> == <span class="org-string">"mount"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
||||||
<span class="org-keyword">if</span> sshfs -o allow_other,default_permissions -p <span class="org-highlight-numbers-number">5022</span> dehaeze@firewall.esrf.fr:/tmp_14_days/ ~/mnt/ESRF; <span class="org-keyword">then</span>
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">'ESRF TMP '</span> <span class="org-string">'Successfully mounted'</span>
|
|
||||||
<span class="org-keyword">else</span>
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> --urgency=critical <span class="org-string">'ESRF TMP '</span> <span class="org-string">'Error while mounted'</span>
|
|
||||||
<span class="org-keyword">fi</span>
|
|
||||||
<span class="org-keyword">elif</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-highlight-numbers-number">1</span> == <span class="org-string">"umount"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
||||||
<span class="org-keyword">if</span> umount /home/thomas/mnt/ESRF/; <span class="org-keyword">then</span>
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">'ESRF TMP '</span> <span class="org-string">'Successfully unmounted'</span>
|
|
||||||
<span class="org-keyword">else</span>
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> --urgency=critical <span class="org-string">'ESRF TMP '</span> <span class="org-string">'Error while unmounted'</span>
|
|
||||||
<span class="org-keyword">fi</span>
|
|
||||||
<span class="org-keyword">fi</span>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="outline-container-nas" class="outline-2">
|
|
||||||
<h2 id="nas"><code>nas</code> - Interact with the NAS</h2>
|
|
||||||
<div class="outline-text-2" id="text-nas">
|
|
||||||
<p>
|
|
||||||
As an alternative, <code>sshfs</code> can be used:
|
|
||||||
</p>
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-bash">sshfs -o allow_other,default_permissions nas:/Data ~/mnt/NAS
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-highlight-numbers-number">1</span> == <span class="org-string">"mount"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
||||||
<span class="org-keyword">if</span> sshfs -o allow_other,default_permissions homelab:/srv/storage/ ~/mnt/NAS; <span class="org-keyword">then</span>
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">'NAS '</span> <span class="org-string">'Successfully mounted'</span>
|
|
||||||
<span class="org-keyword">else</span>
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> --urgency=critical <span class="org-string">'NAS '</span> <span class="org-string">'Error while mounted'</span>
|
|
||||||
<span class="org-keyword">fi</span>
|
|
||||||
<span class="org-keyword">elif</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-highlight-numbers-number">1</span> == <span class="org-string">"umount"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
|
||||||
<span class="org-keyword">if</span> umount ~/mnt/NAS/; <span class="org-keyword">then</span>
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> <span class="org-string">'NAS '</span> <span class="org-string">'Successfully unmounted'</span>
|
|
||||||
<span class="org-keyword">else</span>
|
|
||||||
dunstify --replace=<span class="org-highlight-numbers-number">58249</span> --urgency=critical <span class="org-string">'NAS '</span> <span class="org-string">'Error while unmounted'</span>
|
|
||||||
<span class="org-keyword">fi</span>
|
|
||||||
<span class="org-keyword">fi</span>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="outline-container-torrent-add" class="outline-2">
|
<div id="outline-container-torrent-add" class="outline-2">
|
||||||
<h2 id="torrent-add"><code>torrent-add</code> - Download Torrent</h2>
|
<h2 id="torrent-add"><code>torrent-add</code> - Download Torrent</h2>
|
||||||
<div class="outline-text-2" id="text-torrent-add">
|
<div class="outline-text-2" id="text-torrent-add">
|
||||||
@@ -184,50 +205,6 @@ Script used to convert a figure drawn on my Boox note2 to a png file that can th
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-screen-select" class="outline-2">
|
|
||||||
<h2 id="screen-select"><code>screen-select</code> - Xrandr pre-defined scripts</h2>
|
|
||||||
<div class="outline-text-2" id="text-screen-select">
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-bash"><span class="org-variable-name">option</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> -e <span class="org-string">"Work\nXPS\nHome"</span> | rofi -i -dmenu<span class="org-rainbow-delimiters-depth-1">)</span>
|
|
||||||
|
|
||||||
<span class="org-function-name">after_screen_change</span> <span class="org-rainbow-delimiters-depth-1">()</span> <span class="org-rainbow-delimiters-depth-1">{</span>
|
|
||||||
<span class="org-comment-delimiter"># </span><span class="org-comment">Fix background if screen size/arangement has changed.</span>
|
|
||||||
setbg
|
|
||||||
|
|
||||||
<span class="org-comment-delimiter"># </span><span class="org-comment">Kill polybar</span>
|
|
||||||
killall -q polybar
|
|
||||||
|
|
||||||
<span class="org-comment-delimiter"># </span><span class="org-comment">Wait until the processes have been shut down</span>
|
|
||||||
<span class="org-keyword">while</span> <span class="org-type">pgrep</span> -u $<span class="org-variable-name">UID</span> -x polybar >/dev/null; <span class="org-keyword">do</span> <span class="org-type">sleep</span> <span class="org-highlight-numbers-number">1</span>; <span class="org-keyword">done</span>
|
|
||||||
|
|
||||||
<span class="org-comment-delimiter"># </span><span class="org-comment">Launch bars</span>
|
|
||||||
polybar top &
|
|
||||||
<span class="org-rainbow-delimiters-depth-1">}</span>
|
|
||||||
|
|
||||||
<span class="org-keyword">case</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">option</span></span><span class="org-string">"</span><span class="org-keyword"> in</span>
|
|
||||||
<span class="org-string">"Work"</span>)
|
|
||||||
xrandr --output eDP1 --off --output DP1 --off --output DP2 --off --output DP2-1 --off --output VIRTUAL1 --off --output DP2-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && <span class="org-sh-escaped-newline">\</span>
|
|
||||||
after_screen_change
|
|
||||||
;;
|
|
||||||
<span class="org-string">"XPS"</span>)
|
|
||||||
xrandr --output DP1 --off --output DP2 --off --output DP2-1 --off --output VIRTUAL1 --off --output DP2-2 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal && <span class="org-sh-escaped-newline">\</span>
|
|
||||||
after_screen_change
|
|
||||||
;;
|
|
||||||
<span class="org-string">"Home"</span>)
|
|
||||||
xrandr --output eDP1 --off --output DP1 --off --output DP2 --off --output DP2-2 --off --output VIRTUAL1 --off --output DP2-1 --primary --mode 2560x1440 --pos 0x0 --rotate normal && <span class="org-sh-escaped-newline">\</span>
|
|
||||||
after_screen_change
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
<span class="org-type">echo</span> <span class="org-string">"== ! missing or invalid argument ! =="</span>
|
|
||||||
<span class="org-keyword">exit</span> <span class="org-highlight-numbers-number">2</span>
|
|
||||||
<span class="org-keyword">esac</span>
|
|
||||||
|
|
||||||
<span class="org-keyword">exit</span> <span class="org-highlight-numbers-number">0</span>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="outline-container-color-picker" class="outline-2">
|
<div id="outline-container-color-picker" class="outline-2">
|
||||||
<h2 id="color-picker"><code>color-picker</code> - Pick color and copy to clipboard</h2>
|
<h2 id="color-picker"><code>color-picker</code> - Pick color and copy to clipboard</h2>
|
||||||
<div class="outline-text-2" id="text-color-picker">
|
<div class="outline-text-2" id="text-color-picker">
|
||||||
@@ -268,7 +245,7 @@ List all <code>pdf</code> files and open selected one with zathura.
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: Dehaeze Thomas</p>
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-10-25 lun. 14:33 -->
|
<!-- 2021-11-03 mer. 10:59 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>Home Server</title>
|
<title>Home Server</title>
|
||||||
<meta name="author" content="Dehaeze Thomas" />
|
<meta name="author" content="Dehaeze Thomas" />
|
||||||
@@ -84,6 +84,7 @@
|
|||||||
<li><a href="#orgcdbaa2f"><code>config.yml</code></a></li>
|
<li><a href="#orgcdbaa2f"><code>config.yml</code></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
<li><a href="#org09bd284"><code>linkding</code> - Bookmark manager (link)</a></li>
|
||||||
<li><a href="#org69410ad"><code>snapraid</code> - Manage local backup with parity disk (link)</a>
|
<li><a href="#org69410ad"><code>snapraid</code> - Manage local backup with parity disk (link)</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org268eb95"><code>snapraid.conf</code></a></li>
|
<li><a href="#org268eb95"><code>snapraid.conf</code></a></li>
|
||||||
@@ -98,12 +99,12 @@
|
|||||||
<li><a href="#org1932d9e"><code>wikijs</code> - Wiki App (link)</a></li>
|
<li><a href="#org1932d9e"><code>wikijs</code> - Wiki App (link)</a></li>
|
||||||
<li><a href="#org41419ce"><code>research</code> - Research Pages (link)</a>
|
<li><a href="#org41419ce"><code>research</code> - Research Pages (link)</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org842c7ec"><code>Caddyfile</code></a></li>
|
<li><a href="#orgfc0a576"><code>Caddyfile</code></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org6319523"><code>dotfiles</code> - Dotfiles (link)</a>
|
<li><a href="#org6319523"><code>dotfiles</code> - Dotfiles (link)</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgfc0a576"><code>Caddyfile</code></a></li>
|
<li><a href="#org7233c2e"><code>Caddyfile</code></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org56db687"><code>hugo</code> - Wiki + Blog (link)</a></li>
|
<li><a href="#org56db687"><code>hugo</code> - Wiki + Blog (link)</a></li>
|
||||||
@@ -1320,6 +1321,35 @@ In order to have notifications on Linux desktop use <a href="https://github.com/
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="outline-container-org09bd284" class="outline-3">
|
||||||
|
<h3 id="org09bd284"><code>linkding</code> - Bookmark manager (<a href="https://github.com/sissbruecker/linkding">link</a>)</h3>
|
||||||
|
<div class="outline-text-3" id="text-org09bd284">
|
||||||
|
<div class="org-src-container">
|
||||||
|
<pre class="src src-yaml"> <span class="org-variable-name">linkding</span>:
|
||||||
|
<span class="org-variable-name">container_name</span>: linkding
|
||||||
|
<span class="org-variable-name">image</span>: sissbruecker/linkding:latest
|
||||||
|
<span class="org-variable-name">restart</span>: unless-stopped
|
||||||
|
<span class="org-variable-name">networks</span>:
|
||||||
|
- t2_proxy
|
||||||
|
<span class="org-variable-name">volumes</span>:
|
||||||
|
- $CONFIGDIR/linkding:/etc/linkding/data
|
||||||
|
<span class="org-variable-name">environment</span>:
|
||||||
|
- TZ=$TZ
|
||||||
|
- PUID=$PUID
|
||||||
|
- PGID=$PGID
|
||||||
|
<span class="org-variable-name">labels</span>:
|
||||||
|
- <span class="org-string">"traefik.enable=true"</span>
|
||||||
|
- <span class="org-string">"traefik.http.routers.linkding-rtr.entrypoints=https"</span>
|
||||||
|
- <span class="org-string">"traefik.http.routers.linkding-rtr.rule=Host(`bm.$DOMAINNAME`)"</span>
|
||||||
|
- <span class="org-string">"traefik.http.routers.linkding-rtr.tls=true"</span>
|
||||||
|
- <span class="org-string">"traefik.http.routers.linkding-rtr.service=linkding-svc"</span>
|
||||||
|
- <span class="org-string">"traefik.http.services.linkding-svc.loadbalancer.server.port=9090"</span>
|
||||||
|
<span class="org-variable-name">logging</span>: <span class="org-function-name">*default-logging</span>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org69410ad" class="outline-3">
|
<div id="outline-container-org69410ad" class="outline-3">
|
||||||
<h3 id="org69410ad"><code>snapraid</code> - Manage local backup with parity disk (<a href="https://github.com/amadvance/snapraid">link</a>)</h3>
|
<h3 id="org69410ad"><code>snapraid</code> - Manage local backup with parity disk (<a href="https://github.com/amadvance/snapraid">link</a>)</h3>
|
||||||
<div class="outline-text-3" id="text-org69410ad">
|
<div class="outline-text-3" id="text-org69410ad">
|
||||||
@@ -1688,9 +1718,9 @@ exclude .AppleDB
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org842c7ec" class="outline-4">
|
<div id="outline-container-orgfc0a576" class="outline-4">
|
||||||
<h4 id="org842c7ec"><code>Caddyfile</code></h4>
|
<h4 id="orgfc0a576"><code>Caddyfile</code></h4>
|
||||||
<div class="outline-text-4" id="text-org842c7ec">
|
<div class="outline-text-4" id="text-orgfc0a576">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-conf">0.0.0.0:<span class="org-highlight-numbers-number">2015</span> {
|
<pre class="src src-conf">0.0.0.0:<span class="org-highlight-numbers-number">2015</span> {
|
||||||
root /srv/www/
|
root /srv/www/
|
||||||
@@ -1739,9 +1769,9 @@ exclude .AppleDB
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgfc0a576" class="outline-4">
|
<div id="outline-container-org7233c2e" class="outline-4">
|
||||||
<h4 id="orgfc0a576"><code>Caddyfile</code></h4>
|
<h4 id="org7233c2e"><code>Caddyfile</code></h4>
|
||||||
<div class="outline-text-4" id="text-orgfc0a576">
|
<div class="outline-text-4" id="text-org7233c2e">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-conf">0.0.0.0:<span class="org-highlight-numbers-number">2015</span> {
|
<pre class="src src-conf">0.0.0.0:<span class="org-highlight-numbers-number">2015</span> {
|
||||||
root /srv/www/docs/
|
root /srv/www/docs/
|
||||||
@@ -1936,12 +1966,12 @@ exclude .AppleDB
|
|||||||
- PUID=$PUID
|
- PUID=$PUID
|
||||||
- PGID=$PGID
|
- PGID=$PGID
|
||||||
- TZ=$TZ
|
- TZ=$TZ
|
||||||
<span class="org-variable-name">group-add</span>:
|
<span class="org-comment-delimiter"># </span><span class="org-comment">group_add:</span>
|
||||||
- 109
|
<span class="org-comment-delimiter"># </span><span class="org-comment">- 122</span>
|
||||||
<span class="org-variable-name">devices</span>:
|
<span class="org-comment-delimiter"># </span><span class="org-comment">devices:</span>
|
||||||
<span class="org-comment-delimiter"># </span><span class="org-comment">VAAPI Devices</span>
|
<span class="org-comment-delimiter"># </span><span class="org-comment"># VAAPI Devices</span>
|
||||||
- /dev/dri/renderD128:/dev/dri/renderD128
|
<span class="org-comment-delimiter"># </span><span class="org-comment">- /dev/dri/renderD128:/dev/dri/renderD128</span>
|
||||||
- /dev/dri/card0:/dev/dri/card0
|
<span class="org-comment-delimiter"># </span><span class="org-comment">- /dev/dri/card0:/dev/dri/card0</span>
|
||||||
<span class="org-variable-name">ports</span>:
|
<span class="org-variable-name">ports</span>:
|
||||||
- 8096:8096
|
- 8096:8096
|
||||||
<span class="org-variable-name">labels</span>:
|
<span class="org-variable-name">labels</span>:
|
||||||
@@ -2552,7 +2582,7 @@ Type <code>crontab -e</code> and add this line:
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: Dehaeze Thomas</p>
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-10-25 lun. 14:33 -->
|
<!-- 2021-11-03 mer. 10:59 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>Qutebrowser Configuration</title>
|
<title>Qutebrowser Configuration</title>
|
||||||
<meta name="author" content="Dehaeze Thomas" />
|
<meta name="author" content="Dehaeze Thomas" />
|
||||||
@@ -1044,7 +1044,7 @@ buku --add <span class="org-string">"</span><span class="org-string"><span class
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: Dehaeze Thomas</p>
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-06-20 dim. 14:21 -->
|
<!-- 2021-11-03 mer. 10:59 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>Ranger</title>
|
<title>Ranger</title>
|
||||||
<meta name="author" content="Dehaeze Thomas" />
|
<meta name="author" content="Dehaeze Thomas" />
|
||||||
@@ -16,13 +16,13 @@
|
|||||||
<a accesskey="h" href="./index.html"> UP </a>
|
<a accesskey="h" href="./index.html"> UP </a>
|
||||||
|
|
|
|
||||||
<a accesskey="H" href="./index.html"> HOME </a>
|
<a accesskey="H" href="./index.html"> HOME </a>
|
||||||
</div><div id="content">
|
</div><div id="content" class="content">
|
||||||
<h1 class="title">Ranger</h1>
|
<h1 class="title">Ranger</h1>
|
||||||
<div id="table-of-contents">
|
<div id="table-of-contents" role="doc-toc">
|
||||||
<h2>Table of Contents</h2>
|
<h2>Table of Contents</h2>
|
||||||
<div id="text-table-of-contents">
|
<div id="text-table-of-contents" role="doc-toc">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org55987ce">Documentation</a></li>
|
<li><a href="#org1462e63">Documentation</a></li>
|
||||||
<li><a href="#org986b109">Config</a>
|
<li><a href="#org986b109">Config</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgd97cb82">Options</a></li>
|
<li><a href="#orgd97cb82">Options</a></li>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><a href="#orgd57ea4e">Define keys for the browser</a>
|
<li><a href="#orgd57ea4e">Define keys for the browser</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgf964ebf">Basic</a></li>
|
<li><a href="#orgef5af30">Basic</a></li>
|
||||||
<li><a href="#org1c6f91a">Open Shell in current directory</a></li>
|
<li><a href="#org1c6f91a">Open Shell in current directory</a></li>
|
||||||
<li><a href="#orgdf72b75">Open With</a></li>
|
<li><a href="#orgdf72b75">Open With</a></li>
|
||||||
<li><a href="#org8e148cf">Filter</a></li>
|
<li><a href="#org8e148cf">Filter</a></li>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><a href="#org7e7a4ec">Define keys for the console</a>
|
<li><a href="#org7e7a4ec">Define keys for the console</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgef5af30">Basic</a></li>
|
<li><a href="#org253669c">Basic</a></li>
|
||||||
<li><a href="#orga9f3972">Move around</a></li>
|
<li><a href="#orga9f3972">Move around</a></li>
|
||||||
<li><a href="#org6265874">Line Editing</a></li>
|
<li><a href="#org6265874">Line Editing</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><a href="#rifle">Rifle</a>
|
<li><a href="#rifle">Rifle</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org1462e63">Documentation</a></li>
|
<li><a href="#org10a01f1">Documentation</a></li>
|
||||||
<li><a href="#org64e62ab">Text Files</a></li>
|
<li><a href="#org64e62ab">Text Files</a></li>
|
||||||
<li><a href="#org72831a4">PDF, Epub and jdvu</a></li>
|
<li><a href="#org72831a4">PDF, Epub and jdvu</a></li>
|
||||||
<li><a href="#org2c35566">Archives</a></li>
|
<li><a href="#org2c35566">Archives</a></li>
|
||||||
@@ -94,9 +94,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org55987ce" class="outline-2">
|
<div id="outline-container-org1462e63" class="outline-2">
|
||||||
<h2 id="org55987ce">Documentation</h2>
|
<h2 id="org1462e63">Documentation</h2>
|
||||||
<div class="outline-text-2" id="text-org55987ce">
|
<div class="outline-text-2" id="text-org1462e63">
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>
|
<p>
|
||||||
%f the highlighted file
|
%f the highlighted file
|
||||||
@@ -378,9 +378,9 @@ Backup to NAS:
|
|||||||
<div class="outline-text-4" id="text-org7681c16">
|
<div class="outline-text-4" id="text-org7681c16">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
||||||
tmux split -v -l <span class="org-highlight-numbers-number">2</span> atool -x $<span class="org-highlight-numbers-number">1</span> && tmux select-pane -U
|
tmux split -v -l <span class="org-highlight-numbers-number">2</span> atool -x <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> && tmux select-pane -U
|
||||||
<span class="org-keyword">else</span>
|
<span class="org-keyword">else</span>
|
||||||
atool -x $<span class="org-highlight-numbers-number">1</span>
|
atool -x <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span>
|
||||||
<span class="org-keyword">fi</span>
|
<span class="org-keyword">fi</span>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -392,9 +392,9 @@ Backup to NAS:
|
|||||||
<div class="outline-text-4" id="text-orgd110a48">
|
<div class="outline-text-4" id="text-orgd110a48">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> $<span class="org-variable-name">TMUX</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
|
||||||
tmux split -v -l <span class="org-highlight-numbers-number">2</span> apack $<span class="org-rainbow-delimiters-depth-1">{</span><span class="org-variable-name">1</span>%.*<span class="org-rainbow-delimiters-depth-1">}</span>.zip $<span class="org-highlight-numbers-number">1</span> && tmux select-pane -U
|
tmux split -v -l <span class="org-highlight-numbers-number">2</span> apack <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">{1%.*}</span></span><span class="org-string">.zip"</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> && tmux select-pane -U
|
||||||
<span class="org-keyword">else</span>
|
<span class="org-keyword">else</span>
|
||||||
apack $<span class="org-rainbow-delimiters-depth-1">{</span><span class="org-variable-name">1</span>%.*<span class="org-rainbow-delimiters-depth-1">}</span>.zip $<span class="org-highlight-numbers-number">1</span>
|
apack <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">{1%.*}</span></span><span class="org-string">.zip"</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span>
|
||||||
<span class="org-keyword">fi</span>
|
<span class="org-keyword">fi</span>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
@@ -406,7 +406,7 @@ Backup to NAS:
|
|||||||
<h4 id="org4e182ba">Copy File Content</h4>
|
<h4 id="org4e182ba">Copy File Content</h4>
|
||||||
<div class="outline-text-4" id="text-org4e182ba">
|
<div class="outline-text-4" id="text-org4e182ba">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-bash">xclip -sel c < $<span class="org-highlight-numbers-number">1</span> && dunstify <span class="org-string">"Ranger"</span> <span class="org-string">"Copied to clipboard"</span>
|
<pre class="src src-bash">xclip -sel c < <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> && dunstify <span class="org-string">"Ranger"</span> <span class="org-string">"Copied to clipboard"</span>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -455,9 +455,9 @@ Backup to NAS:
|
|||||||
<h3 id="orgd57ea4e">Define keys for the browser</h3>
|
<h3 id="orgd57ea4e">Define keys for the browser</h3>
|
||||||
<div class="outline-text-3" id="text-orgd57ea4e">
|
<div class="outline-text-3" id="text-orgd57ea4e">
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-orgf964ebf" class="outline-4">
|
<div id="outline-container-orgef5af30" class="outline-4">
|
||||||
<h4 id="orgf964ebf">Basic</h4>
|
<h4 id="orgef5af30">Basic</h4>
|
||||||
<div class="outline-text-4" id="text-orgf964ebf">
|
<div class="outline-text-4" id="text-orgef5af30">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-conf">map Q quit!
|
<pre class="src src-conf">map Q quit!
|
||||||
map q eval fm.execute_console(<span class="org-string">"shell tmux detach"</span>) if <span class="org-string">'TMUX'</span> in os.environ.keys() else fm.execute_console(<span class="org-string">"quit"</span>)
|
map q eval fm.execute_console(<span class="org-string">"shell tmux detach"</span>) if <span class="org-string">'TMUX'</span> in os.environ.keys() else fm.execute_console(<span class="org-string">"quit"</span>)
|
||||||
@@ -770,9 +770,9 @@ map <span class="org-string">'<any> enter_bookmark %any</span>
|
|||||||
<h3 id="org7e7a4ec">Define keys for the console</h3>
|
<h3 id="org7e7a4ec">Define keys for the console</h3>
|
||||||
<div class="outline-text-3" id="text-org7e7a4ec">
|
<div class="outline-text-3" id="text-org7e7a4ec">
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-orgef5af30" class="outline-4">
|
<div id="outline-container-org253669c" class="outline-4">
|
||||||
<h4 id="orgef5af30">Basic</h4>
|
<h4 id="org253669c">Basic</h4>
|
||||||
<div class="outline-text-4" id="text-orgef5af30">
|
<div class="outline-text-4" id="text-org253669c">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-conf">cmap <tab> eval fm.ui.console.tab()
|
<pre class="src src-conf">cmap <tab> eval fm.ui.console.tab()
|
||||||
cmap <s-tab> eval fm.ui.console.tab(-1)
|
cmap <s-tab> eval fm.ui.console.tab(-1)
|
||||||
@@ -825,9 +825,9 @@ copycmap <end> <C-e>
|
|||||||
<div class="outline-text-2" id="text-rifle">
|
<div class="outline-text-2" id="text-rifle">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org1462e63" class="outline-3">
|
<div id="outline-container-org10a01f1" class="outline-3">
|
||||||
<h3 id="org1462e63">Documentation</h3>
|
<h3 id="org10a01f1">Documentation</h3>
|
||||||
<div class="outline-text-3" id="text-org1462e63">
|
<div class="outline-text-3" id="text-org10a01f1">
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">This is the configuration file of "rifle", ranger's file executor/opener.</span>
|
<pre class="src src-conf"><span class="org-comment-delimiter"># </span><span class="org-comment">This is the configuration file of "rifle", ranger's file executor/opener.</span>
|
||||||
<span class="org-comment-delimiter"># </span><span class="org-comment">Each line consists of conditions and a command. For each line the conditions</span>
|
<span class="org-comment-delimiter"># </span><span class="org-comment">Each line consists of conditions and a command. For each line the conditions</span>
|
||||||
@@ -1134,7 +1134,7 @@ Org mode files
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: Dehaeze Thomas</p>
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
<p class="date">Created: 2021-06-20 dim. 14:21</p>
|
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2021-10-25 lun. 14:33 -->
|
<!-- 2021-11-03 mer. 10:59 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>Windows Config and Install</title>
|
<title>Windows Config and Install</title>
|
||||||
<meta name="author" content="Dehaeze Thomas" />
|
<meta name="author" content="Dehaeze Thomas" />
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
<li><a href="#org0143940">Install Windows10 PRO</a></li>
|
<li><a href="#org0143940">Install Windows10 PRO</a></li>
|
||||||
<li><a href="#org0cc05f7">Install Software using Chocolatey</a></li>
|
<li><a href="#org0cc05f7">Install Software using Chocolatey</a></li>
|
||||||
<li><a href="#org0a94edb">Debloat windows10</a></li>
|
<li><a href="#org0a94edb">Debloat windows10</a></li>
|
||||||
<li><a href="#org9192414">SSHFS</a>
|
<li><a href="#org1c09272">SSHFS</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org46e6091">SSH Setup</a></li>
|
<li><a href="#org46e6091">SSH Setup</a></li>
|
||||||
<li><a href="#org432cd75">SSHFS</a></li>
|
<li><a href="#org9192414">SSHFS</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#orgb8446e0">Software Setup</a>
|
<li><a href="#orgb8446e0">Software Setup</a>
|
||||||
@@ -80,7 +80,7 @@ First install Chocolatey using a PowerShell as administrator:
|
|||||||
Then, install all required software using one command:
|
Then, install all required software using one command:
|
||||||
</p>
|
</p>
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-bash">choco install -y firefox 7zip.install vlc git.install malwarebytes sumatrapdf.install steam anydesk discord f.lux cmder cura ccleaner neovim
|
<pre class="src src-bash">choco install -y firefox 7zip.install vlc git.install malwarebytes sumatrapdf.install steam anydesk discord f.lux cmder cura ccleaner neovim imageglass
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -103,9 +103,9 @@ Run a PowerShell with administrative rights and run:
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org9192414" class="outline-2">
|
<div id="outline-container-org1c09272" class="outline-2">
|
||||||
<h2 id="org9192414">SSHFS</h2>
|
<h2 id="org1c09272">SSHFS</h2>
|
||||||
<div class="outline-text-2" id="text-org9192414">
|
<div class="outline-text-2" id="text-org1c09272">
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-org46e6091" class="outline-3">
|
<div id="outline-container-org46e6091" class="outline-3">
|
||||||
<h3 id="org46e6091">SSH Setup</h3>
|
<h3 id="org46e6091">SSH Setup</h3>
|
||||||
@@ -159,9 +159,9 @@ Finally, it should be possible to ssh to the server.
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org432cd75" class="outline-3">
|
<div id="outline-container-org9192414" class="outline-3">
|
||||||
<h3 id="org432cd75">SSHFS</h3>
|
<h3 id="org9192414">SSHFS</h3>
|
||||||
<div class="outline-text-3" id="text-org432cd75">
|
<div class="outline-text-3" id="text-org9192414">
|
||||||
<p>
|
<p>
|
||||||
Install <a href="https://github.com/billziss-gh/sshfs-win">sshfs-win</a>.
|
Install <a href="https://github.com/billziss-gh/sshfs-win">sshfs-win</a>.
|
||||||
</p>
|
</p>
|
||||||
@@ -226,7 +226,7 @@ Then, Syncthing can be accessed with: <a href="http://localhost:8384/">http://lo
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: Dehaeze Thomas</p>
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
188
doom.org
188
doom.org
@@ -12,6 +12,11 @@
|
|||||||
#+html_head: <script type="text/javascript" src="./dist/script.js"></script>
|
#+html_head: <script type="text/javascript" src="./dist/script.js"></script>
|
||||||
#+property: header-args:emacs-lisp :tangle ~/.config/doom/config.el :results none :padline no
|
#+property: header-args:emacs-lisp :tangle ~/.config/doom/config.el :results none :padline no
|
||||||
|
|
||||||
|
* Installation
|
||||||
|
#+begin_src bash :tangle no
|
||||||
|
yay -Ss aspell aspell-fr aspell-en
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Introduction and Resources
|
* Introduction and Resources
|
||||||
https://medium.com/urbint-engineering/emacs-doom-for-newbies-1f8038604e3b
|
https://medium.com/urbint-engineering/emacs-doom-for-newbies-1f8038604e3b
|
||||||
https://noelwelsh.com/posts/2019-01-10-doom-emacs.html
|
https://noelwelsh.com/posts/2019-01-10-doom-emacs.html
|
||||||
@@ -236,7 +241,7 @@ Turn off auto-fill mode that add line breaks.
|
|||||||
** Spell Check
|
** Spell Check
|
||||||
Switch from one language to an other ([[https://stackoverflow.com/questions/42159012/emacs-spell-check-on-fly-for-2-languages][link]]).
|
Switch from one language to an other ([[https://stackoverflow.com/questions/42159012/emacs-spell-check-on-fly-for-2-languages][link]]).
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq ispell-dictionary "en")
|
(setq ispell-dictionary "en_US")
|
||||||
(setq ispell-program-name "aspell")
|
(setq ispell-program-name "aspell")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -285,6 +290,8 @@ Switch from one language to an other ([[https://stackoverflow.com/questions/4215
|
|||||||
|
|
||||||
(after! magit
|
(after! magit
|
||||||
(setq magit-diff-refine-hunk 'all)
|
(setq magit-diff-refine-hunk 'all)
|
||||||
|
(setq magit-repository-directories `(("~/Cloud/thesis/matlab/" . 1)
|
||||||
|
("~/Cloud/thesis/papers/" . 1)))
|
||||||
(setq magit-repolist-columns '(("Name" 25 magit-repolist-column-ident nil)
|
(setq magit-repolist-columns '(("Name" 25 magit-repolist-column-ident nil)
|
||||||
("Status" 7 magit-repolist-column-flag)
|
("Status" 7 magit-repolist-column-flag)
|
||||||
("B<U" 3 magit-repolist-column-unpulled-from-upstream
|
("B<U" 3 magit-repolist-column-unpulled-from-upstream
|
||||||
@@ -389,25 +396,17 @@ Disable flycheck for now with orgmode buffers:
|
|||||||
|
|
||||||
** Ox-Hugo
|
** Ox-Hugo
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; (defun tdh-export-everything-to-hugo ()
|
(defun tdh-export-everything-to-hugo ()
|
||||||
;; "Export all the .org files in the specified directory to markdown using Hugo"
|
"Export all the .org files in the specified directory to markdown using Hugo"
|
||||||
;; (interactive)
|
(interactive)
|
||||||
;; (setq org-files (directory-files (read-directory-name "Directory:" "/home/thomas/Cloud/brain/") t "org$" t))
|
(setq org-files (directory-files (read-directory-name "Directory:" "/home/thomas/Cloud/brain/") t "org$" t))
|
||||||
|
|
||||||
;; (while org-files
|
(while org-files
|
||||||
;; (setq current-org-file (car org-files))
|
(setq current-org-file (car org-files))
|
||||||
;; (message "Exporting %s" current-org-file)
|
(message "Exporting %s" current-org-file)
|
||||||
;; (find-file current-org-file)
|
(find-file current-org-file)
|
||||||
;; (org-hugo-export-to-md)
|
(org-hugo-export-to-md)
|
||||||
;; (setq org-files (cdr org-files))))
|
(setq org-files (cdr org-files))))
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Tramp
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(add-to-list 'tramp-remote-process-environment "GIT_AUTHOR_EMAIL=thomas.dehaeze@esrf.fr")
|
|
||||||
(add-to-list 'tramp-remote-process-environment "GIT_AUTHOR_NAME='Thomas Dehaeze'")
|
|
||||||
(add-to-list 'tramp-remote-process-environment "GIT_COMMITTER_EMAIL=thomas.dehaeze@esrf.fr")
|
|
||||||
(add-to-list 'tramp-remote-process-environment "GIT_COMMITTER_EMAIL='Thomas Dehaeze'")
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Others
|
** Others
|
||||||
@@ -722,12 +721,10 @@ This idea comes from [[https://blog.lambda.cx/posts/org-agenda-new-tab/][here]].
|
|||||||
:config (setq org-fancy-priorities-list '("■" "■" "■")))
|
:config (setq org-fancy-priorities-list '("■" "■" "■")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** TODO [#B] Org Notification based on calendar event
|
** Org Notification based on calendar event
|
||||||
https://emacs.stackexchange.com/questions/3844/good-methods-for-setting-up-alarms-audio-visual-triggered-by-org-mode-events
|
https://emacs.stackexchange.com/questions/3844/good-methods-for-setting-up-alarms-audio-visual-triggered-by-org-mode-events
|
||||||
|
|
||||||
- [ ] Issue with this part on ubuntu
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle no
|
|
||||||
(after! org-agenda
|
(after! org-agenda
|
||||||
(setq appt-message-warning-time 5)
|
(setq appt-message-warning-time 5)
|
||||||
(defun tdh-org-agenda-to-appt ()
|
(defun tdh-org-agenda-to-appt ()
|
||||||
@@ -740,7 +737,7 @@ https://emacs.stackexchange.com/questions/3844/good-methods-for-setting-up-alarm
|
|||||||
(setq appt-disp-window-function 'tdh-appt-display)
|
(setq appt-disp-window-function 'tdh-appt-display)
|
||||||
(setq appt-delete-window-function (lambda () t))
|
(setq appt-delete-window-function (lambda () t))
|
||||||
|
|
||||||
(setq tdh-appt-notification-app (concat (getenv "HOME") "/.local/bin/appt-notification"))
|
(setq tdh-appt-notification-app (concat (getenv "HOME") "/bin/appt-notification"))
|
||||||
(defun tdh-appt-display (min-to-app new-time msg)
|
(defun tdh-appt-display (min-to-app new-time msg)
|
||||||
(if (atom min-to-app)
|
(if (atom min-to-app)
|
||||||
(start-process "tdh-appt-notification-app" nil tdh-appt-notification-app min-to-app msg)
|
(start-process "tdh-appt-notification-app" nil tdh-appt-notification-app min-to-app msg)
|
||||||
@@ -750,11 +747,11 @@ https://emacs.stackexchange.com/questions/3844/good-methods-for-setting-up-alarm
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** appt-notification script
|
*** appt-notification script
|
||||||
#+begin_src bash :tangle ~/.local/bin/appt-notification :shebang "#!/usr/bin/env bash" :comments none :mkdirp yes
|
#+begin_src bash :tangle ~/.config/doom/bin/appt-notification :shebang "#!/usr/bin/env bash" :comments none :mkdirp yes
|
||||||
TIME="$1"TODO
|
TIME="$1"TODO
|
||||||
MSG="$2"
|
MSG="$2"
|
||||||
|
|
||||||
notify-send "Event in $TIME minutes" "$MSG"
|
dunstify --replace=85401 "Event in $TIME minutes" "$MSG"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Org Structure Template
|
** Org Structure Template
|
||||||
@@ -927,17 +924,6 @@ Do not export headline with the =:ignore:= tag:
|
|||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Open Files
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(after! org
|
|
||||||
(setq org-file-apps
|
|
||||||
'((auto-mode . emacs)
|
|
||||||
("\\.x?html?\\'" . "firefox %s")
|
|
||||||
("\\.pdf\\'" . "zathura \"%s\"")
|
|
||||||
("\\.pdf::\\([0-9]+\\)\\'" . "zathura \"%s\" -p %1")))
|
|
||||||
)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** HTML Export
|
** HTML Export
|
||||||
*** HTML Defaults
|
*** HTML Defaults
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -1868,6 +1854,14 @@ https://www.reddit.com/r/emacs/comments/d3a8or/pretty_org_tables_in_the_buffer_c
|
|||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Citeproc-Org
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package! citeproc-org
|
||||||
|
:after ox-hugo
|
||||||
|
:config
|
||||||
|
(citeproc-org-setup))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Org Wild Notifier
|
** Org Wild Notifier
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package! org-wild-notifier
|
(use-package! org-wild-notifier
|
||||||
@@ -1931,6 +1925,8 @@ https://www.reddit.com/r/emacs/comments/d3a8or/pretty_org_tables_in_the_buffer_c
|
|||||||
:ni "C-c F" 'tdh-insert-link-to-previous-figure)
|
:ni "C-c F" 'tdh-insert-link-to-previous-figure)
|
||||||
(:desc "Insert Screenshot"
|
(:desc "Insert Screenshot"
|
||||||
:ni "C-c s" 'tdh-insert-screenshot-org-link)
|
:ni "C-c s" 'tdh-insert-screenshot-org-link)
|
||||||
|
(:desc "Find Roam"
|
||||||
|
:ni "C-c r" 'orb-find-non-ref-file)
|
||||||
(:desc "Insert Roam"
|
(:desc "Insert Roam"
|
||||||
:ni "C-c R" 'orb-insert-non-ref)
|
:ni "C-c R" 'orb-insert-non-ref)
|
||||||
))
|
))
|
||||||
@@ -2113,17 +2109,6 @@ Map Keys
|
|||||||
:n "F" 'tdh-automatic-latex-fragment-deactivate)))
|
:n "F" 'tdh-automatic-latex-fragment-deactivate)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Org-Appear
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package! org-appear
|
|
||||||
:after org
|
|
||||||
:hook (org-mode . org-appear-mode)
|
|
||||||
:config (setq
|
|
||||||
org-appear-autolinks t
|
|
||||||
org-appear-autoentities t
|
|
||||||
org-appear-autosubmarkers t ))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** Bibtex =,r=
|
*** Bibtex =,r=
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! org
|
(after! org
|
||||||
@@ -2179,7 +2164,7 @@ Open HTML output externally
|
|||||||
Don't ask for confirmation when evaluating following blocs
|
Don't ask for confirmation when evaluating following blocs
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun tdh-org-confirm-babel-evaluate (lang body)
|
(defun tdh-org-confirm-babel-evaluate (lang body)
|
||||||
(not (member lang '("emacs-lisp" "latex" "matlab" "sh" "latex-macros" "python" "ipython" "jupyter-python" "dot"))))
|
(not (member lang '("emacs-lisp" "latex" "matlab" "sh" "latex-macros" "python"))))
|
||||||
|
|
||||||
(after! org
|
(after! org
|
||||||
(setq org-confirm-babel-evaluate 'tdh-org-confirm-babel-evaluate))
|
(setq org-confirm-babel-evaluate 'tdh-org-confirm-babel-evaluate))
|
||||||
@@ -2227,6 +2212,7 @@ Add all named source blocks to =org-babel-library-of-babel= ([[file:emacs-librar
|
|||||||
(org-babel-lob-ingest "~/.config/literate-dotfiles/emacs-library-babel.org"))
|
(org-babel-lob-ingest "~/.config/literate-dotfiles/emacs-library-babel.org"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Org-Babel Matlab
|
** Org-Babel Matlab
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! org
|
(after! org
|
||||||
@@ -2347,7 +2333,7 @@ yay -S mermaid-cli
|
|||||||
(use-package! ob-mermaid
|
(use-package! ob-mermaid
|
||||||
:after org
|
:after org
|
||||||
:config
|
:config
|
||||||
(setq ob-mermaid-cli-path "/home/thomas/.npm-global/bin/mmdc")
|
(setq ob-mermaid-cli-path "/usr/bin/mmdc")
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -2555,10 +2541,8 @@ This function:
|
|||||||
(if (string= lang "matlab")
|
(if (string= lang "matlab")
|
||||||
(if (region-active-p)
|
(if (region-active-p)
|
||||||
(tdh-matlab-execute-selected (region-beginning) (region-end))
|
(tdh-matlab-execute-selected (region-beginning) (region-end))
|
||||||
(progn (tdh-org-babel-execute-matlab-background)))
|
(progn (tdh-org-babel-execute-matlab-background)
|
||||||
(org-babel-next-src-block))
|
(org-babel-next-src-block)))
|
||||||
(if (string= lang "jupyter-python")
|
|
||||||
(org-babel-execute-maybe)
|
|
||||||
(org-babel-next-src-block))
|
(org-babel-next-src-block))
|
||||||
)
|
)
|
||||||
(org-babel-next-src-block)
|
(org-babel-next-src-block)
|
||||||
@@ -2618,21 +2602,12 @@ Org-Tangle and Org-Babel Jump to Tangle File
|
|||||||
(error "Cannot open tangle file %S" file)))))
|
(error "Cannot open tangle file %S" file)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(defun tdh-org-babel-tangle-block ()
|
|
||||||
(interactive)
|
|
||||||
(let ((current-prefix-arg '(4)))
|
|
||||||
(call-interactively 'org-babel-tangle)
|
|
||||||
))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
Map Functions
|
Map Functions
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! org
|
(after! org
|
||||||
(map! :map org-mode-map
|
(map! :map org-mode-map
|
||||||
(:prefix (",b" . "Tangle")
|
(:prefix (",b" . "Tangle")
|
||||||
:n "F" 'tdh-org-babel-jump-to-tangle-file
|
:n "F" 'tdh-org-babel-jump-to-tangle-file
|
||||||
:n "b" 'tdh-org-babel-tangle-block
|
|
||||||
:n "T" 'tdh-org-babel-tangle-subtree)))
|
:n "T" 'tdh-org-babel-tangle-subtree)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -2658,13 +2633,15 @@ Nice Functions:
|
|||||||
:init
|
:init
|
||||||
:config
|
:config
|
||||||
;; Folder where the notes files are located (or file if just one Note file)
|
;; Folder where the notes files are located (or file if just one Note file)
|
||||||
(setq bibtex-completion-notes-path "~/Cloud/brain/")
|
(setq org-ref-notes-directory "~/Cloud/brain")
|
||||||
|
(setq org-ref-bibliography-notes "~/Cloud/brain")
|
||||||
|
|
||||||
;; Bibliography File
|
;; Bibliography File
|
||||||
(setq bibtex-completion-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
(setq reftex-default-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
||||||
|
(setq org-ref-default-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
||||||
|
|
||||||
;; Folder where all the pdf are located
|
;; Folder where all the pdf are located
|
||||||
(setq bibtex-completion-library-path '("~/Cloud/pdfs/"))
|
(setq org-ref-pdf-directory "~/Cloud/pdfs")
|
||||||
|
|
||||||
(setq org-ref-bibliography-entry-format
|
(setq org-ref-bibliography-entry-format
|
||||||
'(("article" . "%a, %t, %j, v(%n), %p (%y).")
|
'(("article" . "%a, %t, %j, v(%n), %p (%y).")
|
||||||
@@ -2686,20 +2663,20 @@ Nice Functions:
|
|||||||
;; Display information on the citation
|
;; Display information on the citation
|
||||||
(setq org-ref-show-citation-on-enter t)
|
(setq org-ref-show-citation-on-enter t)
|
||||||
|
|
||||||
;; (add-to-list 'org-ref-helm-user-candidates
|
(add-to-list 'org-ref-helm-user-candidates
|
||||||
;; '("Open pdf in Zathura" . (lambda () (call-process "zathura" nil 0 nil (concat
|
'("Open pdf in Zathura" . (lambda () (call-process "zathura" nil 0 nil (concat
|
||||||
;; (file-name-as-directory org-ref-pdf-directory)
|
(file-name-as-directory org-ref-pdf-directory)
|
||||||
;; (car (org-ref-get-bibtex-key-and-file))
|
(car (org-ref-get-bibtex-key-and-file))
|
||||||
;; ".pdf"))))
|
".pdf"))))
|
||||||
;; t)
|
t)
|
||||||
|
|
||||||
;; (add-to-list 'org-ref-helm-user-candidates
|
(add-to-list 'org-ref-helm-user-candidates
|
||||||
;; '("Drag and Drop" . (lambda () (call-process "/bin/bash" nil 0 nil "-c" (concat
|
'("Drag and Drop" . (lambda () (call-process "/bin/bash" nil 0 nil "-c" (concat
|
||||||
;; "dragon "
|
"dragon-drag-and-drop "
|
||||||
;; (file-name-as-directory org-ref-pdf-directory)
|
(file-name-as-directory org-ref-pdf-directory)
|
||||||
;; (car (org-ref-get-bibtex-key-and-file))
|
(car (org-ref-get-bibtex-key-and-file))
|
||||||
;; ".pdf"))))
|
".pdf"))))
|
||||||
;; t)
|
t)
|
||||||
|
|
||||||
;; Let Mathjax deals with equation reference
|
;; Let Mathjax deals with equation reference
|
||||||
(defun org-ref-eqref-export (keyword desc format)
|
(defun org-ref-eqref-export (keyword desc format)
|
||||||
@@ -2710,11 +2687,6 @@ Nice Functions:
|
|||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(after! org
|
|
||||||
(require 'org-ref))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun tdh-org-ref-open-pdf-at-point ()
|
(defun tdh-org-ref-open-pdf-at-point ()
|
||||||
"Open the pdf in external program for bibtex key under point if it exists."
|
"Open the pdf in external program for bibtex key under point if it exists."
|
||||||
@@ -2854,10 +2826,12 @@ Re-Export all roam files.
|
|||||||
:init
|
:init
|
||||||
:config
|
:config
|
||||||
;; Bibliography file
|
;; Bibliography file
|
||||||
(setq bibtex-completion-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
(setq bibtex-completion-bibliography '("~/Cloud/brain/biblio/references.bib"
|
||||||
|
"~/Cloud/acoustic/resources/acoustics.bib"))
|
||||||
|
|
||||||
;; Directory with all the pdfs
|
;; Directory with all the pdfs
|
||||||
(setq bibtex-completion-library-path '("~/Cloud/pdfs/"))
|
(setq bibtex-completion-library-path '("~/Cloud/pdfs/"
|
||||||
|
"~/Cloud/acoustic/resources/pdfs/"))
|
||||||
|
|
||||||
;; Directory with notes files
|
;; Directory with notes files
|
||||||
(setq bibtex-completion-notes-path "~/Cloud/brain/")
|
(setq bibtex-completion-notes-path "~/Cloud/brain/")
|
||||||
@@ -2973,6 +2947,13 @@ List all element of the bibliography without pdf associated
|
|||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Deft ([[https://github.com/jrblevin/deft][link]])
|
||||||
|
#+begin_src emacs-lisp :tangle no
|
||||||
|
(use-package! deft
|
||||||
|
:custom
|
||||||
|
(deft-directory "~/Cloud/brain/"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Org-Roam-Bibtex ([[https://github.com/org-roam/org-roam-bibtex][link]])
|
** Org-Roam-Bibtex ([[https://github.com/org-roam/org-roam-bibtex][link]])
|
||||||
Provides nice functions such as:
|
Provides nice functions such as:
|
||||||
- =orb-find-non-ref-file=
|
- =orb-find-non-ref-file=
|
||||||
@@ -2996,6 +2977,15 @@ Provides nice functions such as:
|
|||||||
(call-process "zathura" nil 0 nil (org-ref-get-pdf-filename key)))
|
(call-process "zathura" nil 0 nil (org-ref-get-pdf-filename key)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Citeproc-org ([[https://github.com/andras-simonyi/citeproc-org][link]])
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package! citeproc-org
|
||||||
|
:after org
|
||||||
|
:config
|
||||||
|
(citeproc-org-setup)
|
||||||
|
(setq citeproc-org-html-backends '(html)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Bibtex-Mode
|
** Bibtex-Mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! bibtex
|
(after! bibtex
|
||||||
@@ -3003,18 +2993,6 @@ Provides nice functions such as:
|
|||||||
:n "C-c c" 'org-ref-clean-bibtex-entry))
|
:n "C-c c" 'org-ref-clean-bibtex-entry))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Citar
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
;; (use-package! citar
|
|
||||||
;; :custom
|
|
||||||
;; (org-cite-global-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
|
||||||
;; (setq citar-library-paths '("~/Cloud/pdfs/"))
|
|
||||||
;; (setq citar-open-note-function 'orb-citar-edit-note)
|
|
||||||
;; (org-cite-insert-processor 'citar)
|
|
||||||
;; (org-cite-follow-processor 'citar)
|
|
||||||
;; (org-cite-activate-processor 'citar))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* LaTeX
|
* LaTeX
|
||||||
- https://tex.stackexchange.com/questions/52179/what-is-your-favorite-emacs-and-or-auctex-command-trick
|
- https://tex.stackexchange.com/questions/52179/what-is-your-favorite-emacs-and-or-auctex-command-trick
|
||||||
- https://tex.stackexchange.com/questions/20843/useful-shortcuts-or-key-bindings-or-predefined-commands-for-emacsauctex
|
- https://tex.stackexchange.com/questions/20843/useful-shortcuts-or-key-bindings-or-predefined-commands-for-emacsauctex
|
||||||
@@ -3137,9 +3115,6 @@ Provides nice functions such as:
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Mu4e
|
* Mu4e
|
||||||
:PROPERTIES:
|
|
||||||
:header-args:emacs-lisp: :tangle no
|
|
||||||
:END:
|
|
||||||
** Resources
|
** Resources
|
||||||
Documentation:
|
Documentation:
|
||||||
- [ ] Mu4e documentation: http://www.djcbsoftware.nl/code/mu/mu4e/index.html#Top
|
- [ ] Mu4e documentation: http://www.djcbsoftware.nl/code/mu/mu4e/index.html#Top
|
||||||
@@ -3392,9 +3367,7 @@ Choose account label to feed msmtp -a option based on From header in Message buf
|
|||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
syntax ; tasing you for every semicolon you forget
|
syntax ; tasing you for every semicolon you forget
|
||||||
(spell
|
(spell +aspell) ; tasing you for misspelling mispelling
|
||||||
+aspell
|
|
||||||
+everywhere) ; tasing you for misspelling mispelling
|
|
||||||
|
|
||||||
:lang
|
:lang
|
||||||
data ; config/data formats
|
data ; config/data formats
|
||||||
@@ -3410,7 +3383,6 @@ Choose account label to feed msmtp -a option based on From header in Message buf
|
|||||||
+hugo ; use Emacs for hugo blogging
|
+hugo ; use Emacs for hugo blogging
|
||||||
+roam2 ;
|
+roam2 ;
|
||||||
+gnuplot
|
+gnuplot
|
||||||
+jupyter
|
|
||||||
+present) ; using org-mode for presentations
|
+present) ; using org-mode for presentations
|
||||||
python ; beautiful is better than ugly
|
python ; beautiful is better than ugly
|
||||||
(sh ; she sells {ba,z,fi}sh shells on the C xor
|
(sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||||
@@ -3468,7 +3440,6 @@ Choose account label to feed msmtp -a option based on From header in Message buf
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; Automatic toggling of LaTeX fragments
|
;; Automatic toggling of LaTeX fragments
|
||||||
(package! org-fragtog)
|
(package! org-fragtog)
|
||||||
(package! org-appear)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -3489,6 +3460,11 @@ Choose account label to feed msmtp -a option based on From header in Message buf
|
|||||||
:files ("*.el" "filters" "preprocessors")))
|
:files ("*.el" "filters" "preprocessors")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; Renders Org-mode citations in CSL styles
|
||||||
|
(package! citeproc-org)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; Connector between Org-roam, BibTeX-completion, and Org-ref
|
;; Connector between Org-roam, BibTeX-completion, and Org-ref
|
||||||
(package! org-roam-bibtex
|
(package! org-roam-bibtex
|
||||||
|
@@ -330,7 +330,7 @@ $0
|
|||||||
#+name: tab:${1:table_name}
|
#+name: tab:${1:table_name}
|
||||||
#+caption: ${2:Table caption}
|
#+caption: ${2:Table caption}
|
||||||
#+attr_latex: :environment tabularx :width ${3:\linewidth} :align ${4:lXX}
|
#+attr_latex: :environment tabularx :width ${3:\linewidth} :align ${4:lXX}
|
||||||
#+attr_latex: :center t :booktabs t
|
#+attr_latex: :center t :booktabs t :float t
|
||||||
| $0 | | |
|
| $0 | | |
|
||||||
|---+---+---|
|
|---+---+---|
|
||||||
| | | |
|
| | | |
|
||||||
@@ -418,25 +418,6 @@ $1
|
|||||||
$0
|
$0
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Python Specific
|
|
||||||
*** Pfigure
|
|
||||||
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/pfigure
|
|
||||||
#contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
|
|
||||||
#name :Python-Figure
|
|
||||||
# --
|
|
||||||
,#+begin_src jupyter-python :file ${2:filename}.png :results none
|
|
||||||
# Figure - ${1:description}
|
|
||||||
plt.figure(figsize=(${3:1200}/150, ${4:800}/150), dpi=150)
|
|
||||||
plt.clf
|
|
||||||
$0
|
|
||||||
plt.savefig('figs/$2.pdf', transparent=True, bbox_inches='tight', pad_inches=0)
|
|
||||||
,#+end_src
|
|
||||||
|
|
||||||
,#+name: fig:$2
|
|
||||||
,#+caption: $1
|
|
||||||
[[file:figs/$2.png]]
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Matlab Specific
|
** Matlab Specific
|
||||||
*** Mconfig
|
*** Mconfig
|
||||||
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/mconfig
|
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/mconfig
|
||||||
@@ -455,25 +436,49 @@ plt.savefig('figs/$2.pdf', transparent=True, bbox_inches='tight', pad_inches=0)
|
|||||||
$0
|
$0
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** Mdescription
|
||||||
|
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/mdescription
|
||||||
|
#contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
|
||||||
|
#name :Measurement-Description
|
||||||
|
# --
|
||||||
|
,* Measurement description
|
||||||
|
,** Setup :ignore:
|
||||||
|
*Setup*:
|
||||||
|
|
||||||
|
,** Goal :ignore:
|
||||||
|
*Goal*:
|
||||||
|
|
||||||
|
,** Measurements :ignore:
|
||||||
|
*Measurements*:
|
||||||
|
|
||||||
|
Three measurements are done:
|
||||||
|
| Measurement File | Description |
|
||||||
|
|-------------------------+------------------------------|
|
||||||
|
| =mat/data_${1:001}.mat= | $2 |
|
||||||
|
|
||||||
|
Each of the measurement =mat= file contains one =data= array with 3 columns:
|
||||||
|
| Column number | Description |
|
||||||
|
|---------------+-------------------|
|
||||||
|
| 1 | $3 |
|
||||||
|
| 2 | $4 |
|
||||||
|
| 3 | Time |
|
||||||
|
|
||||||
|
$0
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** Mfigure
|
*** Mfigure
|
||||||
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/mfigure
|
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/mfigure
|
||||||
#contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
|
#contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
|
||||||
#name :Matlab-Figure
|
#name :Matlab-Figure
|
||||||
# --
|
# --
|
||||||
,#+begin_src matlab :exports none :results none
|
|
||||||
%% ${1:description}
|
|
||||||
figure;
|
|
||||||
$0
|
|
||||||
,#+end_src
|
|
||||||
|
|
||||||
,#+begin_src matlab :tangle no :exports results :results file replace
|
,#+begin_src matlab :tangle no :exports results :results file replace
|
||||||
exportFig('figs/${2:filename}.pdf', 'width', '${3:full}', 'height', '${4:full}');
|
exportFig('figs/${1:filename}.pdf', 'width', '${2:full}', 'height', '${3:full}');
|
||||||
,#+end_src
|
,#+end_src
|
||||||
|
|
||||||
,#+name: fig:$2
|
,#+name: fig:$1
|
||||||
,#+caption: $1
|
,#+caption: $0
|
||||||
,#+RESULTS:
|
,#+RESULTS:
|
||||||
[[file:figs/$2.png]]
|
[[file:figs/$1.png]]
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Mfunction
|
*** Mfunction
|
||||||
@@ -589,44 +594,3 @@ $0
|
|||||||
$0
|
$0
|
||||||
,#+end_src
|
,#+end_src
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Python
|
|
||||||
** Function
|
|
||||||
#+begin_src conf :tangle ~/.config/doom/snippets/python/de
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# name: de
|
|
||||||
# contributor: Orestis Markou
|
|
||||||
# contributor: Yasser González Fernández <yglez@uh.cu>
|
|
||||||
# contributor: Tibor Simko <tibor.simko@cern.ch>
|
|
||||||
# --
|
|
||||||
def ${1:name}($2):
|
|
||||||
"""
|
|
||||||
$3
|
|
||||||
${2:$
|
|
||||||
(let* ((indent
|
|
||||||
(concat "\n" (make-string (current-column) 32)))
|
|
||||||
(args
|
|
||||||
(mapconcat
|
|
||||||
'(lambda (x)
|
|
||||||
(if (not (string= (nth 0 x) ""))
|
|
||||||
(concat "@param " (nth 0 x) ": " indent
|
|
||||||
"@type " (nth 0 x) ": ")))
|
|
||||||
(mapcar
|
|
||||||
'(lambda (x)
|
|
||||||
(mapcar
|
|
||||||
'(lambda (x)
|
|
||||||
(replace-regexp-in-string "[[:blank:]]*$" ""
|
|
||||||
(replace-regexp-in-string "^[[:blank:]]*" "" x)))
|
|
||||||
x))
|
|
||||||
(mapcar '(lambda (x) (split-string x "="))
|
|
||||||
(split-string text ",")))
|
|
||||||
indent)))
|
|
||||||
(if (string= args "")
|
|
||||||
(concat indent "@return: " indent "@rtype: " indent (make-string 3 34))
|
|
||||||
(mapconcat
|
|
||||||
'identity
|
|
||||||
(list "" args "@return: " "@rtype: " (make-string 3 34))
|
|
||||||
indent)))
|
|
||||||
}
|
|
||||||
$0
|
|
||||||
#+end_src
|
|
||||||
|
7
git.org
7
git.org
@@ -186,6 +186,13 @@
|
|||||||
markEmptyLines = false
|
markEmptyLines = false
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Github
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
[github]
|
||||||
|
user = tdehaeze
|
||||||
|
oauth-token = 8cc5b41120f7e9a869c24fa3678667d3d8422e6f
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
* =~/.gitignore_global= - Global Git Ignore
|
* =~/.gitignore_global= - Global Git Ignore
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:conf: :tangle ~/.gitignore_global
|
:header-args:conf: :tangle ~/.gitignore_global
|
||||||
|
2245
homelab.org
2245
homelab.org
File diff suppressed because it is too large
Load Diff
3
i3.org
3
i3.org
@@ -28,7 +28,7 @@ hide_edge_borders smart
|
|||||||
|
|
||||||
* Font for window titles
|
* Font for window titles
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
font pango:Hack Nerd Font Mono 11
|
font Hack Nerd Font 11
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Colors Variables
|
* Colors Variables
|
||||||
@@ -113,7 +113,6 @@ workspace_auto_back_and_forth yes
|
|||||||
assign[title="^Fig"] $ws6 # Matlab Figures
|
assign[title="^Fig"] $ws6 # Matlab Figures
|
||||||
for_window [title="^Fig"] layout tabbed
|
for_window [title="^Fig"] layout tabbed
|
||||||
assign[title="^HG_Peer"] $ws6 # Name of window when export figure with matlab
|
assign[title="^HG_Peer"] $ws6 # Name of window when export figure with matlab
|
||||||
assign[class="^RDP"] $ws7 # Remote
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Open specific applications in floating mode
|
** Open specific applications in floating mode
|
||||||
|
983
install.org
983
install.org
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,6 @@
|
|||||||
#+TITLE: LaTeX Configuration
|
#+TITLE: LaTeX Configuration
|
||||||
#+SETUPFILE: ./setup/org-setup-file.org
|
#+SETUPFILE: ./setup/org-setup-file.org
|
||||||
|
|
||||||
* LatexMK
|
|
||||||
#+begin_src conf :tangle ~/.latexmkrc
|
|
||||||
$pdf_previewer = "zathura %O %S";
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Awesome LaTeX
|
* Awesome LaTeX
|
||||||
- https://github.com/cmichi/latex-template-collection
|
- https://github.com/cmichi/latex-template-collection
|
||||||
- https://github.com/latex3/latex3
|
- https://github.com/latex3/latex3
|
||||||
|
227
mail.org
227
mail.org
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Installation:
|
Installation:
|
||||||
#+begin_src bash :tangle no
|
#+begin_src bash :tangle no
|
||||||
sudo apt install mbsync msmtp maildir-utils neomutt lynx
|
yay -S mbsync msmtp mu neomutt lynx
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* =mbsync= - Synchronize Mailboxes
|
* =mbsync= - Synchronize Mailboxes
|
||||||
@@ -136,7 +136,7 @@ Far :esrf-remote:
|
|||||||
Near :esrf-local:
|
Near :esrf-local:
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
For doing a quick sync of just the INBOX with =mbsync esrf-download=.
|
For doing a quick sync of just the INBOX with `mbsync esrf-download`.
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
Channel esrf-download
|
Channel esrf-download
|
||||||
Far :esrf-remote:INBOX
|
Far :esrf-remote:INBOX
|
||||||
@@ -146,6 +146,116 @@ Expunge Near
|
|||||||
Sync Pull
|
Sync Pull
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** ULG Student Account
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
IMAPAccount ulg
|
||||||
|
Host mail.ulg.ac.be
|
||||||
|
User thomas.dehaeze@doct.uliege.be
|
||||||
|
PassCmd "pass email/thomas.dehaeze@doct.uliege.be"
|
||||||
|
SSLType IMAPS
|
||||||
|
AuthMechs LOGIN
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
IMAPStore ulg-remote
|
||||||
|
Account ulg
|
||||||
|
|
||||||
|
MaildirStore ulg-local
|
||||||
|
Path ~/.mail/ulg/
|
||||||
|
Inbox ~/.mail/ulg/Inbox
|
||||||
|
|
||||||
|
Channel ulg-Home
|
||||||
|
Far :ulg-remote:INBOX
|
||||||
|
Near :ulg-local:Inbox
|
||||||
|
|
||||||
|
Channel ulg-Drafts
|
||||||
|
Far :ulg-remote:Drafts
|
||||||
|
Near :ulg-local:Drafts
|
||||||
|
|
||||||
|
Channel ulg-Archive
|
||||||
|
Far :ulg-remote:Archive
|
||||||
|
Near :ulg-local:Archive
|
||||||
|
|
||||||
|
Channel ulg-Sent
|
||||||
|
Far :ulg-remote:Sent
|
||||||
|
Near :ulg-local:Sent
|
||||||
|
|
||||||
|
Channel ulg-Trash
|
||||||
|
Far :ulg-remote:Trash
|
||||||
|
Near :ulg-local:Trash
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
Channel ulg
|
||||||
|
Far :ulg-remote:
|
||||||
|
Near :ulg-local:
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
For doing a quick sync of just the INBOX with `mbsync ulg-download`.
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
Channel ulg-download
|
||||||
|
Far :ulg-remote:INBOX
|
||||||
|
Near :ulg-local:Inbox
|
||||||
|
Create Near
|
||||||
|
Expunge Near
|
||||||
|
Sync Pull
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** ULG Personal Account
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
IMAPAccount uliege
|
||||||
|
Host mail.ulg.ac.be
|
||||||
|
User tdehaeze@uliege.be
|
||||||
|
PassCmd "pass email/tdehaeze@uliege.be"
|
||||||
|
SSLType IMAPS
|
||||||
|
AuthMechs LOGIN
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
IMAPStore uliege-remote
|
||||||
|
Account uliege
|
||||||
|
|
||||||
|
MaildirStore uliege-local
|
||||||
|
Path ~/.mail/uliege/
|
||||||
|
Inbox ~/.mail/uliege/Inbox
|
||||||
|
|
||||||
|
Channel uliege-Home
|
||||||
|
Far :uliege-remote:INBOX
|
||||||
|
Near :uliege-local:Inbox
|
||||||
|
|
||||||
|
Channel uliege-Drafts
|
||||||
|
Far :uliege-remote:Drafts
|
||||||
|
Near :uliege-local:Drafts
|
||||||
|
|
||||||
|
Channel uliege-Archive
|
||||||
|
Far :uliege-remote:Archive
|
||||||
|
Near :uliege-local:Archive
|
||||||
|
|
||||||
|
Channel uliege-Sent
|
||||||
|
Far :uliege-remote:Sent
|
||||||
|
Near :uliege-local:Sent
|
||||||
|
|
||||||
|
Channel uliege-Trash
|
||||||
|
Far :uliege-remote:Trash
|
||||||
|
Near :uliege-local:Trash
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
Channel uliege
|
||||||
|
Far :uliege-remote:
|
||||||
|
Near :uliege-local:
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
For doing a quick sync of just the INBOX with `mbsync uliege-download`.
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
Channel uliege-download
|
||||||
|
Far :uliege-remote:INBOX
|
||||||
|
Near :uliege-local:Inbox
|
||||||
|
Create Near
|
||||||
|
Expunge Near
|
||||||
|
Sync Pull
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
* =msmtp= - Send Mails
|
* =msmtp= - Send Mails
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:conf: :tangle ~/.config/msmtp/config
|
:header-args:conf: :tangle ~/.config/msmtp/config
|
||||||
@@ -171,8 +281,6 @@ protocol smtp
|
|||||||
from dehaeze.thomas@gmail.com
|
from dehaeze.thomas@gmail.com
|
||||||
user dehaeze.thomas@gmail.com
|
user dehaeze.thomas@gmail.com
|
||||||
passwordeval "pass email/dehaeze.thomas@gmail.com"
|
passwordeval "pass email/dehaeze.thomas@gmail.com"
|
||||||
proxy_host localhost
|
|
||||||
proxy_port 8080
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** ESRF Account
|
** ESRF Account
|
||||||
@@ -187,9 +295,33 @@ tls_starttls off
|
|||||||
passwordeval "pass email/thomas.dehaeze@esrf.fr"
|
passwordeval "pass email/thomas.dehaeze@esrf.fr"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** ULG Account
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
account ulg
|
||||||
|
host smtp.ulg.ac.be
|
||||||
|
port 587
|
||||||
|
protocol smtp
|
||||||
|
from thomas.dehaeze@doct.uliege.be
|
||||||
|
user s177313
|
||||||
|
tls_starttls on
|
||||||
|
passwordeval "pass email/thomas.dehaeze@doct.uliege.be"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** ULIEGE Account
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
account uliege
|
||||||
|
host smtp.ulg.ac.be
|
||||||
|
port 587
|
||||||
|
protocol smtp
|
||||||
|
from tdehaeze@uliege.be
|
||||||
|
user u231244
|
||||||
|
tls_starttls on
|
||||||
|
passwordeval "pass email/tdehaeze@uliege.be"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Default Account
|
** Default Account
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
account default : esrf
|
account default : gmail
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* =mu= - Mail Indexer
|
* =mu= - Mail Indexer
|
||||||
@@ -617,6 +749,7 @@ macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
|
|||||||
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
|
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
*** Limit
|
*** Limit
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
bind index L limit
|
bind index L limit
|
||||||
@@ -678,7 +811,7 @@ tmpfile=/tmp/rangerpick
|
|||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
ranger --choosefiles $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
|
ranger --choosefiles $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
|
||||||
elif [ $1 == "dragon" ]; then
|
elif [ $1 == "dragon" ]; then
|
||||||
dragon --target --print-path --keep > $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
|
dragon-drag-and-drop --target --print-path --keep > $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
|
||||||
elif [ $1 == "clean" ]; then
|
elif [ $1 == "clean" ]; then
|
||||||
ls $tmpfile
|
ls $tmpfile
|
||||||
fi
|
fi
|
||||||
@@ -865,13 +998,17 @@ https://unix.stackexchange.com/questions/20456/pretty-print-mails-from-mutt
|
|||||||
|
|
||||||
** Accounts
|
** Accounts
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
set spoolfile = "+esrf/Inbox" # Default inbox
|
set spoolfile = "+gmail/Inbox" # Default inbox
|
||||||
set realname = "Dehaeze Thomas"
|
set realname = "Dehaeze Thomas"
|
||||||
set from = "thomas.dehaeze@esrf.fr"
|
set from = "dehaeze.thomas@gmail.com"
|
||||||
|
|
||||||
folder-hook gmail/* source ~/.config/neomutt/accounts/gmail
|
folder-hook gmail/* source ~/.config/neomutt/accounts/gmail
|
||||||
folder-hook esrf/* source ~/.config/neomutt/accounts/esrf
|
folder-hook esrf/* source ~/.config/neomutt/accounts/esrf
|
||||||
|
folder-hook ulg/* source ~/.config/neomutt/accounts/ulg
|
||||||
|
folder-hook uliege/* source ~/.config/neomutt/accounts/uliege
|
||||||
|
|
||||||
|
macro index,pager gl "<change-folder>+uliege/Inbox<enter>" "go to inbox"
|
||||||
|
macro index,pager gu "<change-folder>+ulg/Inbox<enter>" "go to inbox"
|
||||||
macro index,pager ge "<change-folder>+esrf/Inbox<enter>" "go to inbox"
|
macro index,pager ge "<change-folder>+esrf/Inbox<enter>" "go to inbox"
|
||||||
macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
|
macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@@ -937,6 +1074,66 @@ This empty code block is used to add a new line after signature
|
|||||||
#+begin_src conf :tangle ~/.config/neomutt/accounts/esrf.signature :comments none :padline no
|
#+begin_src conf :tangle ~/.config/neomutt/accounts/esrf.signature :comments none :padline no
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** ULG
|
||||||
|
**** Configuration
|
||||||
|
#+begin_src conf :tangle ~/.config/neomutt/accounts/ulg :comments none
|
||||||
|
set from = "thomas.dehaeze@doct.uliege.be"
|
||||||
|
set sendmail = "~/.config/neomutt/bin/send_mail.sh ulg"
|
||||||
|
|
||||||
|
# Other special folders.
|
||||||
|
set mbox = "+ulg/Archive"
|
||||||
|
set record = "+ulg/Sent"
|
||||||
|
set postponed = "+ulg/Drafts"
|
||||||
|
|
||||||
|
set signature = "~/.config/neomutt/accounts/ulg.signature"
|
||||||
|
|
||||||
|
macro index,pager d \
|
||||||
|
"<save-message>+ulg/Archive<enter>" \
|
||||||
|
"Move message to the Archive"
|
||||||
|
|
||||||
|
macro index,pager D \
|
||||||
|
"<save-message>+ulg/Trash<enter>" \
|
||||||
|
"Move message to the Trash"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
**** Signature
|
||||||
|
#+begin_src conf :tangle ~/.config/neomutt/accounts/ulg.signature :comments none :padline no
|
||||||
|
Thomas Dehaeze
|
||||||
|
#+end_src
|
||||||
|
This empty code block is used to add a new line after signature
|
||||||
|
#+begin_src conf :tangle ~/.config/neomutt/accounts/ulg.signature :comments none :padline no
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** ULIEGE
|
||||||
|
**** Configuration
|
||||||
|
#+begin_src conf :tangle ~/.config/neomutt/accounts/uliege :comments none
|
||||||
|
set from = "tdehaeze@uliege.be"
|
||||||
|
set sendmail = "~/.config/neomutt/bin/send_mail.sh uliege"
|
||||||
|
|
||||||
|
# Other special folders.
|
||||||
|
set mbox = "+uliege/Archive"
|
||||||
|
set record = "+uliege/Sent"
|
||||||
|
set postponed = "+uliege/Drafts"
|
||||||
|
|
||||||
|
set signature = "~/.config/neomutt/accounts/uliege.signature"
|
||||||
|
|
||||||
|
macro index,pager d \
|
||||||
|
"<save-message>+uliege/Archive<enter>" \
|
||||||
|
"Move message to the Archive"
|
||||||
|
|
||||||
|
macro index,pager D \
|
||||||
|
"<save-message>+uliege/Trash<enter>" \
|
||||||
|
"Move message to the Trash"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
**** Signature
|
||||||
|
#+begin_src conf :tangle ~/.config/neomutt/accounts/uliege.signature :comments none :padline no
|
||||||
|
Thomas Dehaeze
|
||||||
|
#+end_src
|
||||||
|
This empty code block is used to add a new line after signature
|
||||||
|
#+begin_src conf :tangle ~/.config/neomutt/accounts/uliege.signature :comments none :padline no
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Basic Options
|
** Basic Options
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
set wait_key = no # shut up, mutt
|
set wait_key = no # shut up, mutt
|
||||||
@@ -1099,6 +1296,18 @@ named-mailboxes " Sent" =esrf/Sent
|
|||||||
named-mailboxes " Drafts" =esrf/Drafts
|
named-mailboxes " Drafts" =esrf/Drafts
|
||||||
named-mailboxes " ﮊ Archive" =esrf/Archive
|
named-mailboxes " ﮊ Archive" =esrf/Archive
|
||||||
named-mailboxes " Trash" =esrf/Trash
|
named-mailboxes " Trash" =esrf/Trash
|
||||||
|
named-mailboxes " ULG" =empty/ulg
|
||||||
|
named-mailboxes " Inbox" =ulg/Inbox
|
||||||
|
named-mailboxes " Sent" =ulg/Sent
|
||||||
|
named-mailboxes " Drafts" =ulg/Drafts
|
||||||
|
named-mailboxes " ﮊ Archive" =ulg/Archive
|
||||||
|
named-mailboxes " Trash" =ulg/Trash
|
||||||
|
named-mailboxes " ULIEGE" =empty/uliege
|
||||||
|
named-mailboxes " Inbox" =uliege/Inbox
|
||||||
|
named-mailboxes " Sent" =uliege/Sent
|
||||||
|
named-mailboxes " Drafts" =uliege/Drafts
|
||||||
|
named-mailboxes " ﮊ Archive" =uliege/Archive
|
||||||
|
named-mailboxes " Trash" =uliege/Trash
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
@@ -1205,7 +1414,7 @@ video/*; setsid mpv --quiet %s &
|
|||||||
image/*; sxiv -a -b %s &
|
image/*; sxiv -a -b %s &
|
||||||
application/pdf; zathura %s &
|
application/pdf; zathura %s &
|
||||||
audio/*; /usr/bin/xdg-open %s; copiousoutput
|
audio/*; /usr/bin/xdg-open %s; copiousoutput
|
||||||
text/html; export DISPLAY=:0 && setsid qutebrowser %s > /dev/null 2>&1 &; nametemplate=%s.html
|
text/html; export DISPLAY=:0 && setsid qutebrowser %s; nametemplate=%s.html
|
||||||
text/html; lynx -width ${COLUMNS:-80} -dump %s; nametemplate=%s.html; copiousoutput;
|
text/html; lynx -width ${COLUMNS:-80} -dump %s; nametemplate=%s.html; copiousoutput;
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@@ -16,7 +16,6 @@ set(groot, 'DefaultTextInterpreter', 'LaTeX');
|
|||||||
set(groot, 'DefaultAxesTickLabelInterpreter', 'LaTeX');
|
set(groot, 'DefaultAxesTickLabelInterpreter', 'LaTeX');
|
||||||
set(groot, 'DefaultAxesFontName', 'LaTeX');
|
set(groot, 'DefaultAxesFontName', 'LaTeX');
|
||||||
set(groot, 'DefaultLegendInterpreter', 'LaTeX');
|
set(groot, 'DefaultLegendInterpreter', 'LaTeX');
|
||||||
set(groot, 'DefaultConstantLineInterpreter', 'LaTeX');
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Default Line Width
|
** Default Line Width
|
||||||
@@ -39,14 +38,12 @@ set(groot, 'DefaultTextFontSize', 10);
|
|||||||
set(groot, 'DefaultAxesFontUnits', 'points');
|
set(groot, 'DefaultAxesFontUnits', 'points');
|
||||||
set(groot, 'DefaultAxesFontSize', 10);
|
set(groot, 'DefaultAxesFontSize', 10);
|
||||||
set(groot, 'DefaultUicontrolFontSize', 10);
|
set(groot, 'DefaultUicontrolFontSize', 10);
|
||||||
set(groot, 'DefaultConstantLineFontSize', 10);
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Default Fonts
|
** Default Fonts
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
set(groot, 'DefaultAxesFontName', 'Helvetica');
|
set(groot, 'DefaultAxesFontName', 'Helvetica');
|
||||||
set(groot, 'DefaultTextFontName', 'Helvetica');
|
set(groot, 'DefaultTextFontName', 'Helvetica');
|
||||||
set(groot, 'DefaultConstantLineFontName', 'Helvetica');
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Make figures into a Box
|
** Make figures into a Box
|
||||||
|
@@ -92,7 +92,7 @@ mpd_music_dir = ~/Music
|
|||||||
|
|
||||||
Notification of song change.
|
Notification of song change.
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
execute_on_song_change = notify-send --hint=string:x-dunst-stack-tag:Z7uCd3ZP "Now Playing ♫" "$(mpc current)"
|
execute_on_song_change = dunstify --replace=19845 "Now Playing ♫" "$(mpc current)"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Better user interface
|
Better user interface
|
||||||
|
@@ -68,7 +68,7 @@ notify-always no
|
|||||||
:END:
|
:END:
|
||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
notify-send "Newsboat " "$1"
|
dunstify --replace=38492 "Newsboat " "$1"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Bindings
|
** Bindings
|
||||||
@@ -122,7 +122,7 @@ bookmark-interactive no
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
buku --add "$1" --title "$2" --comment "$3" && \
|
buku --add "$1" --title "$2" --comment "$3" && \
|
||||||
notify-send "Buku" "Bookmark Added" && \
|
dunstify "Buku" "Bookmark Added" && \
|
||||||
exit 0
|
exit 0
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@@ -214,7 +214,7 @@ startup_notification = false
|
|||||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||||
# "mod3" and "mod4" (windows-key).
|
# "mod3" and "mod4" (windows-key).
|
||||||
close = mod1+space
|
close = mod1+space
|
||||||
history = mod1+BackSpace
|
history = mod1+Escape
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Urgency
|
* Urgency
|
||||||
|
232
polybar.org
232
polybar.org
@@ -2,7 +2,7 @@
|
|||||||
#+SETUPFILE: ./setup/org-setup-file.org
|
#+SETUPFILE: ./setup/org-setup-file.org
|
||||||
#+PROPERTY: header-args :comments no
|
#+PROPERTY: header-args :comments no
|
||||||
#+PROPERTY: header-args+ :mkdirp yes
|
#+PROPERTY: header-args+ :mkdirp yes
|
||||||
#+PROPERTY: header-args+ :tangle ~/.config/polybar/config.ini
|
#+PROPERTY: header-args+ :tangle ~/.config/polybar/config
|
||||||
|
|
||||||
* Colors
|
* Colors
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
@@ -57,12 +57,13 @@ padding-right = 12
|
|||||||
module-margin-left = 1
|
module-margin-left = 1
|
||||||
module-margin-right = 1
|
module-margin-right = 1
|
||||||
|
|
||||||
font-0 = Hack Nerd Font:style=Regular:pixelsize=10;1
|
font-0 = Hack Nerd Font:style=Medium,Regular:pixelsize=10;1
|
||||||
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||||
|
font-2 = Weather Icons:size=10;1
|
||||||
|
|
||||||
modules-left = i3 xwindow
|
modules-left = i3 xwindow
|
||||||
modules-center =
|
modules-center =
|
||||||
modules-right = pulseaudio drive_tmp drive_homelab drive_groupshare drive_data_id21 drive_unix_home dunst cursor unread_mail calendar battery date
|
modules-right = pulseaudio wired-network wireless-network wireguard nordvpn bluetooth redshift cursor lockscreen dunst packages unread_news unread_mail calendar temperature battery date
|
||||||
|
|
||||||
# wm-restack = i3
|
# wm-restack = i3
|
||||||
|
|
||||||
@@ -326,11 +327,11 @@ fi
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "Syncing...";
|
dunstify --replace=98465 "Mails " "Syncing...";
|
||||||
checkmail -q && \
|
checkmail -q && \
|
||||||
mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
|
mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
|
||||||
if [ "$mail_nb" -eq "0" ]; then
|
if [ "$mail_nb" -eq "0" ]; then
|
||||||
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "No new mail";
|
dunstify --replace=98465 "Mails " "No new mail";
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -380,7 +381,7 @@ fi
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "Reloading...";
|
dunstify --replace=38492 "Newsboat " "Reloading...";
|
||||||
|
|
||||||
if pgrep -x "newsboat" >/dev/null; then
|
if pgrep -x "newsboat" >/dev/null; then
|
||||||
# If newsboat is already running, try to refresh in the tmux session
|
# If newsboat is already running, try to refresh in the tmux session
|
||||||
@@ -388,7 +389,7 @@ if pgrep -x "newsboat" >/dev/null; then
|
|||||||
else
|
else
|
||||||
newsboat -x reload && /
|
newsboat -x reload && /
|
||||||
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
|
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "$news_nb Unread News";
|
dunstify --replace=38492 "Newsboat " "$news_nb Unread News";
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -492,10 +493,10 @@ fi
|
|||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if pgrep -x "redshift" >/dev/null; then
|
if pgrep -x "redshift" >/dev/null; then
|
||||||
killall redshift && \
|
killall redshift && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift 望" "Turned off";
|
dunstify --replace=36492 "Redshift 望" "Turned off";
|
||||||
else
|
else
|
||||||
nohup redshift > /dev/null 2>&1 &
|
nohup redshift > /dev/null 2>&1 &
|
||||||
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift 望" "Starting...";
|
dunstify --replace=36492 "Redshift 望" "Starting...";
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -538,16 +539,16 @@ fi
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "Refreshing..."
|
dunstify --replace=64654 'Packages ' "Refreshing..."
|
||||||
|
|
||||||
paru -Sy > /dev/null 2>&1 && \
|
paru -Sy > /dev/null 2>&1 && \
|
||||||
package_nb=$(paru -Qu 2> /dev/null | wc -l) || \
|
package_nb=$(paru -Qu 2> /dev/null | wc -l) || \
|
||||||
package_nb=0
|
package_nb=0
|
||||||
|
|
||||||
if [ "$package_nb" -eq "0" ]; then
|
if [ "$package_nb" -eq "0" ]; then
|
||||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "No upgrade available"
|
dunstify --replace=64654 'Packages ' "No upgrade available"
|
||||||
else
|
else
|
||||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "$package_nb upgrade(s) available"
|
dunstify --replace=64654 'Packages ' "$package_nb upgrade(s) available"
|
||||||
fi
|
fi
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@@ -605,9 +606,9 @@ tmpfile="/tmp/dunststatus";
|
|||||||
if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
|
if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
|
||||||
killall -SIGUSR2 dunst && \
|
killall -SIGUSR2 dunst && \
|
||||||
echo "on" > $tmpfile;
|
echo "on" > $tmpfile;
|
||||||
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Activated";
|
dunstify --replace=16549 "Notifications " "Activated";
|
||||||
else
|
else
|
||||||
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Deactivated";
|
dunstify --replace=16549 "Notifications " "Deactivated";
|
||||||
sleep 1 && \
|
sleep 1 && \
|
||||||
killall -SIGUSR1 dunst && \
|
killall -SIGUSR1 dunst && \
|
||||||
echo "off" > $tmpfile;
|
echo "off" > $tmpfile;
|
||||||
@@ -653,10 +654,10 @@ fi
|
|||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if pgrep -x "xautolock" >/dev/null ; then
|
if pgrep -x "xautolock" >/dev/null ; then
|
||||||
pkill xautolock && \
|
pkill xautolock && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Desactivated'
|
dunstify --replace=13602 'Lock Screen ' 'Desactivated'
|
||||||
else
|
else
|
||||||
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u --hint=string:x-dunst-stack-tag:tH6bxvvv critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||||
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Activated'
|
dunstify --replace=13602 'Lock Screen ' 'Activated'
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -717,13 +718,13 @@ isdevicedown=$(nmcli device status | grep ^$1 | grep disconnected)
|
|||||||
|
|
||||||
if [ -z "$isdevicedown" ]
|
if [ -z "$isdevicedown" ]
|
||||||
then
|
then
|
||||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnecting..." && \
|
dunstify --replace=84847 "$1" "Disconnecting..." && \
|
||||||
nmcli device disconnect $1 && \
|
nmcli device disconnect $1 && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnected"
|
dunstify --replace=84847 "$1" "Disconnected"
|
||||||
else
|
else
|
||||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connection..." && \
|
dunstify --replace=84847 "$1" "Connection..." && \
|
||||||
nmcli device connect $1 && \
|
nmcli device connect $1 && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connected"
|
dunstify --replace=84847 "$1" "Connected"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -787,10 +788,10 @@ isconnected=$(bluetoothctl show $controllerid | grep Powered | grep yes)
|
|||||||
if [ -z "$isconnected" ]
|
if [ -z "$isconnected" ]
|
||||||
then
|
then
|
||||||
bluetoothctl power on && \
|
bluetoothctl power on && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power ON"
|
dunstify --replace=88498 "Bluetooth" "Power ON"
|
||||||
else
|
else
|
||||||
bluetoothctl power off && \
|
bluetoothctl power off && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power OFF"
|
dunstify --replace=88498 "Bluetooth" "Power OFF"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -827,9 +828,110 @@ fi
|
|||||||
|
|
||||||
The script is accessible [[file:binaries.org::#nordvpn-toggle][here]].
|
The script is accessible [[file:binaries.org::#nordvpn-toggle][here]].
|
||||||
|
|
||||||
* High cursor
|
* Wireguard
|
||||||
This is using this program: module/
|
#+BEGIN_SRC conf
|
||||||
|
[module/wireguard]
|
||||||
|
type = custom/script
|
||||||
|
|
||||||
|
format-underline = ${colors.bg}
|
||||||
|
click-left = ~/.config/polybar/scripts/wireguard-toggle.sh >/dev/null 2>%1 &
|
||||||
|
format = <label>
|
||||||
|
exec = ~/.config/polybar/scripts/wireguard-status.sh
|
||||||
|
|
||||||
|
interval = 2
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Wireguard Connection Status
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.config/polybar/scripts/wireguard-status.sh
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
config="homelab"
|
||||||
|
|
||||||
|
connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
|
||||||
|
|
||||||
|
if [ "$connection" = "$config" ]; then
|
||||||
|
echo "%{F#859900}%{F-}"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Toggle Wireguard Connection
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.config/polybar/scripts/wireguard-toggle.sh
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
config="homelab"
|
||||||
|
|
||||||
|
connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
|
||||||
|
|
||||||
|
if [ "$connection" = "$config" ]; then
|
||||||
|
sudo wg-quick down "$config" && \
|
||||||
|
dunstify --replace=83244 "Wireguard" "Disconnected from $config"
|
||||||
|
else
|
||||||
|
sudo wg-quick up "$config" && \
|
||||||
|
dunstify --replace=83244 "Wireguard" "Connected to $config"
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* Microphone loopback
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
[module/loopback]
|
||||||
|
type = custom/script
|
||||||
|
|
||||||
|
format-underline = ${colors.bg}
|
||||||
|
click-left = ~/.config/polybar/scripts/loopback-toggle.sh >/dev/null 2>%1 &
|
||||||
|
format = <label>
|
||||||
|
exec = ~/.config/polybar/scripts/loopback-status.sh
|
||||||
|
|
||||||
|
interval = 2
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Loopback Status
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.config/polybar/scripts/loopback-status.sh
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
loopback=$(pactl list 2>/dev/null | grep module-loopback | wc -l)
|
||||||
|
|
||||||
|
if [ "$loopback" -eq "0" ]; then
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo "%{F#859900}%{F-}"
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Toggle Loopback
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.config/polybar/scripts/loopback-toggle.sh
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
loopback=$(pactl list 2>/dev/null | grep module-loopback | wc -l)
|
||||||
|
|
||||||
|
if [ "$loopback" -eq "0" ]; then
|
||||||
|
pactl load-module module-loopback latency_msec=1 && \
|
||||||
|
dunstify --replace=82244 "Loopback" "Enabled"
|
||||||
|
else
|
||||||
|
pactl unload-module module-loopback && \
|
||||||
|
dunstify --replace=82244 "Loopback" "Disabled"
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
* High cursor
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
[module/cursor]
|
[module/cursor]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
@@ -865,86 +967,10 @@ fi
|
|||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if pgrep -x "highlight-point" >/dev/null; then
|
if pgrep -x "highlight-point" >/dev/null; then
|
||||||
killall highlight-point && \
|
killall highlight-point && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Turned off";
|
dunstify --replace=46492 "Cursor" "Turned off";
|
||||||
else
|
else
|
||||||
nohup highlight-pointer -r 10 > /dev/null 2>&1 &
|
nohup highlight-pointer -r 10 > /dev/null 2>&1 &
|
||||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Highlight...";
|
dunstify --replace=46492 "Cursor" "Highlight...";
|
||||||
fi
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Mounted Drives
|
|
||||||
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
[module/drive_tmp]
|
|
||||||
type = custom/script
|
|
||||||
|
|
||||||
format-underline = ${colors.bg}
|
|
||||||
click-left = ~/.local/bin/mount-dir tmp_14_days >/dev/null 2>%1 &
|
|
||||||
format = <label>
|
|
||||||
exec = ~/.config/polybar/scripts/drive-status.sh tmp_14_days T
|
|
||||||
|
|
||||||
interval = 5
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
[module/drive_groupshare]
|
|
||||||
type = custom/script
|
|
||||||
|
|
||||||
format-underline = ${colors.bg}
|
|
||||||
click-left = ~/.local/bin/mount-dir groupshare >/dev/null 2>%1 &
|
|
||||||
format = <label>
|
|
||||||
exec = ~/.config/polybar/scripts/drive-status.sh groupshare G
|
|
||||||
|
|
||||||
interval = 5
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
[module/drive_homelab]
|
|
||||||
type = custom/script
|
|
||||||
|
|
||||||
format-underline = ${colors.bg}
|
|
||||||
click-left = ~/.local/bin/mount-dir homelab >/dev/null 2>%1 &
|
|
||||||
format = <label>
|
|
||||||
exec = ~/.config/polybar/scripts/drive-status.sh homelab H
|
|
||||||
|
|
||||||
interval = 5
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
[module/drive_unix_home]
|
|
||||||
type = custom/script
|
|
||||||
|
|
||||||
format-underline = ${colors.bg}
|
|
||||||
click-left = ~/.local/bin/mount-dir unix_home >/dev/null 2>%1 &
|
|
||||||
format = <label>
|
|
||||||
exec = ~/.config/polybar/scripts/drive-status.sh unix_home U
|
|
||||||
|
|
||||||
interval = 5
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
[module/drive_data_id21]
|
|
||||||
type = custom/script
|
|
||||||
|
|
||||||
format-underline = ${colors.bg}
|
|
||||||
click-left = ~/.local/bin/mount-dir data_id21 >/dev/null 2>%1 &
|
|
||||||
format = <label>
|
|
||||||
exec = ~/.config/polybar/scripts/drive-status.sh data_id21 D
|
|
||||||
|
|
||||||
interval = 5
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Drive - Status
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :tangle ~/.config/polybar/scripts/drive-status.sh
|
|
||||||
:header-args+: :comments both :mkdirp yes
|
|
||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
|
||||||
:END:
|
|
||||||
#+begin_src bash
|
|
||||||
if mountpoint -q ~/mnt/$1; then
|
|
||||||
echo "%{F#859900}$2 歷%{F-}";
|
|
||||||
else
|
|
||||||
echo "$2 轢";
|
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@@ -130,7 +130,7 @@ c.tabs.background = True
|
|||||||
c.tabs.close_mouse_button = 'right'
|
c.tabs.close_mouse_button = 'right'
|
||||||
|
|
||||||
# How to behave when the last tab is closed.
|
# How to behave when the last tab is closed.
|
||||||
c.tabs.last_close = 'ignore'
|
c.tabs.last_close = 'close'
|
||||||
|
|
||||||
# Switch between tabs using the mouse wheel.
|
# Switch between tabs using the mouse wheel.
|
||||||
c.tabs.mousewheel_switching = False
|
c.tabs.mousewheel_switching = False
|
||||||
@@ -172,8 +172,8 @@ c.url.searchengines = {
|
|||||||
'go': 'https://www.google.com/search?q={}',
|
'go': 'https://www.google.com/search?q={}',
|
||||||
'gc': 'https://scholar.google.fr/scholar?hl=fr&as_sdt=0%2C5&q={}&btnG=',
|
'gc': 'https://scholar.google.fr/scholar?hl=fr&as_sdt=0%2C5&q={}&btnG=',
|
||||||
'gm': 'https://www.google.com/maps/search/{}/',
|
'gm': 'https://www.google.com/maps/search/{}/',
|
||||||
'gh': 'https://github.com/search?q={}',
|
|
||||||
'yt': 'https://www.youtube.com/results?search_query={}',
|
'yt': 'https://www.youtube.com/results?search_query={}',
|
||||||
|
'gh': 'https://github.com/search?q={}',
|
||||||
're': 'https://www.reddit.com/search?q={}',
|
're': 'https://www.reddit.com/search?q={}',
|
||||||
'lb': 'http://gen.lib.rus.ec/search.php?req={}',
|
'lb': 'http://gen.lib.rus.ec/search.php?req={}',
|
||||||
'la': 'http://gen.lib.rus.ec/scimag/index.php?s={}',
|
'la': 'http://gen.lib.rus.ec/scimag/index.php?s={}',
|
||||||
@@ -262,19 +262,12 @@ config.bind('gf', 'open -t https://rss.tdehaeze.xyz/')
|
|||||||
config.bind('gr', 'open -t https://www.reddit.com/')
|
config.bind('gr', 'open -t https://www.reddit.com/')
|
||||||
|
|
||||||
config.bind('gh', 'open -t https://homer.tdehaeze.xyz/')
|
config.bind('gh', 'open -t https://homer.tdehaeze.xyz/')
|
||||||
config.bind('ge', 'open -t http://intranet.esrf.fr/')
|
|
||||||
config.bind('gc', 'open -t https://calendar.esrf.fr/')
|
|
||||||
|
|
||||||
config.bind('gb', 'open -t qute://bookmarks')
|
config.bind('gb', 'open -t qute://bookmarks')
|
||||||
config.bind('gH', 'open -t qute://history')
|
config.bind('gH', 'open -t qute://history')
|
||||||
config.bind('gs', 'open -t qute://settings')
|
config.bind('gs', 'open -t qute://settings')
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Quit.
|
|
||||||
#+begin_src python
|
|
||||||
config.bind('D', 'close')
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Custom Bindings
|
* Custom Bindings
|
||||||
Create a Password for the current website
|
Create a Password for the current website
|
||||||
#+begin_src python
|
#+begin_src python
|
||||||
@@ -282,11 +275,6 @@ c.aliases['Password_Add'] = 'spawn --userscript ~/.config/qutebrowser/userscript
|
|||||||
config.bind(',P', 'Password_Add')
|
config.bind(',P', 'Password_Add')
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src python
|
|
||||||
c.aliases['proxy_on'] = 'set content.proxy socks5://localhost:8080'
|
|
||||||
c.aliases['proxy_off'] = 'config-unset content.proxy'
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
Use Pass to fill password and username (configuration is done in =~/.config/qutebrowser/password_fill_rc=)
|
Use Pass to fill password and username (configuration is done in =~/.config/qutebrowser/password_fill_rc=)
|
||||||
#+begin_src python
|
#+begin_src python
|
||||||
c.aliases['Password_Fill'] = 'spawn --userscript password_fill'
|
c.aliases['Password_Fill'] = 'spawn --userscript password_fill'
|
||||||
@@ -409,12 +397,12 @@ username=$(echo -e "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze"
|
|||||||
password=$(rofi -p "Password" -dmenu -password -lines 1)
|
password=$(rofi -p "Password" -dmenu -password -lines 1)
|
||||||
|
|
||||||
if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
|
if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
|
||||||
notify-send --hint=string:x-dunst-stack-tag:0vRM5AMP --urgency=critical "Pass" "Failed to Add Password"
|
dunstify --urgency=critical "Pass" "Failed to Add Password"
|
||||||
else
|
else
|
||||||
echo -e "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
|
echo -e "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
|
||||||
pass insert --multiline "$url/$username" < /tmp/add-password.txt;
|
pass insert --multiline "$url/$username" < /tmp/add-password.txt;
|
||||||
rm /tmp/add-password.txt
|
rm /tmp/add-password.txt
|
||||||
notify-send --hint=string:x-dunst-stack-tag:0vRM5AMP "Pass " "Password Added"
|
dunstify "Pass " "Password Added"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -427,15 +415,15 @@ if [[ "$1" == *"list"* ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$choice" ] && [ "$choice" = "Playlist" ]; then
|
if [ -n "$choice" ] && [ "$choice" = "Playlist" ]; then
|
||||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloading Playlist...";
|
dunstify --replace=19243 "Youtube " "Downloading Playlist...";
|
||||||
youtube-dl -i -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" -o "%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s" && \
|
youtube-dl -i -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" -o "%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s" && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloaded" || \
|
dunstify --replace=19243 "Youtube " "Downloaded" || \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG --urgency=critical "Youtube " "Failed to download"
|
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
|
||||||
else
|
else
|
||||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloading Video...";
|
dunstify --replace=19243 "Youtube " "Downloading Video...";
|
||||||
youtube-dl --no-playlist -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" && \
|
youtube-dl --no-playlist -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloaded" || \
|
dunstify --replace=19243 "Youtube " "Downloaded" || \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG --urgency=critical "Youtube " "Failed to download"
|
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -639,8 +627,8 @@ new_tags=$(rofi -p "New tags" -dmenu)
|
|||||||
formated_tags=$(echo $existing_tags $new_tags | sed -E 's/(\w+)/"\1"/g;s/\s/,/g')
|
formated_tags=$(echo $existing_tags $new_tags | sed -E 's/(\w+)/"\1"/g;s/\s/,/g')
|
||||||
|
|
||||||
curl -H "Authorization: Token ${LINKDING_TOKEN}" -H "Content-Type: application/json" -d "{\"url\": \"$QUTE_URL\", \"title\": \"$title\", \"tag_names\": [$formated_tags]}" ${LINKDING_URL}/api/bookmarks/ && \
|
curl -H "Authorization: Token ${LINKDING_TOKEN}" -H "Content-Type: application/json" -d "{\"url\": \"$QUTE_URL\", \"title\": \"$title\", \"tag_names\": [$formated_tags]}" ${LINKDING_URL}/api/bookmarks/ && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:l3gV75RD "Linkding" " Bookmark Added" || \
|
dunstify "Linkding" " Bookmark Added" || \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:l3gV75RD --urgency=critical "Linkding" "Failed"
|
dunstify --urgency=critical "Linkding" "Failed"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Add Url to Buku using Rofi
|
** Add Url to Buku using Rofi
|
||||||
@@ -649,28 +637,28 @@ title=$(echo "$QUTE_TITLE" | rofi -p "Title" -dmenu -lines 1)
|
|||||||
tags=$(buku -t --nc --np | sed -e 's/\s*[[:digit:]]*\.\s*\(.*\)\s*([[:digit:]]*)\s*/\1/' -e '/^\s*$/d' | sort | uniq | rofi -multi-select -p "Tags" -dmenu | tr "\n" "," | sed 's/\s*,\s*$//')
|
tags=$(buku -t --nc --np | sed -e 's/\s*[[:digit:]]*\.\s*\(.*\)\s*([[:digit:]]*)\s*/\1/' -e '/^\s*$/d' | sort | uniq | rofi -multi-select -p "Tags" -dmenu | tr "\n" "," | sed 's/\s*,\s*$//')
|
||||||
|
|
||||||
buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \
|
buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:E3TueNZ0 "Buku" "Bookmark Added" || \
|
dunstify "Buku" "Bookmark Added" || \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:E3TueNZ0 --urgency=critical "Buku" " Bookmark Added"
|
dunstify --urgency=critical "Buku" " Bookmark Added"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Add Url to Buku without asking for information
|
** Add Url to Buku without asking for information
|
||||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/buku-add.sh
|
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/buku-add.sh
|
||||||
buku --add $QUTE_URL --title "$QUTE_TITLE" && \
|
buku --add $QUTE_URL --title "$QUTE_TITLE" && \
|
||||||
notify-send "Buku" "📑 Bookmark Added"
|
dunstify "Buku" "📑 Bookmark Added"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Download with aria2c
|
** Download with aria2c
|
||||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add.sh
|
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add.sh
|
||||||
aria2p add "$1" && \
|
aria2p add "$1" && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
|
dunstify "Aria2" "Download Started" || \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
|
dunstify "Aria2" "Error"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Download with aria2c on the Homelab
|
** Download with aria2c on the Homelab
|
||||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add-homelab.sh
|
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add-homelab.sh
|
||||||
dl-add $(echo "$1" | sed 's/\&af=.*$//g') && \
|
dl-add $(echo "$1" | sed 's/\&af=.*$//g') && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
|
dunstify "Aria2" "Download Started" || \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
|
dunstify "Aria2" "Error"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Save to PNG
|
** Save to PNG
|
||||||
@@ -679,8 +667,8 @@ filename=$(rofi -p "filename" -dmenu -lines 1)
|
|||||||
|
|
||||||
if [ -n "filename" ]; then
|
if [ -n "filename" ]; then
|
||||||
cd ~/Pictures/ && \
|
cd ~/Pictures/ && \
|
||||||
firefox -P default -headless --screenshot "$filename.png" "$QUTE_URL" && \
|
firefox-developer-edition -P default -headless --screenshot "$filename.png" "$QUTE_URL" && \
|
||||||
notify-send "Screenshot" "Taken successfully"
|
dunstify "Screenshot" "Taken successfully"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -691,7 +679,7 @@ filename=$(rofi -p "filename" -dmenu -lines 1)
|
|||||||
if [ -n "$filename" ]; then
|
if [ -n "$filename" ]; then
|
||||||
cd ~/Pictures/ && \
|
cd ~/Pictures/ && \
|
||||||
percollate pdf --css "@page { size: A4 portrait }" --output "$filename.pdf" "$QUTE_URL" && \
|
percollate pdf --css "@page { size: A4 portrait }" --output "$filename.pdf" "$QUTE_URL" && \
|
||||||
notify-send "Percollate" "Successfully saved to pdf"
|
dunstify "Percollate" "Successfully saved to pdf"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -701,7 +689,7 @@ passname=$(ls ~/.password-store/totp-* | xargs -n 1 basename | sed -e 's/\..*$//
|
|||||||
|
|
||||||
if [ -n "$passname" ]; then
|
if [ -n "$passname" ]; then
|
||||||
pass otp $passname | xsel -ib && \
|
pass otp $passname | xsel -ib && \
|
||||||
notify-send 'OTP' 'copied to clipboard.' &
|
dunstify 'OTP' 'copied to clipboard.' &
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -710,12 +698,12 @@ fi
|
|||||||
m3u8_path=`curl -L -s "$QUTE_URL" | pcregrep -o1 "file = \"\/(.*aes.*mp4)\""`
|
m3u8_path=`curl -L -s "$QUTE_URL" | pcregrep -o1 "file = \"\/(.*aes.*mp4)\""`
|
||||||
|
|
||||||
if [ -z "$m3u8_path" ]; then
|
if [ -z "$m3u8_path" ]; then
|
||||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP --urgency=critical "Qutebrowser" "No m3u8 playlist found"
|
dunstify --urgency=critical "Qutebrowser" "No m3u8 playlist found"
|
||||||
else
|
else
|
||||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "Downloads..." && \
|
dunstify "Qutebrowser" "Downloads..." && \
|
||||||
cd ~/Downloads/ && \
|
cd ~/Downloads/ && \
|
||||||
ffmpeg -user_agent "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0" -referer "$QUTE_URL" -i "https://cdn2.digitellinc.com/play/_definst_/mp4:$m3u8_path/playlist.m3u8" -c copy "$QUTE_TITLE.mp4" && \
|
ffmpeg -user_agent "Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0" -referer "$QUTE_URL" -i "https://cdn2.digitellinc.com/play/_definst_/mp4:$m3u8_path/playlist.m3u8" -c copy "$QUTE_TITLE.mp4" && \
|
||||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "$QUTE_TITLE Downloaded"
|
dunstify "Qutebrowser" "$QUTE_TITLE Downloaded"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
49
ranger.org
49
ranger.org
@@ -11,18 +11,6 @@
|
|||||||
%p the full paths of selected files
|
%p the full paths of selected files
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
After install, run:
|
|
||||||
#+begin_src bash :tangle no
|
|
||||||
ranger --copy-config=scope
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
To add =scope.sh=.
|
|
||||||
|
|
||||||
To have image preview:
|
|
||||||
#+begin_src bash :tangle no
|
|
||||||
sudo pip3 install ueberzug
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Config
|
* Config
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.config/ranger/rc.conf
|
:header-args: :tangle ~/.config/ranger/rc.conf
|
||||||
@@ -229,7 +217,7 @@ map ,o shell nohup pcmanfm %d &
|
|||||||
|
|
||||||
Print on Rnice:
|
Print on Rnice:
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
map ,p shell print-esrf %f &
|
map ,p shell print-rnice %f &
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Backup to NAS:
|
Backup to NAS:
|
||||||
@@ -270,6 +258,7 @@ else
|
|||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
*** Copy File Content
|
*** Copy File Content
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.config/ranger/scripts/copy-content.sh
|
:header-args: :tangle ~/.config/ranger/scripts/copy-content.sh
|
||||||
@@ -277,7 +266,24 @@ fi
|
|||||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
:END:
|
:END:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
xclip -sel c < "$1" && notify-send "Ranger" "Copied to clipboard"
|
xclip -sel c < "$1" && dunstify "Ranger" "Copied to clipboard"
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** TODO [#B] Backup to NAS
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.config/ranger/scripts/backup-to-nas.sh
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
|
:END:
|
||||||
|
|
||||||
|
- Arguments are the files to be backup to the NAS
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
if [ $TMUX ]; then
|
||||||
|
tmux split -v -l 2 rsync -a --inplace --info=progress2 --rsh='ssh ' "$@" homelab:/srv/storage/Backups/ && tmux select-pane -U
|
||||||
|
else
|
||||||
|
rsync -a --info=progress2 --inplace --rsh='ssh' "$@" homelab:/srv/storage/Backups/
|
||||||
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Paste with Rsync
|
*** Paste with Rsync
|
||||||
@@ -292,12 +298,13 @@ xclip -sel c < "$1" && notify-send "Ranger" "Copied to clipboard"
|
|||||||
|
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
if [ $TMUX ]; then
|
if [ $TMUX ]; then
|
||||||
tmux split -v -l 1 rsync -a --info=progress2 --no-inc-recursive "${@:2}" "$1" && tmux select-pane -U
|
tmux split -v -l 1 rsync -a --info=progress2 "${@:2}" "$1" && tmux select-pane -U
|
||||||
else
|
else
|
||||||
rsync -a --info=progress2 --no-inc-recursive "${@:2}" "$1"
|
rsync -a --info=progress2 "${@:2}" "$1"
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Define keys for the browser
|
** Define keys for the browser
|
||||||
*** Basic
|
*** Basic
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
@@ -414,7 +421,7 @@ map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
|
|||||||
|
|
||||||
*** Drag and Drop
|
*** Drag and Drop
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
map D shell dragon -a -x %p
|
map D shell dragon-drag-and-drop -a -x %p
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Rename files
|
*** Rename files
|
||||||
@@ -659,20 +666,20 @@ ext x?html?, has w3m, terminal = w3m "$@"
|
|||||||
|
|
||||||
** Word, Excel and Presentation files
|
** Word, Excel and Presentation files
|
||||||
#+BEGIN_SRC conf
|
#+BEGIN_SRC conf
|
||||||
ext docx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
ext docx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
||||||
ext docx?, has wps, X, flag f = wps "$@"
|
ext docx?, has wps, X, flag f = wps "$@"
|
||||||
ext docx?, has libreoffice, X, flag f = libreoffice "$@"
|
ext docx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
ext pptx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
ext pptx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
||||||
ext pptx?, has wps, X, flag f = wps "$@"
|
ext pptx?, has wps, X, flag f = wps "$@"
|
||||||
ext pptx?, has libreoffice, X, flag f = libreoffice "$@"
|
ext pptx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
ext csv|xlsx?, has sc-im = sc-im -- "$@"
|
ext csv|xlsx?, has sc-im = sc-im -- "$@"
|
||||||
ext csv|xlsx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
ext csv|xlsx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
||||||
ext csv|xlsx?, has wps, X, flag f = wps "$@"
|
ext csv|xlsx?, has wps, X, flag f = wps "$@"
|
||||||
ext csv|xlsx?, has libreoffice, X, flag f = libreoffice "$@"
|
ext csv|xlsx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -721,7 +728,7 @@ name ^[mM]akefile$ = make
|
|||||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
||||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
|
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
|
||||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||||
has dragon, X, flag f = dragon -a -x "$@"
|
has dragon-drag-and-drop, X, flag f = dragon-drag-and-drop -a -x "$@"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Ranger Commands
|
* Ranger Commands
|
||||||
|
147
sxhkd.org
147
sxhkd.org
@@ -151,6 +151,10 @@ super + e
|
|||||||
|
|
||||||
* =Super + Shift= - Managing Applications
|
* =Super + Shift= - Managing Applications
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
|
# Network Manager
|
||||||
|
super + shift + w
|
||||||
|
$TERMINAL --title nmtui -e sudo nmtui
|
||||||
|
|
||||||
# Bluetooth Manager
|
# Bluetooth Manager
|
||||||
super + shift + b
|
super + shift + b
|
||||||
blueman-manager
|
blueman-manager
|
||||||
@@ -163,6 +167,10 @@ super + shift + c
|
|||||||
super + shift + s
|
super + shift + s
|
||||||
pavucontrol
|
pavucontrol
|
||||||
|
|
||||||
|
# Bookmarks
|
||||||
|
super + shift + f
|
||||||
|
bukurun
|
||||||
|
|
||||||
# Passwords
|
# Passwords
|
||||||
super + shift + p
|
super + shift + p
|
||||||
rofi-pass
|
rofi-pass
|
||||||
@@ -176,15 +184,19 @@ super + space ; c
|
|||||||
|
|
||||||
# pcmanfm: GUI file manager
|
# pcmanfm: GUI file manager
|
||||||
super + space ; o
|
super + space ; o
|
||||||
nautilus;
|
pcmanfm;
|
||||||
|
|
||||||
|
# Download with Aria2c
|
||||||
|
super + space ; d
|
||||||
|
$TERMINAL -e tmux new-session -A -s aria2p aria2p --port 6800 --host http://dl.tdehaeze.xyz --secret $(pass dl.tdehaeze.xyz/tdehaeze | sed -n 1p)
|
||||||
|
|
||||||
# Run another instance of Neomutt in read-only mode
|
# Run another instance of Neomutt in read-only mode
|
||||||
super + space ; m
|
super + space ; m
|
||||||
$TERMINAL -e neomutt -R
|
$TERMINAL -e neomutt -R
|
||||||
|
|
||||||
# Music with ncmpcpp
|
# News with newsboat
|
||||||
super + space ; w
|
super + space ; n
|
||||||
$TERMINAL -e tmux new-session -A -s gomuks gomuks
|
$TERMINAL -e tmux new-session -A -s newsboat newsboat
|
||||||
|
|
||||||
# Music with ncmpcpp
|
# Music with ncmpcpp
|
||||||
super + space ; p
|
super + space ; p
|
||||||
@@ -194,9 +206,136 @@ super + space ; p
|
|||||||
super + space ; i
|
super + space ; i
|
||||||
$BROWSER;
|
$BROWSER;
|
||||||
|
|
||||||
|
# Start Torrent Managaer
|
||||||
|
super + space ; t
|
||||||
|
$TERMINAL -e tremc
|
||||||
|
|
||||||
# Emacs
|
# Emacs
|
||||||
super + space ; e
|
super + space ; e
|
||||||
emacsclient -create-frame --alternate-editor=""
|
emacsclient -create-frame --alternate-editor=""
|
||||||
|
|
||||||
|
# Weather
|
||||||
|
super + space ; shift + w
|
||||||
|
weather;
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* BSPWM related
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args:conf+: :tangle ~/.config/sxhkd/sxhkdrc.bspwm
|
||||||
|
:END:
|
||||||
|
|
||||||
|
** BSPWM hotkeys
|
||||||
|
#+begin_src conf
|
||||||
|
# quit/restart bspwm
|
||||||
|
super + alt + {q,r}
|
||||||
|
bspc {quit,wm -r}
|
||||||
|
|
||||||
|
# close and kill
|
||||||
|
super + {_,shift + }q
|
||||||
|
bspc node -{c,k}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Monocle Layout
|
||||||
|
#+begin_src conf
|
||||||
|
# alternate between the tiled and monocle layout
|
||||||
|
super + m
|
||||||
|
bspc desktop -l next
|
||||||
|
|
||||||
|
# focus the next/previous node in the current desktop
|
||||||
|
super + c
|
||||||
|
bspc node -f next.local
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Set the window State
|
||||||
|
#+begin_src conf
|
||||||
|
# Set the window state to tiled
|
||||||
|
super + t
|
||||||
|
bspc node -t tiled
|
||||||
|
|
||||||
|
|
||||||
|
# Toggle Fullscreen State
|
||||||
|
super + f
|
||||||
|
if [ -z "$(bspc query -N -n focused.fullscreen)" ]; then \
|
||||||
|
bspc node focused -t fullscreen; \
|
||||||
|
else \
|
||||||
|
bspc node focused -t tiled; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Toggle Floating State
|
||||||
|
super + s
|
||||||
|
if [ -z "$(bspc query -N -n focused.floating)" ]; then \
|
||||||
|
bspc node focused -t floating; \
|
||||||
|
else \
|
||||||
|
bspc node focused -t tiled; \
|
||||||
|
fi
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Sticky Window
|
||||||
|
#+begin_src conf
|
||||||
|
# set the node flags
|
||||||
|
super + ctrl + y
|
||||||
|
bspc node -g sticky
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Focus and Swap
|
||||||
|
#+begin_src conf
|
||||||
|
# Focus/swap the node in the given direction
|
||||||
|
super + {_,shift + }{h,j,k,l}
|
||||||
|
bspc node -{f,s} {west,south,north,east}
|
||||||
|
|
||||||
|
# focus the last Node
|
||||||
|
super + Tab
|
||||||
|
bspc node -f last
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src conf
|
||||||
|
# Focus the next/previous desktop in the current monitor
|
||||||
|
super + {p,n}
|
||||||
|
bspc desktop -f {prev,next}.local
|
||||||
|
|
||||||
|
# focus the last Desktop
|
||||||
|
super + b
|
||||||
|
bspc desktop -f last
|
||||||
|
|
||||||
|
# focus or send to the given desktop
|
||||||
|
super + {_,ctrl + }{1-9}
|
||||||
|
bspc {desktop -f,node -d} '^{1-9}'
|
||||||
|
|
||||||
|
# Send and Focus to the given desktop
|
||||||
|
super + shift + {1-9}
|
||||||
|
bspc node -d '^{1-9}' --follow
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Preselect
|
||||||
|
#+begin_src conf
|
||||||
|
# preselect the direction
|
||||||
|
super + ctrl + {h,j,k,l}
|
||||||
|
bspc node -p {west,south,north,east}
|
||||||
|
|
||||||
|
# preselect the ratio
|
||||||
|
# super + ctrl + {1-9}
|
||||||
|
# bspc node -o 0.{1-9}
|
||||||
|
|
||||||
|
# cancel the preselection for the focused node
|
||||||
|
super + ctrl + space
|
||||||
|
bspc node -p cancel
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Resize
|
||||||
|
#+begin_src conf
|
||||||
|
# expand a window by moving one of its side outward
|
||||||
|
super + alt + {h,j,k,l}
|
||||||
|
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
||||||
|
|
||||||
|
# contract a window by moving one of its side inward
|
||||||
|
super + alt + shift + {h,j,k,l}
|
||||||
|
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src conf
|
||||||
|
# move a floating window
|
||||||
|
super + {Left,Down,Up,Right}
|
||||||
|
bspc node -v {-20 0,0 20,0 -20,20 0}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* I3 related
|
* I3 related
|
||||||
|
156
systemd.org
156
systemd.org
@@ -3,6 +3,72 @@
|
|||||||
|
|
||||||
https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
|
https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
|
||||||
|
|
||||||
|
* =bukugit= - Automatic commit and push new bookmarks
|
||||||
|
** Service
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.config/systemd/user/bukugit.service
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
[Unit]
|
||||||
|
Description=Sync Bookmarks every day
|
||||||
|
RefuseManualStart=no
|
||||||
|
RefuseManualStop=yes
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=%h/.local/bin/buku_git_push
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Timer
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.config/systemd/user/bukugit.timer
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+BEGIN_SRC conf
|
||||||
|
[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
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** Script
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.local/bin/buku_git_push
|
||||||
|
:header-args+: :comments both :mkdirp yes
|
||||||
|
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
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
|
||||||
|
|
||||||
|
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
|
* =braingit= - Automatic commit and push new brain pages
|
||||||
** Service
|
** Service
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@@ -129,29 +195,33 @@ done
|
|||||||
# Count number of mails
|
# Count number of mails
|
||||||
gmail_old="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
gmail_old="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
||||||
esrf_old="$(ls ~/.mail/esrf/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
|
# Retreive mails
|
||||||
mbsync $opt_all $opt_verbose gmail-Home esrf-Home 2>/tmp/mbsync.log
|
mbsync $opt_all $opt_verbose gmail-Home esrf-Home ulg-Home uliege-Home 2>/tmp/mbsync.log
|
||||||
# =============================================================
|
# =============================================================
|
||||||
|
|
||||||
# =============================================================
|
# =============================================================
|
||||||
# Count number of mails
|
# Count number of mails
|
||||||
gmail_new="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
gmail_new="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
||||||
esrf_new="$(ls ~/.mail/esrf/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
|
# Total Number of new mails since last checking
|
||||||
new="$(($esrf_new+$gmail_new))"
|
new="$(($gmail_new+$esrf_new+$ulg_new+$uliege_new))"
|
||||||
old="$(($esrf_old+$gmail_old))"
|
old="$(($gmail_old+$esrf_old+$ulg_old+$uliege_old))"
|
||||||
# =============================================================
|
# =============================================================
|
||||||
|
|
||||||
# =============================================================
|
# =============================================================
|
||||||
# Notification
|
# Notification
|
||||||
if [ "$new" -gt 0 ]; then
|
if [ "$new" -gt 0 ]; then
|
||||||
notify-send --hint=string:x-dunst-stack-tag:fV84ivMi 'Mails ' "$new new mail(s)"
|
dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new+$ulg_new+$uliege_new)) new mail(s)"
|
||||||
fi
|
fi
|
||||||
# =============================================================
|
# =============================================================
|
||||||
|
|
||||||
@@ -160,7 +230,7 @@ fi
|
|||||||
if pgrep -f 'mu server'; then
|
if pgrep -f 'mu server'; then
|
||||||
emacsclient --eval '(mu4e-update-index)'
|
emacsclient --eval '(mu4e-update-index)'
|
||||||
else
|
else
|
||||||
mu index -m ~/.mail $opt_verbose $opt_quiet
|
mu index $opt_verbose $opt_quiet
|
||||||
fi
|
fi
|
||||||
# =============================================================
|
# =============================================================
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -247,7 +317,7 @@ AccuracySec=5m
|
|||||||
WantedBy=timers.target
|
WantedBy=timers.target
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* TODO =ssh-agent= - SSH Agent
|
* =ssh-agent= - SSH Agent
|
||||||
** Service
|
** Service
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.config/systemd/user/ssh-agent.service
|
:header-args: :tangle ~/.config/systemd/user/ssh-agent.service
|
||||||
@@ -267,7 +337,26 @@ ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
|||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* TODO =emacs= - Emacs
|
* =powertop= - 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
|
||||||
|
|
||||||
|
|
||||||
|
* =emacs= - Emacs
|
||||||
** Service
|
** Service
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.config/systemd/user/emacs.service
|
:header-args: :tangle ~/.config/systemd/user/emacs.service
|
||||||
@@ -289,7 +378,7 @@ Restart=on-failure
|
|||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* TODO =trash-empty= - Empty the trash for files older than 30 days
|
* =trash-empty= - Empty the trash for files older than 30 days
|
||||||
** Service
|
** Service
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.config/systemd/user/trash-empty.service
|
:header-args: :tangle ~/.config/systemd/user/trash-empty.service
|
||||||
@@ -324,54 +413,3 @@ Unit=trash-empty
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=timers.target
|
WantedBy=timers.target
|
||||||
#+end_src
|
#+end_src
|
||||||
* =syncthing=
|
|
||||||
** Service
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :tangle ~/.config/systemd/user/syncthing.service
|
|
||||||
:header-args+: :comments both :mkdirp yes
|
|
||||||
:END:
|
|
||||||
#+begin_src conf
|
|
||||||
[Unit]
|
|
||||||
Description=Syncthing - Open Source Continuous File Synchronization for %I
|
|
||||||
Documentation=man:syncthing(1)
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Environment="all_proxy=socks5://localhost:8080"
|
|
||||||
ExecStart=/usr/bin/syncthing -no-browser -gui-address="0.0.0.0:8384" -no-restart -logflags=0
|
|
||||||
Restart=on-failure
|
|
||||||
SuccessExitStatus=3 4
|
|
||||||
RestartForceExitStatus=3 4
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* =homelab-tunnel= - SSH Tunnel
|
|
||||||
Useful to bypass firewalls.
|
|
||||||
This can we used on the browser:
|
|
||||||
- for =qutebrowser=, use =:set content.proxy socks5://localhost:8080= (can setup a shortcut for that)
|
|
||||||
|
|
||||||
This is also used for Syncthing.
|
|
||||||
|
|
||||||
** Service
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :tangle ~/.config/systemd/user/homelab-tunnel.service
|
|
||||||
:header-args+: :comments both :mkdirp yes
|
|
||||||
:END:
|
|
||||||
|
|
||||||
#+begin_src conf
|
|
||||||
[Unit]
|
|
||||||
Description=Setup a secure tunnel with homelab
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/ssh -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -D 8080 -q -N -T homelab
|
|
||||||
|
|
||||||
# Restart every >2 seconds to avoid StartLimitInterval failure
|
|
||||||
RestartSec=5
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=default.target
|
|
||||||
#+end_src
|
|
||||||
|
@@ -65,15 +65,15 @@ on-download-error=/home/thomas/.config/aria2/download-error.sh
|
|||||||
|
|
||||||
** Download Start Script
|
** Download Start Script
|
||||||
#+begin_src bash :tangle ~/.config/aria2/download-start.sh :comments both :mkdirp yes :shebang "#!/bin/bash"
|
#+begin_src bash :tangle ~/.config/aria2/download-start.sh :comments both :mkdirp yes :shebang "#!/bin/bash"
|
||||||
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW "DL Started" "$(basename \"$3\" 2> /dev/null)"
|
dunstify "DL Started" "$(basename \"$3\" 2> /dev/null)"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Download Complete Script
|
** Download Complete Script
|
||||||
#+begin_src bash :tangle ~/.config/aria2/download-complete.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
#+begin_src bash :tangle ~/.config/aria2/download-complete.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
||||||
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW "DL Completed" "$(basename \"$3\" 2> /dev/null)"
|
dunstify "DL Completed" "$(basename \"$3\" 2> /dev/null)"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Download Error Script
|
** Download Error Script
|
||||||
#+begin_src bash :tangle ~/.config/aria2/download-error.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
#+begin_src bash :tangle ~/.config/aria2/download-error.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
||||||
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)"
|
dunstify --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
21
vim.org
21
vim.org
@@ -139,20 +139,13 @@ Plug 'tdehaeze/matlab-vim', { 'for': 'matlab' } " Edit Matlab M-files in Vim
|
|||||||
Plug 'djoshea/vim-matlab-fold', { 'for': 'matlab' } " Vim code folding for Matlab files
|
Plug 'djoshea/vim-matlab-fold', { 'for': 'matlab' } " Vim code folding for Matlab files
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Python
|
|
||||||
#+begin_src vimrc
|
|
||||||
Plug 'pixelneo/vim-python-docstring'
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Org Mode
|
** Org Mode
|
||||||
#+begin_src vimrc
|
#+begin_src vimrc
|
||||||
Plug 'nvim-orgmode/orgmode'
|
Plug 'jceb/vim-orgmode' " Text outlining and task management for Vim
|
||||||
|
Plug 'vim-scripts/SyntaxRange' " Define a different filetype syntax on regions of a buffer
|
||||||
" Plug 'jceb/vim-orgmode' " Text outlining and task management for Vim
|
Plug 'chrisbra/NrrwRgn' " A Narrow Region Plugin for vim
|
||||||
" Plug 'vim-scripts/SyntaxRange' " Define a different filetype syntax on regions of a buffer
|
Plug 'mattn/calendar-vim' " calendar vimscript
|
||||||
" Plug 'chrisbra/NrrwRgn' " A Narrow Region Plugin for vim
|
Plug 'vim-scripts/utl.vim' " Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas
|
||||||
" Plug 'mattn/calendar-vim' " calendar vimscript
|
|
||||||
" Plug 'vim-scripts/utl.vim' " Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Plug End
|
** Plug End
|
||||||
@@ -796,8 +789,8 @@ let g:UltiSnipsSnippetsDir = '~/.vim/UltiSnip'
|
|||||||
|
|
||||||
" inoremap <silent><expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
" inoremap <silent><expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||||
let g:UltiSnipsExpandTrigger="<C-j>"
|
let g:UltiSnipsExpandTrigger="<C-j>"
|
||||||
let g:UltiSnipsJumpForwardTrigger="<tab>"
|
" let g:UltiSnipsJumpForwardTrigger="<tab>"
|
||||||
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
|
" let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** =honza/vim-snippets=
|
** =honza/vim-snippets=
|
||||||
|
368
xconfig.org
368
xconfig.org
@@ -10,40 +10,57 @@
|
|||||||
|
|
||||||
** Colors
|
** Colors
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
,*foreground: #d5c4a1
|
#define base00 #32302f
|
||||||
|
#define base01 #3c3836
|
||||||
|
#define base02 #504945
|
||||||
|
#define base03 #665c54
|
||||||
|
#define base04 #bdae93
|
||||||
|
#define base05 #d5c4a1
|
||||||
|
#define base06 #ebdbb2
|
||||||
|
#define base07 #fbf1c7
|
||||||
|
#define base08 #fb4934
|
||||||
|
#define base09 #fe8019
|
||||||
|
#define base0A #fabd2f
|
||||||
|
#define base0B #b8bb26
|
||||||
|
#define base0C #8ec07c
|
||||||
|
#define base0D #83a598
|
||||||
|
#define base0E #d3869b
|
||||||
|
#define base0F #d65d0e
|
||||||
|
|
||||||
|
,*foreground: base05
|
||||||
#ifdef background_opacity
|
#ifdef background_opacity
|
||||||
,*background: [background_opacity]#32302f
|
,*background: [background_opacity]base00
|
||||||
#else
|
#else
|
||||||
,*background: #32302f
|
,*background: base00
|
||||||
#endif
|
#endif
|
||||||
,*cursorColor: #d5c4a1
|
,*cursorColor: base05
|
||||||
|
|
||||||
,*color0: #32302f
|
,*color0: base00
|
||||||
,*color1: #fb4934
|
,*color1: base08
|
||||||
,*color2: #b8bb26
|
,*color2: base0B
|
||||||
,*color3: #fabd2f
|
,*color3: base0A
|
||||||
,*color4: #83a598
|
,*color4: base0D
|
||||||
,*color5: #d3869b
|
,*color5: base0E
|
||||||
,*color6: #8ec07c
|
,*color6: base0C
|
||||||
,*color7: #d5c4a1
|
,*color7: base05
|
||||||
|
|
||||||
,*color8: #665c54
|
,*color8: base03
|
||||||
,*color9: #fb4934
|
,*color9: base08
|
||||||
,*color10: #b8bb26
|
,*color10: base0B
|
||||||
,*color11: #fabd2f
|
,*color11: base0A
|
||||||
,*color12: #83a598
|
,*color12: base0D
|
||||||
,*color13: #d3869b
|
,*color13: base0E
|
||||||
,*color14: #8ec07c
|
,*color14: base0C
|
||||||
,*color15: #fbf1c7
|
,*color15: base07
|
||||||
|
|
||||||
! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
|
! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
|
||||||
! use 'shell' template to set these if necessary
|
! use 'shell' template to set these if necessary
|
||||||
,*color16: #fe8019
|
,*color16: base09
|
||||||
,*color17: #d65d0e
|
,*color17: base0F
|
||||||
,*color18: #3c3836
|
,*color18: base01
|
||||||
,*color19: #504945
|
,*color19: base02
|
||||||
,*color20: #bdae93
|
,*color20: base04
|
||||||
,*color21: #ebdbb2
|
,*color21: base06
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Fonts
|
** Fonts
|
||||||
@@ -63,6 +80,264 @@ Xcursor.theme: Breeze
|
|||||||
Xcursor.size: 0
|
Xcursor.size: 0
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* =~/.Xmodmap=
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args: :tangle ~/.Xmodmap
|
||||||
|
:header-args+: :comments no :mkdirp yes
|
||||||
|
:CUSTOM_ID: xmodmap
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src conf
|
||||||
|
keycode 8 =
|
||||||
|
keycode 9 = Escape NoSymbol Escape
|
||||||
|
keycode 10 = 1 exclam 1 exclam
|
||||||
|
keycode 11 = 2 at 2 at
|
||||||
|
keycode 12 = 3 numbersign 3 numbersign
|
||||||
|
keycode 13 = 4 dollar 4 dollar
|
||||||
|
keycode 14 = 5 percent 5 percent
|
||||||
|
keycode 15 = 6 asciicircum 6 asciicircum
|
||||||
|
keycode 16 = 7 ampersand 7 ampersand
|
||||||
|
keycode 17 = 8 asterisk 8 asterisk
|
||||||
|
keycode 18 = 9 parenleft 9 parenleft
|
||||||
|
keycode 19 = 0 parenright 0 parenright
|
||||||
|
keycode 20 = minus underscore minus underscore
|
||||||
|
keycode 21 = equal plus equal plus
|
||||||
|
keycode 22 = BackSpace BackSpace BackSpace BackSpace
|
||||||
|
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
|
||||||
|
keycode 24 = q Q q Q
|
||||||
|
keycode 25 = w W w W
|
||||||
|
keycode 26 = e E e E
|
||||||
|
keycode 27 = r R r R
|
||||||
|
keycode 28 = t T t T
|
||||||
|
keycode 29 = y Y y Y
|
||||||
|
keycode 30 = u U u U
|
||||||
|
keycode 31 = i I i I
|
||||||
|
keycode 32 = o O o O
|
||||||
|
keycode 33 = p P p P
|
||||||
|
keycode 34 = bracketleft braceleft bracketleft braceleft
|
||||||
|
keycode 35 = bracketright braceright bracketright braceright
|
||||||
|
keycode 36 = Return NoSymbol Return
|
||||||
|
keycode 37 = Control_L NoSymbol Control_L
|
||||||
|
keycode 38 = a A a A
|
||||||
|
keycode 39 = s S s S
|
||||||
|
keycode 40 = d D d D
|
||||||
|
keycode 41 = f F f F
|
||||||
|
keycode 42 = g G g G
|
||||||
|
keycode 43 = h H h H
|
||||||
|
keycode 44 = j J j J
|
||||||
|
keycode 45 = k K k K
|
||||||
|
keycode 46 = l L l L
|
||||||
|
keycode 47 = semicolon colon semicolon colon
|
||||||
|
keycode 48 = apostrophe quotedbl apostrophe quotedbl
|
||||||
|
keycode 49 = grave asciitilde grave asciitilde
|
||||||
|
keycode 50 = Shift_L NoSymbol Shift_L
|
||||||
|
keycode 51 = backslash bar backslash bar
|
||||||
|
keycode 52 = z Z z Z
|
||||||
|
keycode 53 = x X x X
|
||||||
|
keycode 54 = c C c C
|
||||||
|
keycode 55 = v V v V
|
||||||
|
keycode 56 = b B b B
|
||||||
|
keycode 57 = n N n N
|
||||||
|
keycode 58 = m M m M
|
||||||
|
keycode 59 = comma less comma less
|
||||||
|
keycode 60 = period greater period greater
|
||||||
|
keycode 61 = slash question slash question
|
||||||
|
keycode 62 = Shift_R NoSymbol Shift_R
|
||||||
|
keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab
|
||||||
|
keycode 64 = Alt_L Meta_L Alt_L Meta_L
|
||||||
|
keycode 65 = space NoSymbol space
|
||||||
|
keycode 66 = Caps_Lock NoSymbol Caps_Lock
|
||||||
|
keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1
|
||||||
|
keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2
|
||||||
|
keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3
|
||||||
|
keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4
|
||||||
|
keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5
|
||||||
|
keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6
|
||||||
|
keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7
|
||||||
|
keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8
|
||||||
|
keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9
|
||||||
|
keycode 76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10
|
||||||
|
keycode 77 = Num_Lock NoSymbol Num_Lock
|
||||||
|
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock
|
||||||
|
keycode 79 = KP_Home KP_7 KP_Home KP_7
|
||||||
|
keycode 80 = KP_Up KP_8 KP_Up KP_8
|
||||||
|
keycode 81 = KP_Prior KP_9 KP_Prior KP_9
|
||||||
|
keycode 82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode
|
||||||
|
keycode 83 = KP_Left KP_4 KP_Left KP_4
|
||||||
|
keycode 84 = KP_Begin KP_5 KP_Begin KP_5
|
||||||
|
keycode 85 = KP_Right KP_6 KP_Right KP_6
|
||||||
|
keycode 86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode
|
||||||
|
keycode 87 = KP_End KP_1 KP_End KP_1
|
||||||
|
keycode 88 = KP_Down KP_2 KP_Down KP_2
|
||||||
|
keycode 89 = KP_Next KP_3 KP_Next KP_3
|
||||||
|
keycode 90 = KP_Insert KP_0 KP_Insert KP_0
|
||||||
|
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal
|
||||||
|
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
|
||||||
|
keycode 93 =
|
||||||
|
keycode 94 = less greater less greater bar brokenbar bar
|
||||||
|
keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11
|
||||||
|
keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12
|
||||||
|
keycode 97 =
|
||||||
|
keycode 98 = Katakana NoSymbol Katakana
|
||||||
|
keycode 99 = Hiragana NoSymbol Hiragana
|
||||||
|
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode
|
||||||
|
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana
|
||||||
|
keycode 102 = Muhenkan NoSymbol Muhenkan
|
||||||
|
keycode 103 =
|
||||||
|
keycode 104 = KP_Enter NoSymbol KP_Enter
|
||||||
|
keycode 105 = Control_R NoSymbol Control_R
|
||||||
|
keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab
|
||||||
|
keycode 107 = Print Sys_Req Print Sys_Req
|
||||||
|
keycode 108 = Alt_R Meta_R Alt_R Meta_R
|
||||||
|
keycode 109 = Linefeed NoSymbol Linefeed
|
||||||
|
keycode 110 = Home NoSymbol Home
|
||||||
|
keycode 111 = Up NoSymbol Up
|
||||||
|
keycode 112 = Prior NoSymbol Prior
|
||||||
|
keycode 113 = Left NoSymbol Left
|
||||||
|
keycode 114 = Right NoSymbol Right
|
||||||
|
keycode 115 = End NoSymbol End
|
||||||
|
keycode 116 = Down NoSymbol Down
|
||||||
|
keycode 117 = Next NoSymbol Next
|
||||||
|
keycode 118 = Insert NoSymbol Insert
|
||||||
|
keycode 119 = Delete NoSymbol Delete
|
||||||
|
keycode 120 =
|
||||||
|
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute
|
||||||
|
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
|
||||||
|
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
|
||||||
|
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff
|
||||||
|
keycode 125 = KP_Equal NoSymbol KP_Equal
|
||||||
|
keycode 126 = plusminus NoSymbol plusminus
|
||||||
|
keycode 127 = Pause Break Pause Break
|
||||||
|
keycode 128 = XF86LaunchA NoSymbol XF86LaunchA
|
||||||
|
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
|
||||||
|
keycode 130 = Hangul NoSymbol Hangul
|
||||||
|
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja
|
||||||
|
keycode 132 =
|
||||||
|
keycode 133 =
|
||||||
|
keycode 134 = Super_R NoSymbol Super_R
|
||||||
|
keycode 135 = Menu NoSymbol Menu
|
||||||
|
keycode 136 = Cancel NoSymbol Cancel
|
||||||
|
keycode 137 = Redo NoSymbol Redo
|
||||||
|
keycode 138 = SunProps NoSymbol SunProps
|
||||||
|
keycode 139 = Undo NoSymbol Undo
|
||||||
|
keycode 140 = SunFront NoSymbol SunFront
|
||||||
|
keycode 141 = XF86Copy NoSymbol XF86Copy
|
||||||
|
keycode 142 = XF86Open NoSymbol XF86Open
|
||||||
|
keycode 143 = XF86Paste NoSymbol XF86Paste
|
||||||
|
keycode 144 = Find NoSymbol Find
|
||||||
|
keycode 145 = XF86Cut NoSymbol XF86Cut
|
||||||
|
keycode 146 = Help NoSymbol Help
|
||||||
|
keycode 147 = xf86menukb nosymbol xf86menukb
|
||||||
|
keycode 148 = XF86Calculator NoSymbol XF86Calculator
|
||||||
|
keycode 149 =
|
||||||
|
keycode 150 = XF86Sleep NoSymbol XF86Sleep
|
||||||
|
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp
|
||||||
|
keycode 152 = XF86Explorer NoSymbol XF86Explorer
|
||||||
|
keycode 153 = XF86Send NoSymbol XF86Send
|
||||||
|
keycode 154 =
|
||||||
|
keycode 155 = XF86Xfer NoSymbol XF86Xfer
|
||||||
|
keycode 156 = XF86Launch1 NoSymbol XF86Launch1
|
||||||
|
keycode 157 = XF86Launch2 NoSymbol XF86Launch2
|
||||||
|
keycode 158 = XF86WWW NoSymbol XF86WWW
|
||||||
|
keycode 159 = XF86DOS NoSymbol XF86DOS
|
||||||
|
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver
|
||||||
|
keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows
|
||||||
|
keycode 162 = XF86TaskPane NoSymbol XF86TaskPane
|
||||||
|
keycode 163 = XF86Mail NoSymbol XF86Mail
|
||||||
|
keycode 164 = XF86Favorites NoSymbol XF86Favorites
|
||||||
|
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer
|
||||||
|
keycode 166 = XF86Back NoSymbol XF86Back
|
||||||
|
keycode 167 = XF86Forward NoSymbol XF86Forward
|
||||||
|
keycode 168 =
|
||||||
|
keycode 169 = XF86Eject NoSymbol XF86Eject
|
||||||
|
keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject
|
||||||
|
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext
|
||||||
|
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
|
||||||
|
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev
|
||||||
|
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
|
||||||
|
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord
|
||||||
|
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind
|
||||||
|
keycode 177 = XF86Phone NoSymbol XF86Phone
|
||||||
|
keycode 178 =
|
||||||
|
keycode 179 = XF86Tools NoSymbol XF86Tools
|
||||||
|
keycode 180 = XF86HomePage NoSymbol XF86HomePage
|
||||||
|
keycode 181 = XF86Reload NoSymbol XF86Reload
|
||||||
|
keycode 182 = XF86Close NoSymbol XF86Close
|
||||||
|
keycode 183 =
|
||||||
|
keycode 184 =
|
||||||
|
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp
|
||||||
|
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown
|
||||||
|
keycode 187 = parenleft NoSymbol parenleft
|
||||||
|
keycode 188 = parenright NoSymbol parenright
|
||||||
|
keycode 189 = XF86New NoSymbol XF86New
|
||||||
|
keycode 190 = Redo NoSymbol Redo
|
||||||
|
keycode 191 = XF86Tools NoSymbol XF86Tools
|
||||||
|
keycode 192 = XF86Launch5 NoSymbol XF86Launch5
|
||||||
|
keycode 193 = XF86Launch6 NoSymbol XF86Launch6
|
||||||
|
keycode 194 = XF86Launch7 NoSymbol XF86Launch7
|
||||||
|
keycode 195 = XF86Launch8 NoSymbol XF86Launch8
|
||||||
|
keycode 196 = XF86Launch9 NoSymbol XF86Launch9
|
||||||
|
keycode 197 =
|
||||||
|
keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute
|
||||||
|
keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
|
||||||
|
keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn
|
||||||
|
keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff
|
||||||
|
keycode 202 =
|
||||||
|
keycode 203 = Mode_switch NoSymbol Mode_switch
|
||||||
|
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
|
||||||
|
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L
|
||||||
|
keycode 206 = NoSymbol Super_L NoSymbol Super_L
|
||||||
|
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L
|
||||||
|
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay
|
||||||
|
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause
|
||||||
|
keycode 210 = XF86Launch3 NoSymbol XF86Launch3
|
||||||
|
keycode 211 = XF86Launch4 NoSymbol XF86Launch4
|
||||||
|
keycode 212 = XF86LaunchB NoSymbol XF86LaunchB
|
||||||
|
keycode 213 = XF86Suspend NoSymbol XF86Suspend
|
||||||
|
keycode 214 = XF86Close NoSymbol XF86Close
|
||||||
|
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay
|
||||||
|
keycode 216 = XF86AudioForward NoSymbol XF86AudioForward
|
||||||
|
keycode 217 =
|
||||||
|
keycode 218 = Print NoSymbol Print
|
||||||
|
keycode 219 =
|
||||||
|
keycode 220 = XF86WebCam NoSymbol XF86WebCam
|
||||||
|
keycode 221 =
|
||||||
|
keycode 222 =
|
||||||
|
keycode 223 = XF86Mail NoSymbol XF86Mail
|
||||||
|
keycode 224 = XF86Messenger NoSymbol XF86Messenger
|
||||||
|
keycode 225 = XF86Search NoSymbol XF86Search
|
||||||
|
keycode 226 = XF86Go NoSymbol XF86Go
|
||||||
|
keycode 227 = XF86Finance NoSymbol XF86Finance
|
||||||
|
keycode 228 = XF86Game NoSymbol XF86Game
|
||||||
|
keycode 229 = XF86Shop NoSymbol XF86Shop
|
||||||
|
keycode 230 =
|
||||||
|
keycode 231 = Cancel NoSymbol Cancel
|
||||||
|
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
|
||||||
|
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
|
||||||
|
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia
|
||||||
|
keycode 235 = XF86Display NoSymbol XF86Display
|
||||||
|
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
|
||||||
|
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
|
||||||
|
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
|
||||||
|
keycode 239 = XF86Send NoSymbol XF86Send
|
||||||
|
keycode 240 = XF86Reply NoSymbol XF86Reply
|
||||||
|
keycode 241 = XF86MailForward NoSymbol XF86MailForward
|
||||||
|
keycode 242 = XF86Save NoSymbol XF86Save
|
||||||
|
keycode 243 = XF86Documents NoSymbol XF86Documents
|
||||||
|
keycode 244 = XF86Battery NoSymbol XF86Battery
|
||||||
|
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth
|
||||||
|
keycode 246 = XF86WLAN NoSymbol XF86WLAN
|
||||||
|
keycode 247 =
|
||||||
|
keycode 248 = XF86Display NoSymbol XF86Display
|
||||||
|
keycode 249 =
|
||||||
|
keycode 250 =
|
||||||
|
keycode 251 =
|
||||||
|
keycode 252 =
|
||||||
|
keycode 253 =
|
||||||
|
keycode 254 = XF86WWAN NoSymbol XF86WWAN
|
||||||
|
keycode 255 = XF86RFKill NoSymbol XF86RFKill
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* =~/.xinitrc=
|
* =~/.xinitrc=
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args: :tangle ~/.xinitrc
|
:header-args: :tangle ~/.xinitrc
|
||||||
@@ -77,12 +352,12 @@ dbus-update-activation-environment --systemd DISPLAY
|
|||||||
|
|
||||||
Fix for Matlab.
|
Fix for Matlab.
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
# export _JAVA_AWT_WM_NONREPARENTING=1
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Set =DISPLAY= for =dunst= when started with =systemd=.
|
Set =DISPLAY= for =dunst= when started with =systemd=.
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
# systemctl --user import-environment DISPLAY
|
systemctl --user import-environment DISPLAY
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Merge in defaults and keymaps
|
Merge in defaults and keymaps
|
||||||
@@ -143,7 +418,7 @@ setxkbmap -layout us -variant intl -option caps:escape &
|
|||||||
Start programs related to display:
|
Start programs related to display:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
# Screen options
|
# Screen options
|
||||||
xrandr --output eDP-1 --mode 1920x1200 --dpi 192 &
|
xrandr --output eDP1 --mode 1920x1080 --dpi 192 &
|
||||||
|
|
||||||
# Set random wallpaper
|
# Set random wallpaper
|
||||||
setbg ~/.local/data/wallpapers/ &
|
setbg ~/.local/data/wallpapers/ &
|
||||||
@@ -153,7 +428,7 @@ pgrep -xu "$USER" unclutter >/dev/null || \
|
|||||||
unclutter --timeout 5 &
|
unclutter --timeout 5 &
|
||||||
|
|
||||||
# Autolock screen after x minutes
|
# Autolock screen after x minutes
|
||||||
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||||
|
|
||||||
# Redshift
|
# Redshift
|
||||||
pgrep -xu "$USER" redshift >/dev/null || \
|
pgrep -xu "$USER" redshift >/dev/null || \
|
||||||
@@ -161,9 +436,6 @@ pgrep -xu "$USER" redshift >/dev/null || \
|
|||||||
|
|
||||||
# Run Picom (compositor)
|
# Run Picom (compositor)
|
||||||
picom --daemon &
|
picom --daemon &
|
||||||
|
|
||||||
# Network Manager Applet
|
|
||||||
nm-applet &
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Manually start =mopidy= as it seems to not start automatically:
|
Manually start =mopidy= as it seems to not start automatically:
|
||||||
@@ -172,6 +444,36 @@ Manually start =mopidy= as it seems to not start automatically:
|
|||||||
mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
|
mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Configuration for the HUION Inspiroy Ink H320M graphical tablet ([[file:tablet.org][Tablet config]]):
|
||||||
|
#+begin_src bash
|
||||||
|
# Lock cursor in first display. Change HEAD number to use a different displace
|
||||||
|
#xsetwacom set "HUION Huion Tablet_H320M Pen stylus" MapToOutput "HEAD-0"
|
||||||
|
|
||||||
|
# Pen Buttons
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pen stylus" button 1 1 # Left click
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pen stylus" button 2 2 # Right click
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pen stylus" button 3 3 # Middle click
|
||||||
|
|
||||||
|
# Tablet Buttons
|
||||||
|
|
||||||
|
# Top Buttons
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 1 key Ctrl T # Tools
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 2 key Ctrl Shift A # Hand Tool
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 3 key Ctrl Shift D # Default Tool
|
||||||
|
|
||||||
|
# Round Buttons (Top, Bottom, Middle, Left, Right)
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 8 key Ctrl Shift + # Zoom
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 9 key Ctrl - # Unzoom
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 10 key Ctrl S # Save
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 11 key Ctrl Z # Undo
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 12 key Ctrl Shift Z # Redo
|
||||||
|
|
||||||
|
# Bottom Buttons
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 13 key Ctrl Shift O # Select
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 14 key Ctrl # Ctrl (Color Picker, Zoom)
|
||||||
|
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 15 key Ctrl Q # Quit
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Finally, run SXHKD for the key bindings:
|
Finally, run SXHKD for the key bindings:
|
||||||
#+begin_src bash
|
#+begin_src bash
|
||||||
# Start sxhkd
|
# Start sxhkd
|
||||||
|
Reference in New Issue
Block a user