Compare commits
38 Commits
master
...
19a927c9ea
Author | SHA1 | Date | |
---|---|---|---|
19a927c9ea | |||
26b62b7221 | |||
e14d64dee2 | |||
4632b61c8f | |||
4ed8b8db4b | |||
c718e9be40 | |||
1921f804d4 | |||
acd7f1f95c | |||
dfe44e14af | |||
1a60a9c9a1 | |||
95b7f5c2f6 | |||
4c714c565e | |||
198485f6d6 | |||
a5e999a419 | |||
6575b0c6f9 | |||
a05ff529e2 | |||
764fd0e0dc | |||
10eeb3efc8 | |||
d27cb83bb3 | |||
a73e30d9cd | |||
05f316edeb | |||
a480eb56b0 | |||
b38b5e3da1 | |||
6ece088848 | |||
f23b158a0a | |||
bcb0c53079 | |||
b1de90b743 | |||
2c108d1682 | |||
d9c67c34f7 | |||
dcd0d1f54f | |||
4a4cfd7dda | |||
78cadd323d | |||
29b44b8bbe | |||
09976d2967 | |||
f645553b0d | |||
35731ccd7b | |||
0d5b369a8e | |||
c4aab2d858 |
@@ -53,25 +53,6 @@ MimeType=message/rfc822;x-scheme-handler/mailto;application/x-xpinstall;
|
||||
StartupNotify=true
|
||||
#+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
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.local/share/applications/matlab.desktop
|
||||
@@ -82,7 +63,7 @@ Version=R2020b
|
||||
Type=Application
|
||||
Terminal=false
|
||||
MimeType=text/x-matlab
|
||||
Exec=/usr/local/MATLAB/R2020b/bin/matlab -desktop
|
||||
Exec=/home/thomas/.local/bin/matlab -desktop
|
||||
Name=MATLAB
|
||||
Icon=matlab
|
||||
Categories=Development;Math;Science
|
||||
@@ -166,17 +147,6 @@ Terminal=false
|
||||
Categories=Utility;TextEditor;
|
||||
#+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
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.local/share/applications/qutebrowser.desktop
|
||||
|
30
bash.org
30
bash.org
@@ -21,7 +21,8 @@
|
||||
|
||||
** FZF
|
||||
#+begin_src bash
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
. /usr/share/doc/fzf/examples/completion.bash
|
||||
. /usr/share/doc/fzf/examples/key-bindings.bash
|
||||
#+end_src
|
||||
|
||||
** Ignore case for auto-completion
|
||||
@@ -116,6 +117,11 @@ alias :e=nvim
|
||||
alias path='echo -e ${PATH//:/\\n}'
|
||||
#+END_SRC
|
||||
|
||||
*** Other
|
||||
#+begin_src bash
|
||||
alias fd="fdfind"
|
||||
#+end_src
|
||||
|
||||
** Functions
|
||||
*** =colors= - Display colors
|
||||
#+BEGIN_SRC bash
|
||||
@@ -189,25 +195,6 @@ function nullify() {
|
||||
}
|
||||
#+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
|
||||
Undocumented feature which sets the size to "unlimited". http://stackoverflow.com/questions/9457233/unlimited-bash-history
|
||||
|
||||
@@ -327,6 +314,9 @@ PATH=$HOME/appimages:$PATH
|
||||
PATH=$HOME/.gem/ruby/2.5.0/bin:$PATH
|
||||
PATH=$GOPATH:$GOPATH/bin:$PATH
|
||||
PATH=~/.config/emacs/bin:$PATH
|
||||
PATH=~/.local/bin:$PATH
|
||||
PATH=~/.npm-global/bin:$PATH
|
||||
PATH=~/miniconda3/bin:$PATH
|
||||
export PATH
|
||||
#+END_SRC
|
||||
|
||||
|
@@ -5,6 +5,15 @@
|
||||
#+PROPERTY: header-args:bash+ :shebang "#!/usr/bin/env bash"
|
||||
#+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
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: remote-desktop
|
||||
@@ -13,59 +22,75 @@
|
||||
#+begin_src bash :tangle ~/.local/bin/remote-desktop
|
||||
computer=$(echo -e 'RNICE\nPCDEHAEZE\nPCNASS1' | rofi -dmenu -no-custom -p 'Computer:' -l 20);
|
||||
|
||||
dunstify --replace=89891 'Rdesktop' "Connection to ${computer}..."
|
||||
if [[ -z "$computer" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $computer in
|
||||
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:$(pass esrf.fr/dehaeze | sed -n 1p) /v:PCDEHAEZE.esrf.fr > /tmp/freerdp_pcdehaeze.log 2>&1 &
|
||||
;;
|
||||
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:$(pass esrf.fr/dehaeze | sed -n 1p) /v:PCNASS1.esrf.fr > /tmp/freerdp_pcnass1.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
|
||||
notify-send 'Rdesktop' "Connection to ${computer}..."
|
||||
|
||||
proxy_arg=""
|
||||
if [ -z "$(timeout 1s dig +short proxy.esrf.fr.)" ]; then
|
||||
proxy_arg="/proxy:socks5://localhost:8080"
|
||||
fi
|
||||
|
||||
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 &
|
||||
#+end_src
|
||||
|
||||
* =mount-dir= - Mount/Unmout directories
|
||||
#+begin_src text :tangle no
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
homelab:/srv/storage/ /home/thomas/mnt/NAS fuse.sshfs noauto,allow_other,default_permissions 0 0
|
||||
homelab:/srv/storage/ /home/thomas/mnt/homelab 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>
|
||||
dehaeze@rnice:/tmp_14_days/ /home/thomas/mnt/ESRF fuse.sshfs noauto,allow_other,default_permissions 0 0
|
||||
dehaeze@rnice:/tmp_14_days/ /home/thomas/mnt/tmp_14_days 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>
|
||||
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
|
||||
|
||||
#+begin_src bash :tangle ~/.local/bin/mount-dir
|
||||
drive=$(echo -e 'ESRF\nNAS' | rofi -dmenu -no-custom -p 'Drive:' -l 20);
|
||||
if [ $# -eq 0 ]; then
|
||||
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
|
||||
umount "/home/thomas/mnt/$drive" && \
|
||||
dunstify --replace=58249 "$drive " 'Successfully unmounted' || \
|
||||
dunstify --replace=58249 --urgency=critical "$drive " 'Error while unmounted'
|
||||
notify-send "$drive " 'Successfully unmounted' || \
|
||||
notify-send --urgency=critical "$drive " 'Error while unmounted'
|
||||
else
|
||||
echo "It's not mounted."
|
||||
mount "/home/thomas/mnt/$drive" && \
|
||||
dunstify --replace=58249 "$drive " 'Successfully mounted' || \
|
||||
dunstify --replace=58249 --urgency=critical "$drive " 'Error while mounted'
|
||||
notify-send "$drive " 'Successfully mounted' || \
|
||||
notify-send --urgency=critical "$drive " 'Error while mounted'
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
|
||||
* =screen-select= - Xrandr pre-defined scripts
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: screen-select
|
||||
:END:
|
||||
|
||||
#+begin_src bash :tangle ~/.local/bin/screen-select
|
||||
option=$(echo -e "Work\nXPS\nHome" | rofi -i -dmenu)
|
||||
option=$(echo -e "Work\nLaptop\nHome" | rofi -dmenu -no-custom -p 'Screen:' -l 20)
|
||||
|
||||
if [[ -z "$option" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
after_screen_change () {
|
||||
# Fix background if screen size/arangement has changed.
|
||||
@@ -83,15 +108,15 @@ after_screen_change () {
|
||||
|
||||
case "$option" in
|
||||
"Work")
|
||||
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 && \
|
||||
xrandr --output eDP-1 --off --output DP-3-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && \
|
||||
after_screen_change
|
||||
;;
|
||||
"XPS")
|
||||
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 && \
|
||||
"Laptop")
|
||||
xrandr --output DP-1-2 --off --output eDP-1 --primary --mode 1920x1200 --pos 0x0 --rotate normal && \
|
||||
after_screen_change
|
||||
;;
|
||||
"Home")
|
||||
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 && \
|
||||
xrandr --output eDP-1 --off --output DP-3-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && \
|
||||
after_screen_change
|
||||
;;
|
||||
,*)
|
||||
@@ -102,70 +127,22 @@ esac
|
||||
exit 0
|
||||
#+end_src
|
||||
|
||||
* =print-rnice= - Print on Rnice
|
||||
* =print-esrf= - Print on Rnice
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: print-rnice
|
||||
:CUSTOM_ID: print-esrf
|
||||
:END:
|
||||
|
||||
#+begin_src bash :tangle ~/.local/bin/print-rnice
|
||||
#+begin_src bash :tangle ~/.local/bin/print-esrf
|
||||
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);
|
||||
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);
|
||||
|
||||
# First copy the file to Rnice
|
||||
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"
|
||||
if [[ -z "$nbpage" || -z "$side" || -z "$media" || -z "$printer" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
* =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
|
||||
lpr -o media=$media -o sides=$sides -o number-up=$nbpage -P $printer "$1";
|
||||
#+end_src
|
||||
|
||||
* =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}')
|
||||
|
||||
kill -15 $pid && \
|
||||
dunstify "Kill" "$name (PID $pid)" &
|
||||
notify-send "Kill" "$name (PID $pid)" &
|
||||
fi
|
||||
|
||||
#+end_src
|
||||
@@ -152,358 +152,18 @@ tmpfile="/tmp/vpnstatus";
|
||||
|
||||
if [[ $(nordvpn status) == *"Connected"* ]]; then
|
||||
nordvpn disconnect && \
|
||||
dunstify --replace=23198 "VPN" "Disconnected" && \
|
||||
notify-send "VPN" "Disconnected" && \
|
||||
echo "off" > $tmpfile;
|
||||
else
|
||||
# Select Country to connect to
|
||||
country=`cat ~/.local/data/nordvpn_countries.txt | rofi -i -dmenu | sed 's/\s/_/g'`;
|
||||
dunstify --replace=23198 "VPN" "Connecting to $country...";
|
||||
notify-send "VPN" "Connecting to $country...";
|
||||
nordvpn connect $country && \
|
||||
dunstify --replace=23198 "VPN" "Connected to $country" && \
|
||||
notify-send "VPN" "Connected to $country" && \
|
||||
echo "on" > $tmpfile;
|
||||
fi
|
||||
#+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, ...
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: i3exit
|
||||
@@ -567,6 +227,15 @@ rofi -dmenu \
|
||||
-p "$(printf "$1" | sed s/://)"
|
||||
#+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
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: screenshot
|
||||
@@ -715,7 +384,7 @@ if [ -n "$1" ]; then
|
||||
xdotool key Shift+Insert
|
||||
else
|
||||
echo "$chosen" | tr -d '\n' | xsel -ib
|
||||
dunstify "'$chosen' copied to clipboard." &
|
||||
notify-send "'$chosen' copied to clipboard." &
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -739,7 +408,7 @@ if [ -n "$1" ]; then
|
||||
xdotool key Shift+Insert
|
||||
else
|
||||
echo "$chosen" | tr -d '\n' | xsel -ib
|
||||
dunstify "'$chosen' copied to clipboard." &
|
||||
notify-send "'$chosen' copied to clipboard." &
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -850,8 +519,8 @@ if [ $TMUX ]; then
|
||||
tmux split -v -l 1 "curl --progress-bar -F\"file=@$1\" https://0x0.st | xsel -ib;" && tmux select-pane -U
|
||||
else
|
||||
curl --progress-bar -F"file=@$1" https://0x0.st | xsel -ib && \
|
||||
dunstify 'Upload' 'Successful' || \
|
||||
dunstify --urgency=critical 'Upload' 'Failed'
|
||||
notify-send 'Upload' 'Successful' || \
|
||||
notify-send --urgency=critical 'Upload' 'Failed'
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -914,8 +583,8 @@ fi
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
doi2bib $doi | xsel -ib && \
|
||||
dunstify 'BibTeX' 'Copied to Clipboard' || \
|
||||
dunstify --urgency=critical 'BibTeX' 'Failed'
|
||||
notify-send 'BibTeX' 'Copied to Clipboard' || \
|
||||
notify-send --urgency=critical 'BibTeX' 'Failed'
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -1575,10 +1244,9 @@ fi
|
||||
|
||||
# Send the password to the clipboard
|
||||
printf "$pass" | xclip -sel clip && \
|
||||
dunstify 'Password' 'Generated'
|
||||
notify-send 'Password' 'Generated'
|
||||
#+end_src
|
||||
|
||||
|
||||
* =sxhkd-help= - List of keybindings using Rofi
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sxhkd-help
|
||||
|
@@ -21,7 +21,7 @@ conflict_resolution = "a wins"
|
||||
type = "caldav"
|
||||
url = "https://radicale.tdehaeze.xyz/tdehaeze/"
|
||||
username = "tdehaeze"
|
||||
password = "<<get-password(passname='radicale.tdehaeze.xyz/tdehaeze')>>"
|
||||
password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
|
||||
|
||||
[storage radicale_calendar_local]
|
||||
type = "filesystem"
|
||||
@@ -38,7 +38,7 @@ conflict_resolution = "a wins"
|
||||
type = "caldav"
|
||||
url = "https://calendar.esrf.fr/egroupware/groupdav.php/calendar"
|
||||
username = "dehaeze"
|
||||
password = "<<get-password(passname='esrf.fr/dehaeze')>>"
|
||||
password.fetch = ["command", "get-pass", "esrf.fr/dehaeze"]
|
||||
|
||||
[storage esrf_calendar_local]
|
||||
type = "filesystem"
|
||||
@@ -60,7 +60,7 @@ fileext = ".vcf"
|
||||
type = "carddav"
|
||||
url = "https://radicale.tdehaeze.xyz/tdehaeze/"
|
||||
username = "tdehaeze"
|
||||
password = "<<get-password(passname='radicale.tdehaeze.xyz/tdehaeze')>>"
|
||||
password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
|
||||
#+END_SRC
|
||||
|
||||
* =khal= - CLI calendar application
|
||||
@@ -188,7 +188,7 @@ if [[ -f $1 ]]; then
|
||||
exit;
|
||||
fi
|
||||
khal import -a "$calendar" --batch $1 && \
|
||||
dunstify "Calendar" "Even added";
|
||||
notify-send --hint=string:x-dunst-stack-tag:fJeNG8gc "Calendar" "Even added";
|
||||
fi
|
||||
fi
|
||||
#+end_src
|
||||
|
116
config.org
116
config.org
@@ -2,38 +2,41 @@
|
||||
#+SETUPFILE: ./setup/org-setup-file.org
|
||||
|
||||
* SSH
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.ssh/config
|
||||
:header-args+: :comments none :mkdirp yes
|
||||
:END:
|
||||
|
||||
#+begin_src conf :noweb yes
|
||||
#+begin_src conf :noweb yes :tangle ~/.ssh/config :comments none :mkdirp yes
|
||||
AddKeysToAgent yes
|
||||
|
||||
Host *
|
||||
ControlMaster auto
|
||||
ControlPath ~/.ssh/master-%r@%h:%p.socket
|
||||
|
||||
Host homelab
|
||||
hostname <<get-password(passname="ip/homelab")>>
|
||||
Port 22
|
||||
user thomas
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
|
||||
Host router
|
||||
hostname 192.168.1.1
|
||||
Port 22
|
||||
user root
|
||||
Host *.esrf.fr
|
||||
User dehaeze
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
|
||||
Host smarttv
|
||||
hostname 192.168.1.73
|
||||
Port 22
|
||||
user thomas
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
Host firewall.esrf.fr
|
||||
Port 5022
|
||||
Compression yes
|
||||
|
||||
Host oneplus
|
||||
hostname 192.168.1.101
|
||||
Port 8022
|
||||
Match host *.esrf.fr !host firewall.esrf.fr !exec "~/.ssh/esrf-test"
|
||||
ProxyJump firewall.esrf.fr
|
||||
|
||||
|
||||
Host rnice
|
||||
Port 22
|
||||
user dehaeze
|
||||
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)
|
||||
test -n "$(timeout 1s dig +short proxy.esrf.fr.)"
|
||||
#+end_src
|
||||
|
||||
* Font
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/fontconfig/fonts.conf
|
||||
@@ -721,84 +724,7 @@ include "/usr/share/X11/locale/en_US.UTF-8/Compose"
|
||||
It is very important that =~/.netrc= as =600= permissions.
|
||||
|
||||
#+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
|
||||
login tdehaeze
|
||||
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
|
||||
|
||||
* =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">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-11-03 mer. 10:59 -->
|
||||
<!-- 2021-10-25 lun. 14:33 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>Bash Configuration</title>
|
||||
<meta name="author" content="Dehaeze Thomas" />
|
||||
@@ -563,7 +563,7 @@ Enable the keyring for applications run through the terminal
|
||||
<h4 id="org2895615">Linkding</h4>
|
||||
<div class="outline-text-4" id="text-org2895615">
|
||||
<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-sh-quoted-exec">`pass nas/linkding_url`</span>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
@@ -678,7 +678,7 @@ Don’t echo <code>^C</code> after <code>Ctrl+C</code> is pressed.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-11-03 mer. 10:59 -->
|
||||
<!-- 2021-10-25 lun. 14:33 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>My own specific binaries</title>
|
||||
<meta name="author" content="Dehaeze Thomas" />
|
||||
@@ -23,12 +23,13 @@
|
||||
<div id="text-table-of-contents" role="doc-toc">
|
||||
<ul>
|
||||
<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="#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="#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="#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="#readbib"><code>readbib</code> - Open Bibliography File</a></li>
|
||||
<li><a href="#readnotes"><code>readnotes</code> - Open Note</a></li>
|
||||
@@ -40,19 +41,22 @@
|
||||
<h2 id="remote-desktop"><code>remote-desktop</code> - Remote Desktop Connect</h2>
|
||||
<div class="outline-text-2" id="text-remote-desktop">
|
||||
<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\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>;
|
||||
<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>;
|
||||
|
||||
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>
|
||||
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> 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> &
|
||||
PCMEL1)
|
||||
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;
|
||||
;;
|
||||
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)
|
||||
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> &
|
||||
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;
|
||||
;;
|
||||
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> 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> &
|
||||
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;
|
||||
;;
|
||||
*)
|
||||
<span class="org-type">echo</span> <span class="org-string">"Not existing"</span> && <span class="org-sh-escaped-newline">\</span>
|
||||
@@ -64,91 +68,13 @@ dunstify --replace=<span class="org-highlight-numbers-number">89891</span> <span
|
||||
</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">
|
||||
<h2 id="print-rnice"><code>print-rnice</code> - Print on Rnice</h2>
|
||||
<div class="outline-text-2" id="text-print-rnice">
|
||||
<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> | 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> | 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> | 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>;
|
||||
<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>;
|
||||
<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">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-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>
|
||||
@@ -163,6 +89,59 @@ dehaeze@rnice:/tmp_14_days/ /home/thomas/mnt/ESRF fuse.sshfs noauto,allow_ot
|
||||
</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">
|
||||
<h2 id="torrent-add"><code>torrent-add</code> - Download Torrent</h2>
|
||||
<div class="outline-text-2" id="text-torrent-add">
|
||||
@@ -205,6 +184,50 @@ Script used to convert a figure drawn on my Boox note2 to a png file that can th
|
||||
</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">
|
||||
<h2 id="color-picker"><code>color-picker</code> - Pick color and copy to clipboard</h2>
|
||||
<div class="outline-text-2" id="text-color-picker">
|
||||
@@ -245,7 +268,7 @@ List all <code>pdf</code> files and open selected one with zathura.
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-11-03 mer. 10:59 -->
|
||||
<!-- 2021-10-25 lun. 14:33 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>Home Server</title>
|
||||
<meta name="author" content="Dehaeze Thomas" />
|
||||
@@ -84,7 +84,6 @@
|
||||
<li><a href="#orgcdbaa2f"><code>config.yml</code></a></li>
|
||||
</ul>
|
||||
</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>
|
||||
<ul>
|
||||
<li><a href="#org268eb95"><code>snapraid.conf</code></a></li>
|
||||
@@ -99,12 +98,12 @@
|
||||
<li><a href="#org1932d9e"><code>wikijs</code> - Wiki App (link)</a></li>
|
||||
<li><a href="#org41419ce"><code>research</code> - Research Pages (link)</a>
|
||||
<ul>
|
||||
<li><a href="#orgfc0a576"><code>Caddyfile</code></a></li>
|
||||
<li><a href="#org842c7ec"><code>Caddyfile</code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org6319523"><code>dotfiles</code> - Dotfiles (link)</a>
|
||||
<ul>
|
||||
<li><a href="#org7233c2e"><code>Caddyfile</code></a></li>
|
||||
<li><a href="#orgfc0a576"><code>Caddyfile</code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org56db687"><code>hugo</code> - Wiki + Blog (link)</a></li>
|
||||
@@ -1321,35 +1320,6 @@ In order to have notifications on Linux desktop use <a href="https://github.com/
|
||||
</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">
|
||||
<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">
|
||||
@@ -1718,9 +1688,9 @@ exclude .AppleDB
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgfc0a576" class="outline-4">
|
||||
<h4 id="orgfc0a576"><code>Caddyfile</code></h4>
|
||||
<div class="outline-text-4" id="text-orgfc0a576">
|
||||
<div id="outline-container-org842c7ec" class="outline-4">
|
||||
<h4 id="org842c7ec"><code>Caddyfile</code></h4>
|
||||
<div class="outline-text-4" id="text-org842c7ec">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-conf">0.0.0.0:<span class="org-highlight-numbers-number">2015</span> {
|
||||
root /srv/www/
|
||||
@@ -1769,9 +1739,9 @@ exclude .AppleDB
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7233c2e" class="outline-4">
|
||||
<h4 id="org7233c2e"><code>Caddyfile</code></h4>
|
||||
<div class="outline-text-4" id="text-org7233c2e">
|
||||
<div id="outline-container-orgfc0a576" class="outline-4">
|
||||
<h4 id="orgfc0a576"><code>Caddyfile</code></h4>
|
||||
<div class="outline-text-4" id="text-orgfc0a576">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-conf">0.0.0.0:<span class="org-highlight-numbers-number">2015</span> {
|
||||
root /srv/www/docs/
|
||||
@@ -1966,12 +1936,12 @@ exclude .AppleDB
|
||||
- PUID=$PUID
|
||||
- PGID=$PGID
|
||||
- TZ=$TZ
|
||||
<span class="org-comment-delimiter"># </span><span class="org-comment">group_add:</span>
|
||||
<span class="org-comment-delimiter"># </span><span class="org-comment">- 122</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">- /dev/dri/renderD128:/dev/dri/renderD128</span>
|
||||
<span class="org-comment-delimiter"># </span><span class="org-comment">- /dev/dri/card0:/dev/dri/card0</span>
|
||||
<span class="org-variable-name">group-add</span>:
|
||||
- 109
|
||||
<span class="org-variable-name">devices</span>:
|
||||
<span class="org-comment-delimiter"># </span><span class="org-comment">VAAPI Devices</span>
|
||||
- /dev/dri/renderD128:/dev/dri/renderD128
|
||||
- /dev/dri/card0:/dev/dri/card0
|
||||
<span class="org-variable-name">ports</span>:
|
||||
- 8096:8096
|
||||
<span class="org-variable-name">labels</span>:
|
||||
@@ -2582,7 +2552,7 @@ Type <code>crontab -e</code> and add this line:
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-11-03 mer. 10:59 -->
|
||||
<!-- 2021-10-25 lun. 14:33 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>Qutebrowser Configuration</title>
|
||||
<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 id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-11-03 mer. 10:59 -->
|
||||
<!-- 2021-06-20 dim. 14:21 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>Ranger</title>
|
||||
<meta name="author" content="Dehaeze Thomas" />
|
||||
@@ -16,13 +16,13 @@
|
||||
<a accesskey="h" href="./index.html"> UP </a>
|
||||
|
|
||||
<a accesskey="H" href="./index.html"> HOME </a>
|
||||
</div><div id="content" class="content">
|
||||
</div><div id="content">
|
||||
<h1 class="title">Ranger</h1>
|
||||
<div id="table-of-contents" role="doc-toc">
|
||||
<div id="table-of-contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents" role="doc-toc">
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#org1462e63">Documentation</a></li>
|
||||
<li><a href="#org55987ce">Documentation</a></li>
|
||||
<li><a href="#org986b109">Config</a>
|
||||
<ul>
|
||||
<li><a href="#orgd97cb82">Options</a></li>
|
||||
@@ -39,7 +39,7 @@
|
||||
</li>
|
||||
<li><a href="#orgd57ea4e">Define keys for the browser</a>
|
||||
<ul>
|
||||
<li><a href="#orgef5af30">Basic</a></li>
|
||||
<li><a href="#orgf964ebf">Basic</a></li>
|
||||
<li><a href="#org1c6f91a">Open Shell in current directory</a></li>
|
||||
<li><a href="#orgdf72b75">Open With</a></li>
|
||||
<li><a href="#org8e148cf">Filter</a></li>
|
||||
@@ -63,7 +63,7 @@
|
||||
</li>
|
||||
<li><a href="#org7e7a4ec">Define keys for the console</a>
|
||||
<ul>
|
||||
<li><a href="#org253669c">Basic</a></li>
|
||||
<li><a href="#orgef5af30">Basic</a></li>
|
||||
<li><a href="#orga9f3972">Move around</a></li>
|
||||
<li><a href="#org6265874">Line Editing</a></li>
|
||||
</ul>
|
||||
@@ -72,7 +72,7 @@
|
||||
</li>
|
||||
<li><a href="#rifle">Rifle</a>
|
||||
<ul>
|
||||
<li><a href="#org10a01f1">Documentation</a></li>
|
||||
<li><a href="#org1462e63">Documentation</a></li>
|
||||
<li><a href="#org64e62ab">Text Files</a></li>
|
||||
<li><a href="#org72831a4">PDF, Epub and jdvu</a></li>
|
||||
<li><a href="#org2c35566">Archives</a></li>
|
||||
@@ -94,9 +94,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1462e63" class="outline-2">
|
||||
<h2 id="org1462e63">Documentation</h2>
|
||||
<div class="outline-text-2" id="text-org1462e63">
|
||||
<div id="outline-container-org55987ce" class="outline-2">
|
||||
<h2 id="org55987ce">Documentation</h2>
|
||||
<div class="outline-text-2" id="text-org55987ce">
|
||||
<blockquote>
|
||||
<p>
|
||||
%f the highlighted file
|
||||
@@ -378,9 +378,9 @@ Backup to NAS:
|
||||
<div class="outline-text-4" id="text-org7681c16">
|
||||
<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>
|
||||
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
|
||||
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
|
||||
<span class="org-keyword">else</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>
|
||||
atool -x $<span class="org-highlight-numbers-number">1</span>
|
||||
<span class="org-keyword">fi</span>
|
||||
</pre>
|
||||
</div>
|
||||
@@ -392,9 +392,9 @@ Backup to NAS:
|
||||
<div class="outline-text-4" id="text-orgd110a48">
|
||||
<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>
|
||||
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
|
||||
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
|
||||
<span class="org-keyword">else</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>
|
||||
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>
|
||||
<span class="org-keyword">fi</span>
|
||||
</pre>
|
||||
</div>
|
||||
@@ -406,7 +406,7 @@ Backup to NAS:
|
||||
<h4 id="org4e182ba">Copy File Content</h4>
|
||||
<div class="outline-text-4" id="text-org4e182ba">
|
||||
<div class="org-src-container">
|
||||
<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 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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -455,9 +455,9 @@ Backup to NAS:
|
||||
<h3 id="orgd57ea4e">Define keys for the browser</h3>
|
||||
<div class="outline-text-3" id="text-orgd57ea4e">
|
||||
</div>
|
||||
<div id="outline-container-orgef5af30" class="outline-4">
|
||||
<h4 id="orgef5af30">Basic</h4>
|
||||
<div class="outline-text-4" id="text-orgef5af30">
|
||||
<div id="outline-container-orgf964ebf" class="outline-4">
|
||||
<h4 id="orgf964ebf">Basic</h4>
|
||||
<div class="outline-text-4" id="text-orgf964ebf">
|
||||
<div class="org-src-container">
|
||||
<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>)
|
||||
@@ -770,9 +770,9 @@ map <span class="org-string">'<any> enter_bookmark %any</span>
|
||||
<h3 id="org7e7a4ec">Define keys for the console</h3>
|
||||
<div class="outline-text-3" id="text-org7e7a4ec">
|
||||
</div>
|
||||
<div id="outline-container-org253669c" class="outline-4">
|
||||
<h4 id="org253669c">Basic</h4>
|
||||
<div class="outline-text-4" id="text-org253669c">
|
||||
<div id="outline-container-orgef5af30" class="outline-4">
|
||||
<h4 id="orgef5af30">Basic</h4>
|
||||
<div class="outline-text-4" id="text-orgef5af30">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-conf">cmap <tab> eval fm.ui.console.tab()
|
||||
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>
|
||||
|
||||
<div id="outline-container-org10a01f1" class="outline-3">
|
||||
<h3 id="org10a01f1">Documentation</h3>
|
||||
<div class="outline-text-3" id="text-org10a01f1">
|
||||
<div id="outline-container-org1462e63" class="outline-3">
|
||||
<h3 id="org1462e63">Documentation</h3>
|
||||
<div class="outline-text-3" id="text-org1462e63">
|
||||
<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>
|
||||
<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 id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||
<p class="date">Created: 2021-06-20 dim. 14:21</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2021-11-03 mer. 10:59 -->
|
||||
<!-- 2021-10-25 lun. 14:33 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>Windows Config and Install</title>
|
||||
<meta name="author" content="Dehaeze Thomas" />
|
||||
@@ -26,10 +26,10 @@
|
||||
<li><a href="#org0143940">Install Windows10 PRO</a></li>
|
||||
<li><a href="#org0cc05f7">Install Software using Chocolatey</a></li>
|
||||
<li><a href="#org0a94edb">Debloat windows10</a></li>
|
||||
<li><a href="#org1c09272">SSHFS</a>
|
||||
<li><a href="#org9192414">SSHFS</a>
|
||||
<ul>
|
||||
<li><a href="#org46e6091">SSH Setup</a></li>
|
||||
<li><a href="#org9192414">SSHFS</a></li>
|
||||
<li><a href="#org432cd75">SSHFS</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<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:
|
||||
</p>
|
||||
<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 imageglass
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,9 +103,9 @@ Run a PowerShell with administrative rights and run:
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1c09272" class="outline-2">
|
||||
<h2 id="org1c09272">SSHFS</h2>
|
||||
<div class="outline-text-2" id="text-org1c09272">
|
||||
<div id="outline-container-org9192414" class="outline-2">
|
||||
<h2 id="org9192414">SSHFS</h2>
|
||||
<div class="outline-text-2" id="text-org9192414">
|
||||
</div>
|
||||
<div id="outline-container-org46e6091" class="outline-3">
|
||||
<h3 id="org46e6091">SSH Setup</h3>
|
||||
@@ -159,9 +159,9 @@ Finally, it should be possible to ssh to the server.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org9192414" class="outline-3">
|
||||
<h3 id="org9192414">SSHFS</h3>
|
||||
<div class="outline-text-3" id="text-org9192414">
|
||||
<div id="outline-container-org432cd75" class="outline-3">
|
||||
<h3 id="org432cd75">SSHFS</h3>
|
||||
<div class="outline-text-3" id="text-org432cd75">
|
||||
<p>
|
||||
Install <a href="https://github.com/billziss-gh/sshfs-win">sshfs-win</a>.
|
||||
</p>
|
||||
@@ -226,7 +226,7 @@ Then, Syncthing can be accessed with: <a href="http://localhost:8384/">http://lo
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2021-11-03 mer. 10:59</p>
|
||||
<p class="date">Created: 2021-10-25 lun. 14:33</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
188
doom.org
188
doom.org
@@ -12,11 +12,6 @@
|
||||
#+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
|
||||
|
||||
* Installation
|
||||
#+begin_src bash :tangle no
|
||||
yay -Ss aspell aspell-fr aspell-en
|
||||
#+end_src
|
||||
|
||||
* Introduction and Resources
|
||||
https://medium.com/urbint-engineering/emacs-doom-for-newbies-1f8038604e3b
|
||||
https://noelwelsh.com/posts/2019-01-10-doom-emacs.html
|
||||
@@ -241,7 +236,7 @@ Turn off auto-fill mode that add line breaks.
|
||||
** Spell Check
|
||||
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
|
||||
(setq ispell-dictionary "en_US")
|
||||
(setq ispell-dictionary "en")
|
||||
(setq ispell-program-name "aspell")
|
||||
#+end_src
|
||||
|
||||
@@ -290,8 +285,6 @@ Switch from one language to an other ([[https://stackoverflow.com/questions/4215
|
||||
|
||||
(after! magit
|
||||
(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)
|
||||
("Status" 7 magit-repolist-column-flag)
|
||||
("B<U" 3 magit-repolist-column-unpulled-from-upstream
|
||||
@@ -396,17 +389,25 @@ Disable flycheck for now with orgmode buffers:
|
||||
|
||||
** Ox-Hugo
|
||||
#+begin_src emacs-lisp
|
||||
(defun tdh-export-everything-to-hugo ()
|
||||
"Export all the .org files in the specified directory to markdown using Hugo"
|
||||
(interactive)
|
||||
(setq org-files (directory-files (read-directory-name "Directory:" "/home/thomas/Cloud/brain/") t "org$" t))
|
||||
;; (defun tdh-export-everything-to-hugo ()
|
||||
;; "Export all the .org files in the specified directory to markdown using Hugo"
|
||||
;; (interactive)
|
||||
;; (setq org-files (directory-files (read-directory-name "Directory:" "/home/thomas/Cloud/brain/") t "org$" t))
|
||||
|
||||
(while org-files
|
||||
(setq current-org-file (car org-files))
|
||||
(message "Exporting %s" current-org-file)
|
||||
(find-file current-org-file)
|
||||
(org-hugo-export-to-md)
|
||||
(setq org-files (cdr org-files))))
|
||||
;; (while org-files
|
||||
;; (setq current-org-file (car org-files))
|
||||
;; (message "Exporting %s" current-org-file)
|
||||
;; (find-file current-org-file)
|
||||
;; (org-hugo-export-to-md)
|
||||
;; (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
|
||||
|
||||
** Others
|
||||
@@ -721,10 +722,12 @@ This idea comes from [[https://blog.lambda.cx/posts/org-agenda-new-tab/][here]].
|
||||
:config (setq org-fancy-priorities-list '("■" "■" "■")))
|
||||
#+end_src
|
||||
|
||||
** Org Notification based on calendar event
|
||||
** TODO [#B] 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
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
- [ ] Issue with this part on ubuntu
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(after! org-agenda
|
||||
(setq appt-message-warning-time 5)
|
||||
(defun tdh-org-agenda-to-appt ()
|
||||
@@ -737,7 +740,7 @@ https://emacs.stackexchange.com/questions/3844/good-methods-for-setting-up-alarm
|
||||
(setq appt-disp-window-function 'tdh-appt-display)
|
||||
(setq appt-delete-window-function (lambda () t))
|
||||
|
||||
(setq tdh-appt-notification-app (concat (getenv "HOME") "/bin/appt-notification"))
|
||||
(setq tdh-appt-notification-app (concat (getenv "HOME") "/.local/bin/appt-notification"))
|
||||
(defun tdh-appt-display (min-to-app new-time msg)
|
||||
(if (atom min-to-app)
|
||||
(start-process "tdh-appt-notification-app" nil tdh-appt-notification-app min-to-app msg)
|
||||
@@ -747,11 +750,11 @@ https://emacs.stackexchange.com/questions/3844/good-methods-for-setting-up-alarm
|
||||
#+end_src
|
||||
|
||||
*** appt-notification script
|
||||
#+begin_src bash :tangle ~/.config/doom/bin/appt-notification :shebang "#!/usr/bin/env bash" :comments none :mkdirp yes
|
||||
#+begin_src bash :tangle ~/.local/bin/appt-notification :shebang "#!/usr/bin/env bash" :comments none :mkdirp yes
|
||||
TIME="$1"TODO
|
||||
MSG="$2"
|
||||
|
||||
dunstify --replace=85401 "Event in $TIME minutes" "$MSG"
|
||||
notify-send "Event in $TIME minutes" "$MSG"
|
||||
#+end_src
|
||||
|
||||
** Org Structure Template
|
||||
@@ -924,6 +927,17 @@ Do not export headline with the =:ignore:= tag:
|
||||
)
|
||||
#+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 Defaults
|
||||
#+begin_src emacs-lisp
|
||||
@@ -1854,14 +1868,6 @@ https://www.reddit.com/r/emacs/comments/d3a8or/pretty_org_tables_in_the_buffer_c
|
||||
)
|
||||
#+end_src
|
||||
|
||||
** Citeproc-Org
|
||||
#+begin_src emacs-lisp
|
||||
(use-package! citeproc-org
|
||||
:after ox-hugo
|
||||
:config
|
||||
(citeproc-org-setup))
|
||||
#+end_src
|
||||
|
||||
** Org Wild Notifier
|
||||
#+begin_src emacs-lisp
|
||||
(use-package! org-wild-notifier
|
||||
@@ -1925,8 +1931,6 @@ 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)
|
||||
(:desc "Insert Screenshot"
|
||||
:ni "C-c s" 'tdh-insert-screenshot-org-link)
|
||||
(:desc "Find Roam"
|
||||
:ni "C-c r" 'orb-find-non-ref-file)
|
||||
(:desc "Insert Roam"
|
||||
:ni "C-c R" 'orb-insert-non-ref)
|
||||
))
|
||||
@@ -2109,6 +2113,17 @@ Map Keys
|
||||
:n "F" 'tdh-automatic-latex-fragment-deactivate)))
|
||||
#+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=
|
||||
#+begin_src emacs-lisp
|
||||
(after! org
|
||||
@@ -2164,7 +2179,7 @@ Open HTML output externally
|
||||
Don't ask for confirmation when evaluating following blocs
|
||||
#+begin_src emacs-lisp
|
||||
(defun tdh-org-confirm-babel-evaluate (lang body)
|
||||
(not (member lang '("emacs-lisp" "latex" "matlab" "sh" "latex-macros" "python"))))
|
||||
(not (member lang '("emacs-lisp" "latex" "matlab" "sh" "latex-macros" "python" "ipython" "jupyter-python" "dot"))))
|
||||
|
||||
(after! org
|
||||
(setq org-confirm-babel-evaluate 'tdh-org-confirm-babel-evaluate))
|
||||
@@ -2212,7 +2227,6 @@ 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"))
|
||||
#+end_src
|
||||
|
||||
|
||||
** Org-Babel Matlab
|
||||
#+begin_src emacs-lisp
|
||||
(after! org
|
||||
@@ -2333,7 +2347,7 @@ yay -S mermaid-cli
|
||||
(use-package! ob-mermaid
|
||||
:after org
|
||||
:config
|
||||
(setq ob-mermaid-cli-path "/usr/bin/mmdc")
|
||||
(setq ob-mermaid-cli-path "/home/thomas/.npm-global/bin/mmdc")
|
||||
)
|
||||
#+end_src
|
||||
|
||||
@@ -2541,8 +2555,10 @@ This function:
|
||||
(if (string= lang "matlab")
|
||||
(if (region-active-p)
|
||||
(tdh-matlab-execute-selected (region-beginning) (region-end))
|
||||
(progn (tdh-org-babel-execute-matlab-background)
|
||||
(org-babel-next-src-block)))
|
||||
(progn (tdh-org-babel-execute-matlab-background)))
|
||||
(org-babel-next-src-block))
|
||||
(if (string= lang "jupyter-python")
|
||||
(org-babel-execute-maybe)
|
||||
(org-babel-next-src-block))
|
||||
)
|
||||
(org-babel-next-src-block)
|
||||
@@ -2602,12 +2618,21 @@ Org-Tangle and Org-Babel Jump to Tangle File
|
||||
(error "Cannot open tangle file %S" file)))))
|
||||
#+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
|
||||
#+begin_src emacs-lisp
|
||||
(after! org
|
||||
(map! :map org-mode-map
|
||||
(:prefix (",b" . "Tangle")
|
||||
:n "F" 'tdh-org-babel-jump-to-tangle-file
|
||||
:n "b" 'tdh-org-babel-tangle-block
|
||||
:n "T" 'tdh-org-babel-tangle-subtree)))
|
||||
#+end_src
|
||||
|
||||
@@ -2633,15 +2658,13 @@ Nice Functions:
|
||||
:init
|
||||
:config
|
||||
;; Folder where the notes files are located (or file if just one Note file)
|
||||
(setq org-ref-notes-directory "~/Cloud/brain")
|
||||
(setq org-ref-bibliography-notes "~/Cloud/brain")
|
||||
(setq bibtex-completion-notes-path "~/Cloud/brain/")
|
||||
|
||||
;; Bibliography File
|
||||
(setq reftex-default-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
||||
(setq org-ref-default-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
||||
(setq bibtex-completion-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
||||
|
||||
;; Folder where all the pdf are located
|
||||
(setq org-ref-pdf-directory "~/Cloud/pdfs")
|
||||
(setq bibtex-completion-library-path '("~/Cloud/pdfs/"))
|
||||
|
||||
(setq org-ref-bibliography-entry-format
|
||||
'(("article" . "%a, %t, %j, v(%n), %p (%y).")
|
||||
@@ -2663,20 +2686,20 @@ Nice Functions:
|
||||
;; Display information on the citation
|
||||
(setq org-ref-show-citation-on-enter t)
|
||||
|
||||
(add-to-list 'org-ref-helm-user-candidates
|
||||
'("Open pdf in Zathura" . (lambda () (call-process "zathura" nil 0 nil (concat
|
||||
(file-name-as-directory org-ref-pdf-directory)
|
||||
(car (org-ref-get-bibtex-key-and-file))
|
||||
".pdf"))))
|
||||
t)
|
||||
;; (add-to-list 'org-ref-helm-user-candidates
|
||||
;; '("Open pdf in Zathura" . (lambda () (call-process "zathura" nil 0 nil (concat
|
||||
;; (file-name-as-directory org-ref-pdf-directory)
|
||||
;; (car (org-ref-get-bibtex-key-and-file))
|
||||
;; ".pdf"))))
|
||||
;; t)
|
||||
|
||||
(add-to-list 'org-ref-helm-user-candidates
|
||||
'("Drag and Drop" . (lambda () (call-process "/bin/bash" nil 0 nil "-c" (concat
|
||||
"dragon-drag-and-drop "
|
||||
(file-name-as-directory org-ref-pdf-directory)
|
||||
(car (org-ref-get-bibtex-key-and-file))
|
||||
".pdf"))))
|
||||
t)
|
||||
;; (add-to-list 'org-ref-helm-user-candidates
|
||||
;; '("Drag and Drop" . (lambda () (call-process "/bin/bash" nil 0 nil "-c" (concat
|
||||
;; "dragon "
|
||||
;; (file-name-as-directory org-ref-pdf-directory)
|
||||
;; (car (org-ref-get-bibtex-key-and-file))
|
||||
;; ".pdf"))))
|
||||
;; t)
|
||||
|
||||
;; Let Mathjax deals with equation reference
|
||||
(defun org-ref-eqref-export (keyword desc format)
|
||||
@@ -2687,6 +2710,11 @@ Nice Functions:
|
||||
)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(after! org
|
||||
(require 'org-ref))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun tdh-org-ref-open-pdf-at-point ()
|
||||
"Open the pdf in external program for bibtex key under point if it exists."
|
||||
@@ -2826,12 +2854,10 @@ Re-Export all roam files.
|
||||
:init
|
||||
:config
|
||||
;; Bibliography file
|
||||
(setq bibtex-completion-bibliography '("~/Cloud/brain/biblio/references.bib"
|
||||
"~/Cloud/acoustic/resources/acoustics.bib"))
|
||||
(setq bibtex-completion-bibliography '("~/Cloud/brain/biblio/references.bib"))
|
||||
|
||||
;; Directory with all the pdfs
|
||||
(setq bibtex-completion-library-path '("~/Cloud/pdfs/"
|
||||
"~/Cloud/acoustic/resources/pdfs/"))
|
||||
(setq bibtex-completion-library-path '("~/Cloud/pdfs/"))
|
||||
|
||||
;; Directory with notes files
|
||||
(setq bibtex-completion-notes-path "~/Cloud/brain/")
|
||||
@@ -2947,13 +2973,6 @@ List all element of the bibliography without pdf associated
|
||||
)
|
||||
#+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]])
|
||||
Provides nice functions such as:
|
||||
- =orb-find-non-ref-file=
|
||||
@@ -2977,15 +2996,6 @@ Provides nice functions such as:
|
||||
(call-process "zathura" nil 0 nil (org-ref-get-pdf-filename key)))
|
||||
#+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
|
||||
#+begin_src emacs-lisp
|
||||
(after! bibtex
|
||||
@@ -2993,6 +3003,18 @@ Provides nice functions such as:
|
||||
:n "C-c c" 'org-ref-clean-bibtex-entry))
|
||||
#+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
|
||||
- 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
|
||||
@@ -3115,6 +3137,9 @@ Provides nice functions such as:
|
||||
#+end_src
|
||||
|
||||
* Mu4e
|
||||
:PROPERTIES:
|
||||
:header-args:emacs-lisp: :tangle no
|
||||
:END:
|
||||
** Resources
|
||||
Documentation:
|
||||
- [ ] Mu4e documentation: http://www.djcbsoftware.nl/code/mu/mu4e/index.html#Top
|
||||
@@ -3367,7 +3392,9 @@ Choose account label to feed msmtp -a option based on From header in Message buf
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
(spell +aspell) ; tasing you for misspelling mispelling
|
||||
(spell
|
||||
+aspell
|
||||
+everywhere) ; tasing you for misspelling mispelling
|
||||
|
||||
:lang
|
||||
data ; config/data formats
|
||||
@@ -3383,6 +3410,7 @@ Choose account label to feed msmtp -a option based on From header in Message buf
|
||||
+hugo ; use Emacs for hugo blogging
|
||||
+roam2 ;
|
||||
+gnuplot
|
||||
+jupyter
|
||||
+present) ; using org-mode for presentations
|
||||
python ; beautiful is better than ugly
|
||||
(sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
@@ -3440,6 +3468,7 @@ Choose account label to feed msmtp -a option based on From header in Message buf
|
||||
#+begin_src emacs-lisp
|
||||
;; Automatic toggling of LaTeX fragments
|
||||
(package! org-fragtog)
|
||||
(package! org-appear)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
@@ -3460,11 +3489,6 @@ Choose account label to feed msmtp -a option based on From header in Message buf
|
||||
:files ("*.el" "filters" "preprocessors")))
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; Renders Org-mode citations in CSL styles
|
||||
(package! citeproc-org)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; Connector between Org-roam, BibTeX-completion, and Org-ref
|
||||
(package! org-roam-bibtex
|
||||
|
@@ -330,7 +330,7 @@ $0
|
||||
#+name: tab:${1:table_name}
|
||||
#+caption: ${2:Table caption}
|
||||
#+attr_latex: :environment tabularx :width ${3:\linewidth} :align ${4:lXX}
|
||||
#+attr_latex: :center t :booktabs t :float t
|
||||
#+attr_latex: :center t :booktabs t
|
||||
| $0 | | |
|
||||
|---+---+---|
|
||||
| | | |
|
||||
@@ -418,6 +418,25 @@ $1
|
||||
$0
|
||||
#+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
|
||||
*** Mconfig
|
||||
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/mconfig
|
||||
@@ -436,49 +455,25 @@ $0
|
||||
$0
|
||||
#+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
|
||||
#+begin_src conf :tangle ~/.config/doom/snippets/org-mode/mfigure
|
||||
#contributor : Thomas Dehaeze <dehaeze.thomas@gmail.com>
|
||||
#name :Matlab-Figure
|
||||
# --
|
||||
,#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/${1:filename}.pdf', 'width', '${2:full}', 'height', '${3:full}');
|
||||
,#+begin_src matlab :exports none :results none
|
||||
%% ${1:description}
|
||||
figure;
|
||||
$0
|
||||
,#+end_src
|
||||
|
||||
,#+name: fig:$1
|
||||
,#+caption: $0
|
||||
,#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/${2:filename}.pdf', 'width', '${3:full}', 'height', '${4:full}');
|
||||
,#+end_src
|
||||
|
||||
,#+name: fig:$2
|
||||
,#+caption: $1
|
||||
,#+RESULTS:
|
||||
[[file:figs/$1.png]]
|
||||
[[file:figs/$2.png]]
|
||||
#+end_src
|
||||
|
||||
*** Mfunction
|
||||
@@ -594,3 +589,44 @@ $0
|
||||
$0
|
||||
,#+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,13 +186,6 @@
|
||||
markEmptyLines = false
|
||||
#+end_src
|
||||
|
||||
** Github
|
||||
#+BEGIN_SRC conf
|
||||
[github]
|
||||
user = tdehaeze
|
||||
oauth-token = 8cc5b41120f7e9a869c24fa3678667d3d8422e6f
|
||||
#+END_SRC
|
||||
|
||||
* =~/.gitignore_global= - Global Git Ignore
|
||||
:PROPERTIES:
|
||||
:header-args:conf: :tangle ~/.gitignore_global
|
||||
|
2243
homelab.org
2243
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
|
||||
#+begin_src conf
|
||||
font Hack Nerd Font 11
|
||||
font pango:Hack Nerd Font Mono 11
|
||||
#+end_src
|
||||
|
||||
* Colors Variables
|
||||
@@ -113,6 +113,7 @@ workspace_auto_back_and_forth yes
|
||||
assign[title="^Fig"] $ws6 # Matlab Figures
|
||||
for_window [title="^Fig"] layout tabbed
|
||||
assign[title="^HG_Peer"] $ws6 # Name of window when export figure with matlab
|
||||
assign[class="^RDP"] $ws7 # Remote
|
||||
#+end_src
|
||||
|
||||
** Open specific applications in floating mode
|
||||
|
983
install.org
983
install.org
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,11 @@
|
||||
#+TITLE: LaTeX Configuration
|
||||
#+SETUPFILE: ./setup/org-setup-file.org
|
||||
|
||||
* LatexMK
|
||||
#+begin_src conf :tangle ~/.latexmkrc
|
||||
$pdf_previewer = "zathura %O %S";
|
||||
#+end_src
|
||||
|
||||
* Awesome LaTeX
|
||||
- https://github.com/cmichi/latex-template-collection
|
||||
- https://github.com/latex3/latex3
|
||||
|
227
mail.org
227
mail.org
@@ -3,7 +3,7 @@
|
||||
|
||||
Installation:
|
||||
#+begin_src bash :tangle no
|
||||
yay -S mbsync msmtp mu neomutt lynx
|
||||
sudo apt install mbsync msmtp maildir-utils neomutt lynx
|
||||
#+end_src
|
||||
|
||||
* =mbsync= - Synchronize Mailboxes
|
||||
@@ -136,7 +136,7 @@ Far :esrf-remote:
|
||||
Near :esrf-local:
|
||||
#+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
|
||||
Channel esrf-download
|
||||
Far :esrf-remote:INBOX
|
||||
@@ -146,116 +146,6 @@ Expunge Near
|
||||
Sync Pull
|
||||
#+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
|
||||
:PROPERTIES:
|
||||
:header-args:conf: :tangle ~/.config/msmtp/config
|
||||
@@ -281,6 +171,8 @@ protocol smtp
|
||||
from dehaeze.thomas@gmail.com
|
||||
user dehaeze.thomas@gmail.com
|
||||
passwordeval "pass email/dehaeze.thomas@gmail.com"
|
||||
proxy_host localhost
|
||||
proxy_port 8080
|
||||
#+END_SRC
|
||||
|
||||
** ESRF Account
|
||||
@@ -295,33 +187,9 @@ tls_starttls off
|
||||
passwordeval "pass email/thomas.dehaeze@esrf.fr"
|
||||
#+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
|
||||
#+BEGIN_SRC conf
|
||||
account default : gmail
|
||||
account default : esrf
|
||||
#+END_SRC
|
||||
|
||||
* =mu= - Mail Indexer
|
||||
@@ -749,7 +617,6 @@ 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"
|
||||
#+END_SRC
|
||||
|
||||
|
||||
*** Limit
|
||||
#+begin_src conf
|
||||
bind index L limit
|
||||
@@ -811,7 +678,7 @@ tmpfile=/tmp/rangerpick
|
||||
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
|
||||
elif [ $1 == "dragon" ]; then
|
||||
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
|
||||
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
|
||||
elif [ $1 == "clean" ]; then
|
||||
ls $tmpfile
|
||||
fi
|
||||
@@ -998,17 +865,13 @@ https://unix.stackexchange.com/questions/20456/pretty-print-mails-from-mutt
|
||||
|
||||
** Accounts
|
||||
#+BEGIN_SRC conf
|
||||
set spoolfile = "+gmail/Inbox" # Default inbox
|
||||
set spoolfile = "+esrf/Inbox" # Default inbox
|
||||
set realname = "Dehaeze Thomas"
|
||||
set from = "dehaeze.thomas@gmail.com"
|
||||
set from = "thomas.dehaeze@esrf.fr"
|
||||
|
||||
folder-hook gmail/* source ~/.config/neomutt/accounts/gmail
|
||||
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 gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
|
||||
#+END_SRC
|
||||
@@ -1074,66 +937,6 @@ 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
|
||||
#+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
|
||||
#+BEGIN_SRC conf
|
||||
set wait_key = no # shut up, mutt
|
||||
@@ -1296,18 +1099,6 @@ named-mailboxes " Sent" =esrf/Sent
|
||||
named-mailboxes " Drafts" =esrf/Drafts
|
||||
named-mailboxes " ﮊ Archive" =esrf/Archive
|
||||
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
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
@@ -1414,7 +1205,7 @@ video/*; setsid mpv --quiet %s &
|
||||
image/*; sxiv -a -b %s &
|
||||
application/pdf; zathura %s &
|
||||
audio/*; /usr/bin/xdg-open %s; copiousoutput
|
||||
text/html; export DISPLAY=:0 && setsid qutebrowser %s; nametemplate=%s.html
|
||||
text/html; export DISPLAY=:0 && setsid qutebrowser %s > /dev/null 2>&1 &; nametemplate=%s.html
|
||||
text/html; lynx -width ${COLUMNS:-80} -dump %s; nametemplate=%s.html; copiousoutput;
|
||||
#+END_SRC
|
||||
|
||||
|
@@ -16,6 +16,7 @@ set(groot, 'DefaultTextInterpreter', 'LaTeX');
|
||||
set(groot, 'DefaultAxesTickLabelInterpreter', 'LaTeX');
|
||||
set(groot, 'DefaultAxesFontName', 'LaTeX');
|
||||
set(groot, 'DefaultLegendInterpreter', 'LaTeX');
|
||||
set(groot, 'DefaultConstantLineInterpreter', 'LaTeX');
|
||||
#+end_src
|
||||
|
||||
** Default Line Width
|
||||
@@ -38,12 +39,14 @@ set(groot, 'DefaultTextFontSize', 10);
|
||||
set(groot, 'DefaultAxesFontUnits', 'points');
|
||||
set(groot, 'DefaultAxesFontSize', 10);
|
||||
set(groot, 'DefaultUicontrolFontSize', 10);
|
||||
set(groot, 'DefaultConstantLineFontSize', 10);
|
||||
#+end_src
|
||||
|
||||
** Default Fonts
|
||||
#+begin_src matlab
|
||||
set(groot, 'DefaultAxesFontName', 'Helvetica');
|
||||
set(groot, 'DefaultTextFontName', 'Helvetica');
|
||||
set(groot, 'DefaultConstantLineFontName', 'Helvetica');
|
||||
#+end_src
|
||||
|
||||
** Make figures into a Box
|
||||
|
@@ -92,7 +92,7 @@ mpd_music_dir = ~/Music
|
||||
|
||||
Notification of song change.
|
||||
#+begin_src conf
|
||||
execute_on_song_change = dunstify --replace=19845 "Now Playing ♫" "$(mpc current)"
|
||||
execute_on_song_change = notify-send --hint=string:x-dunst-stack-tag:Z7uCd3ZP "Now Playing ♫" "$(mpc current)"
|
||||
#+end_src
|
||||
|
||||
Better user interface
|
||||
|
@@ -68,7 +68,7 @@ notify-always no
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
dunstify --replace=38492 "Newsboat " "$1"
|
||||
notify-send "Newsboat " "$1"
|
||||
#+end_src
|
||||
|
||||
** Bindings
|
||||
@@ -122,7 +122,7 @@ bookmark-interactive no
|
||||
|
||||
#+begin_src bash
|
||||
buku --add "$1" --title "$2" --comment "$3" && \
|
||||
dunstify "Buku" "Bookmark Added" && \
|
||||
notify-send "Buku" "Bookmark Added" && \
|
||||
exit 0
|
||||
#+end_src
|
||||
|
||||
|
@@ -214,7 +214,7 @@ startup_notification = false
|
||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||
# "mod3" and "mod4" (windows-key).
|
||||
close = mod1+space
|
||||
history = mod1+Escape
|
||||
history = mod1+BackSpace
|
||||
#+end_src
|
||||
|
||||
* Urgency
|
||||
|
232
polybar.org
232
polybar.org
@@ -2,7 +2,7 @@
|
||||
#+SETUPFILE: ./setup/org-setup-file.org
|
||||
#+PROPERTY: header-args :comments no
|
||||
#+PROPERTY: header-args+ :mkdirp yes
|
||||
#+PROPERTY: header-args+ :tangle ~/.config/polybar/config
|
||||
#+PROPERTY: header-args+ :tangle ~/.config/polybar/config.ini
|
||||
|
||||
* Colors
|
||||
#+begin_src conf
|
||||
@@ -57,13 +57,12 @@ padding-right = 12
|
||||
module-margin-left = 1
|
||||
module-margin-right = 1
|
||||
|
||||
font-0 = Hack Nerd Font:style=Medium,Regular:pixelsize=10;1
|
||||
font-0 = Hack Nerd Font:style=Regular:pixelsize=10;1
|
||||
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||
font-2 = Weather Icons:size=10;1
|
||||
|
||||
modules-left = i3 xwindow
|
||||
modules-center =
|
||||
modules-right = pulseaudio wired-network wireless-network wireguard nordvpn bluetooth redshift cursor lockscreen dunst packages unread_news unread_mail calendar temperature battery date
|
||||
modules-right = pulseaudio drive_tmp drive_homelab drive_groupshare drive_data_id21 drive_unix_home dunst cursor unread_mail calendar battery date
|
||||
|
||||
# wm-restack = i3
|
||||
|
||||
@@ -327,11 +326,11 @@ fi
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+begin_src bash
|
||||
dunstify --replace=98465 "Mails " "Syncing...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "Syncing...";
|
||||
checkmail -q && \
|
||||
mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
|
||||
if [ "$mail_nb" -eq "0" ]; then
|
||||
dunstify --replace=98465 "Mails " "No new mail";
|
||||
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "No new mail";
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -381,7 +380,7 @@ fi
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+begin_src bash
|
||||
dunstify --replace=38492 "Newsboat " "Reloading...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "Reloading...";
|
||||
|
||||
if pgrep -x "newsboat" >/dev/null; then
|
||||
# If newsboat is already running, try to refresh in the tmux session
|
||||
@@ -389,7 +388,7 @@ if pgrep -x "newsboat" >/dev/null; then
|
||||
else
|
||||
newsboat -x reload && /
|
||||
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
|
||||
dunstify --replace=38492 "Newsboat " "$news_nb Unread News";
|
||||
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "$news_nb Unread News";
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -493,10 +492,10 @@ fi
|
||||
#+begin_src bash
|
||||
if pgrep -x "redshift" >/dev/null; then
|
||||
killall redshift && \
|
||||
dunstify --replace=36492 "Redshift 望" "Turned off";
|
||||
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift 望" "Turned off";
|
||||
else
|
||||
nohup redshift > /dev/null 2>&1 &
|
||||
dunstify --replace=36492 "Redshift 望" "Starting...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift 望" "Starting...";
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -539,16 +538,16 @@ fi
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+BEGIN_SRC bash
|
||||
dunstify --replace=64654 'Packages ' "Refreshing..."
|
||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "Refreshing..."
|
||||
|
||||
paru -Sy > /dev/null 2>&1 && \
|
||||
package_nb=$(paru -Qu 2> /dev/null | wc -l) || \
|
||||
package_nb=0
|
||||
|
||||
if [ "$package_nb" -eq "0" ]; then
|
||||
dunstify --replace=64654 'Packages ' "No upgrade available"
|
||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "No upgrade available"
|
||||
else
|
||||
dunstify --replace=64654 'Packages ' "$package_nb upgrade(s) available"
|
||||
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "$package_nb upgrade(s) available"
|
||||
fi
|
||||
#+END_SRC
|
||||
|
||||
@@ -606,9 +605,9 @@ tmpfile="/tmp/dunststatus";
|
||||
if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
|
||||
killall -SIGUSR2 dunst && \
|
||||
echo "on" > $tmpfile;
|
||||
dunstify --replace=16549 "Notifications " "Activated";
|
||||
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Activated";
|
||||
else
|
||||
dunstify --replace=16549 "Notifications " "Deactivated";
|
||||
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Deactivated";
|
||||
sleep 1 && \
|
||||
killall -SIGUSR1 dunst && \
|
||||
echo "off" > $tmpfile;
|
||||
@@ -654,10 +653,10 @@ fi
|
||||
#+begin_src bash
|
||||
if pgrep -x "xautolock" >/dev/null ; then
|
||||
pkill xautolock && \
|
||||
dunstify --replace=13602 'Lock Screen ' 'Desactivated'
|
||||
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Desactivated'
|
||||
else
|
||||
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||
dunstify --replace=13602 'Lock Screen ' 'Activated'
|
||||
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'" &
|
||||
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Activated'
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -718,13 +717,13 @@ isdevicedown=$(nmcli device status | grep ^$1 | grep disconnected)
|
||||
|
||||
if [ -z "$isdevicedown" ]
|
||||
then
|
||||
dunstify --replace=84847 "$1" "Disconnecting..." && \
|
||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnecting..." && \
|
||||
nmcli device disconnect $1 && \
|
||||
dunstify --replace=84847 "$1" "Disconnected"
|
||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnected"
|
||||
else
|
||||
dunstify --replace=84847 "$1" "Connection..." && \
|
||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connection..." && \
|
||||
nmcli device connect $1 && \
|
||||
dunstify --replace=84847 "$1" "Connected"
|
||||
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connected"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -788,10 +787,10 @@ isconnected=$(bluetoothctl show $controllerid | grep Powered | grep yes)
|
||||
if [ -z "$isconnected" ]
|
||||
then
|
||||
bluetoothctl power on && \
|
||||
dunstify --replace=88498 "Bluetooth" "Power ON"
|
||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power ON"
|
||||
else
|
||||
bluetoothctl power off && \
|
||||
dunstify --replace=88498 "Bluetooth" "Power OFF"
|
||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power OFF"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -828,110 +827,9 @@ fi
|
||||
|
||||
The script is accessible [[file:binaries.org::#nordvpn-toggle][here]].
|
||||
|
||||
* Wireguard
|
||||
#+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
|
||||
This is using this program: module/
|
||||
|
||||
#+BEGIN_SRC conf
|
||||
[module/cursor]
|
||||
type = custom/script
|
||||
@@ -967,10 +865,86 @@ fi
|
||||
#+begin_src bash
|
||||
if pgrep -x "highlight-point" >/dev/null; then
|
||||
killall highlight-point && \
|
||||
dunstify --replace=46492 "Cursor" "Turned off";
|
||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Turned off";
|
||||
else
|
||||
nohup highlight-pointer -r 10 > /dev/null 2>&1 &
|
||||
dunstify --replace=46492 "Cursor" "Highlight...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "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
|
||||
#+end_src
|
||||
|
||||
|
@@ -130,7 +130,7 @@ c.tabs.background = True
|
||||
c.tabs.close_mouse_button = 'right'
|
||||
|
||||
# How to behave when the last tab is closed.
|
||||
c.tabs.last_close = 'close'
|
||||
c.tabs.last_close = 'ignore'
|
||||
|
||||
# Switch between tabs using the mouse wheel.
|
||||
c.tabs.mousewheel_switching = False
|
||||
@@ -172,8 +172,8 @@ c.url.searchengines = {
|
||||
'go': 'https://www.google.com/search?q={}',
|
||||
'gc': 'https://scholar.google.fr/scholar?hl=fr&as_sdt=0%2C5&q={}&btnG=',
|
||||
'gm': 'https://www.google.com/maps/search/{}/',
|
||||
'yt': 'https://www.youtube.com/results?search_query={}',
|
||||
'gh': 'https://github.com/search?q={}',
|
||||
'yt': 'https://www.youtube.com/results?search_query={}',
|
||||
're': 'https://www.reddit.com/search?q={}',
|
||||
'lb': 'http://gen.lib.rus.ec/search.php?req={}',
|
||||
'la': 'http://gen.lib.rus.ec/scimag/index.php?s={}',
|
||||
@@ -262,12 +262,19 @@ config.bind('gf', 'open -t https://rss.tdehaeze.xyz/')
|
||||
config.bind('gr', 'open -t https://www.reddit.com/')
|
||||
|
||||
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('gH', 'open -t qute://history')
|
||||
config.bind('gs', 'open -t qute://settings')
|
||||
#+end_src
|
||||
|
||||
Quit.
|
||||
#+begin_src python
|
||||
config.bind('D', 'close')
|
||||
#+end_src
|
||||
|
||||
* Custom Bindings
|
||||
Create a Password for the current website
|
||||
#+begin_src python
|
||||
@@ -275,6 +282,11 @@ c.aliases['Password_Add'] = 'spawn --userscript ~/.config/qutebrowser/userscript
|
||||
config.bind(',P', 'Password_Add')
|
||||
#+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=)
|
||||
#+begin_src python
|
||||
c.aliases['Password_Fill'] = 'spawn --userscript password_fill'
|
||||
@@ -397,12 +409,12 @@ username=$(echo -e "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze"
|
||||
password=$(rofi -p "Password" -dmenu -password -lines 1)
|
||||
|
||||
if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
|
||||
dunstify --urgency=critical "Pass" "Failed to Add Password"
|
||||
notify-send --hint=string:x-dunst-stack-tag:0vRM5AMP --urgency=critical "Pass" "Failed to Add Password"
|
||||
else
|
||||
echo -e "$password\nlogin: $username\nurl: $QUTE_URL" > /tmp/add-password.txt
|
||||
pass insert --multiline "$url/$username" < /tmp/add-password.txt;
|
||||
rm /tmp/add-password.txt
|
||||
dunstify "Pass " "Password Added"
|
||||
notify-send --hint=string:x-dunst-stack-tag:0vRM5AMP "Pass " "Password Added"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -415,15 +427,15 @@ if [[ "$1" == *"list"* ]]; then
|
||||
fi
|
||||
|
||||
if [ -n "$choice" ] && [ "$choice" = "Playlist" ]; then
|
||||
dunstify --replace=19243 "Youtube " "Downloading Playlist...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "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" && \
|
||||
dunstify --replace=19243 "Youtube " "Downloaded" || \
|
||||
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloaded" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG --urgency=critical "Youtube " "Failed to download"
|
||||
else
|
||||
dunstify --replace=19243 "Youtube " "Downloading Video...";
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloading Video...";
|
||||
youtube-dl --no-playlist -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" && \
|
||||
dunstify --replace=19243 "Youtube " "Downloaded" || \
|
||||
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloaded" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG --urgency=critical "Youtube " "Failed to download"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -627,8 +639,8 @@ new_tags=$(rofi -p "New tags" -dmenu)
|
||||
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/ && \
|
||||
dunstify "Linkding" " Bookmark Added" || \
|
||||
dunstify --urgency=critical "Linkding" "Failed"
|
||||
notify-send --hint=string:x-dunst-stack-tag:l3gV75RD "Linkding" " Bookmark Added" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:l3gV75RD --urgency=critical "Linkding" "Failed"
|
||||
#+end_src
|
||||
|
||||
** Add Url to Buku using Rofi
|
||||
@@ -637,28 +649,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*$//')
|
||||
|
||||
buku --add "$QUTE_URL" --tag "$tags" --title "$title" && \
|
||||
dunstify "Buku" "Bookmark Added" || \
|
||||
dunstify --urgency=critical "Buku" " Bookmark Added"
|
||||
notify-send --hint=string:x-dunst-stack-tag:E3TueNZ0 "Buku" "Bookmark Added" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:E3TueNZ0 --urgency=critical "Buku" " Bookmark Added"
|
||||
#+end_src
|
||||
|
||||
** Add Url to Buku without asking for information
|
||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/buku-add.sh
|
||||
buku --add $QUTE_URL --title "$QUTE_TITLE" && \
|
||||
dunstify "Buku" "📑 Bookmark Added"
|
||||
notify-send "Buku" "📑 Bookmark Added"
|
||||
#+end_src
|
||||
|
||||
** Download with aria2c
|
||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add.sh
|
||||
aria2p add "$1" && \
|
||||
dunstify "Aria2" "Download Started" || \
|
||||
dunstify "Aria2" "Error"
|
||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
|
||||
#+end_src
|
||||
|
||||
** Download with aria2c on the Homelab
|
||||
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add-homelab.sh
|
||||
dl-add $(echo "$1" | sed 's/\&af=.*$//g') && \
|
||||
dunstify "Aria2" "Download Started" || \
|
||||
dunstify "Aria2" "Error"
|
||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
|
||||
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
|
||||
#+end_src
|
||||
|
||||
** Save to PNG
|
||||
@@ -667,8 +679,8 @@ filename=$(rofi -p "filename" -dmenu -lines 1)
|
||||
|
||||
if [ -n "filename" ]; then
|
||||
cd ~/Pictures/ && \
|
||||
firefox-developer-edition -P default -headless --screenshot "$filename.png" "$QUTE_URL" && \
|
||||
dunstify "Screenshot" "Taken successfully"
|
||||
firefox -P default -headless --screenshot "$filename.png" "$QUTE_URL" && \
|
||||
notify-send "Screenshot" "Taken successfully"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -679,7 +691,7 @@ filename=$(rofi -p "filename" -dmenu -lines 1)
|
||||
if [ -n "$filename" ]; then
|
||||
cd ~/Pictures/ && \
|
||||
percollate pdf --css "@page { size: A4 portrait }" --output "$filename.pdf" "$QUTE_URL" && \
|
||||
dunstify "Percollate" "Successfully saved to pdf"
|
||||
notify-send "Percollate" "Successfully saved to pdf"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -689,7 +701,7 @@ passname=$(ls ~/.password-store/totp-* | xargs -n 1 basename | sed -e 's/\..*$//
|
||||
|
||||
if [ -n "$passname" ]; then
|
||||
pass otp $passname | xsel -ib && \
|
||||
dunstify 'OTP' 'copied to clipboard.' &
|
||||
notify-send 'OTP' 'copied to clipboard.' &
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@@ -698,12 +710,12 @@ fi
|
||||
m3u8_path=`curl -L -s "$QUTE_URL" | pcregrep -o1 "file = \"\/(.*aes.*mp4)\""`
|
||||
|
||||
if [ -z "$m3u8_path" ]; then
|
||||
dunstify --urgency=critical "Qutebrowser" "No m3u8 playlist found"
|
||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP --urgency=critical "Qutebrowser" "No m3u8 playlist found"
|
||||
else
|
||||
dunstify "Qutebrowser" "Downloads..." && \
|
||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "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" && \
|
||||
dunstify "Qutebrowser" "$QUTE_TITLE Downloaded"
|
||||
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "$QUTE_TITLE Downloaded"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
|
49
ranger.org
49
ranger.org
@@ -11,6 +11,18 @@
|
||||
%p the full paths of selected files
|
||||
#+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
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/ranger/rc.conf
|
||||
@@ -217,7 +229,7 @@ map ,o shell nohup pcmanfm %d &
|
||||
|
||||
Print on Rnice:
|
||||
#+BEGIN_SRC conf
|
||||
map ,p shell print-rnice %f &
|
||||
map ,p shell print-esrf %f &
|
||||
#+END_SRC
|
||||
|
||||
Backup to NAS:
|
||||
@@ -258,7 +270,6 @@ else
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Copy File Content
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/ranger/scripts/copy-content.sh
|
||||
@@ -266,24 +277,7 @@ fi
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+begin_src bash
|
||||
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
|
||||
xclip -sel c < "$1" && notify-send "Ranger" "Copied to clipboard"
|
||||
#+end_src
|
||||
|
||||
*** Paste with Rsync
|
||||
@@ -298,13 +292,12 @@ fi
|
||||
|
||||
#+begin_src bash
|
||||
if [ $TMUX ]; then
|
||||
tmux split -v -l 1 rsync -a --info=progress2 "${@:2}" "$1" && tmux select-pane -U
|
||||
tmux split -v -l 1 rsync -a --info=progress2 --no-inc-recursive "${@:2}" "$1" && tmux select-pane -U
|
||||
else
|
||||
rsync -a --info=progress2 "${@:2}" "$1"
|
||||
rsync -a --info=progress2 --no-inc-recursive "${@:2}" "$1"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
|
||||
** Define keys for the browser
|
||||
*** Basic
|
||||
#+BEGIN_SRC conf
|
||||
@@ -421,7 +414,7 @@ map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
|
||||
|
||||
*** Drag and Drop
|
||||
#+BEGIN_SRC conf
|
||||
map D shell dragon-drag-and-drop -a -x %p
|
||||
map D shell dragon -a -x %p
|
||||
#+END_SRC
|
||||
|
||||
*** Rename files
|
||||
@@ -666,20 +659,20 @@ ext x?html?, has w3m, terminal = w3m "$@"
|
||||
|
||||
** Word, Excel and Presentation files
|
||||
#+BEGIN_SRC conf
|
||||
ext docx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
||||
ext docx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
||||
ext docx?, has wps, X, flag f = wps "$@"
|
||||
ext docx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||
#+END_SRC
|
||||
|
||||
#+begin_src conf
|
||||
ext pptx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
||||
ext pptx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
||||
ext pptx?, has wps, X, flag f = wps "$@"
|
||||
ext pptx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||
#+end_src
|
||||
|
||||
#+begin_src conf
|
||||
ext csv|xlsx?, has sc-im = sc-im -- "$@"
|
||||
ext csv|xlsx?, has onlyoffice, X, flag f = onlyoffice "$@"
|
||||
ext csv|xlsx?, has onlyoffice-desktopeditors, X, flag f = onlyoffice-desktopeditors "$@"
|
||||
ext csv|xlsx?, has wps, X, flag f = wps "$@"
|
||||
ext csv|xlsx?, has libreoffice, X, flag f = libreoffice "$@"
|
||||
#+end_src
|
||||
@@ -728,7 +721,7 @@ name ^[mM]akefile$ = make
|
||||
!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 pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
has dragon-drag-and-drop, X, flag f = dragon-drag-and-drop -a -x "$@"
|
||||
has dragon, X, flag f = dragon -a -x "$@"
|
||||
#+END_SRC
|
||||
|
||||
* Ranger Commands
|
||||
|
147
sxhkd.org
147
sxhkd.org
@@ -151,10 +151,6 @@ super + e
|
||||
|
||||
* =Super + Shift= - Managing Applications
|
||||
#+begin_src conf
|
||||
# Network Manager
|
||||
super + shift + w
|
||||
$TERMINAL --title nmtui -e sudo nmtui
|
||||
|
||||
# Bluetooth Manager
|
||||
super + shift + b
|
||||
blueman-manager
|
||||
@@ -167,10 +163,6 @@ super + shift + c
|
||||
super + shift + s
|
||||
pavucontrol
|
||||
|
||||
# Bookmarks
|
||||
super + shift + f
|
||||
bukurun
|
||||
|
||||
# Passwords
|
||||
super + shift + p
|
||||
rofi-pass
|
||||
@@ -184,19 +176,15 @@ super + space ; c
|
||||
|
||||
# pcmanfm: GUI file manager
|
||||
super + space ; o
|
||||
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)
|
||||
nautilus;
|
||||
|
||||
# Run another instance of Neomutt in read-only mode
|
||||
super + space ; m
|
||||
$TERMINAL -e neomutt -R
|
||||
|
||||
# News with newsboat
|
||||
super + space ; n
|
||||
$TERMINAL -e tmux new-session -A -s newsboat newsboat
|
||||
# Music with ncmpcpp
|
||||
super + space ; w
|
||||
$TERMINAL -e tmux new-session -A -s gomuks gomuks
|
||||
|
||||
# Music with ncmpcpp
|
||||
super + space ; p
|
||||
@@ -206,136 +194,9 @@ super + space ; p
|
||||
super + space ; i
|
||||
$BROWSER;
|
||||
|
||||
# Start Torrent Managaer
|
||||
super + space ; t
|
||||
$TERMINAL -e tremc
|
||||
|
||||
# Emacs
|
||||
super + space ; e
|
||||
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
|
||||
|
||||
* I3 related
|
||||
|
156
systemd.org
156
systemd.org
@@ -3,72 +3,6 @@
|
||||
|
||||
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
|
||||
** Service
|
||||
:PROPERTIES:
|
||||
@@ -195,33 +129,29 @@ done
|
||||
# Count number of mails
|
||||
gmail_old="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
||||
esrf_old="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
|
||||
ulg_old="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
|
||||
uliege_old="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Retreive mails
|
||||
mbsync $opt_all $opt_verbose gmail-Home esrf-Home ulg-Home uliege-Home 2>/tmp/mbsync.log
|
||||
mbsync $opt_all $opt_verbose gmail-Home esrf-Home 2>/tmp/mbsync.log
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Count number of mails
|
||||
gmail_new="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
|
||||
esrf_new="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
|
||||
ulg_new="$(ls ~/.mail/ulg/Inbox/new | wc -l)"
|
||||
uliege_new="$(ls ~/.mail/uliege/Inbox/new | wc -l)"
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Total Number of new mails since last checking
|
||||
new="$(($gmail_new+$esrf_new+$ulg_new+$uliege_new))"
|
||||
old="$(($gmail_old+$esrf_old+$ulg_old+$uliege_old))"
|
||||
new="$(($esrf_new+$gmail_new))"
|
||||
old="$(($esrf_old+$gmail_old))"
|
||||
# =============================================================
|
||||
|
||||
# =============================================================
|
||||
# Notification
|
||||
if [ "$new" -gt 0 ]; then
|
||||
dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new+$ulg_new+$uliege_new)) new mail(s)"
|
||||
notify-send --hint=string:x-dunst-stack-tag:fV84ivMi 'Mails ' "$new new mail(s)"
|
||||
fi
|
||||
# =============================================================
|
||||
|
||||
@@ -230,7 +160,7 @@ fi
|
||||
if pgrep -f 'mu server'; then
|
||||
emacsclient --eval '(mu4e-update-index)'
|
||||
else
|
||||
mu index $opt_verbose $opt_quiet
|
||||
mu index -m ~/.mail $opt_verbose $opt_quiet
|
||||
fi
|
||||
# =============================================================
|
||||
#+end_src
|
||||
@@ -317,7 +247,7 @@ AccuracySec=5m
|
||||
WantedBy=timers.target
|
||||
#+end_src
|
||||
|
||||
* =ssh-agent= - SSH Agent
|
||||
* TODO =ssh-agent= - SSH Agent
|
||||
** Service
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/systemd/user/ssh-agent.service
|
||||
@@ -337,26 +267,7 @@ ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||
WantedBy=default.target
|
||||
#+end_src
|
||||
|
||||
* =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
|
||||
* TODO =emacs= - Emacs
|
||||
** Service
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/systemd/user/emacs.service
|
||||
@@ -378,7 +289,7 @@ Restart=on-failure
|
||||
WantedBy=default.target
|
||||
#+end_src
|
||||
|
||||
* =trash-empty= - Empty the trash for files older than 30 days
|
||||
* TODO =trash-empty= - Empty the trash for files older than 30 days
|
||||
** Service
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/systemd/user/trash-empty.service
|
||||
@@ -413,3 +324,54 @@ Unit=trash-empty
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
#+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
|
||||
#+begin_src bash :tangle ~/.config/aria2/download-start.sh :comments both :mkdirp yes :shebang "#!/bin/bash"
|
||||
dunstify "DL Started" "$(basename \"$3\" 2> /dev/null)"
|
||||
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW "DL Started" "$(basename \"$3\" 2> /dev/null)"
|
||||
#+end_src
|
||||
|
||||
** Download Complete Script
|
||||
#+begin_src bash :tangle ~/.config/aria2/download-complete.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
||||
dunstify "DL Completed" "$(basename \"$3\" 2> /dev/null)"
|
||||
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW "DL Completed" "$(basename \"$3\" 2> /dev/null)"
|
||||
#+end_src
|
||||
|
||||
** Download Error Script
|
||||
#+begin_src bash :tangle ~/.config/aria2/download-error.sh :comments both :mkdirp yes :shebang "#!/usr/bin/env bash"
|
||||
dunstify --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)"
|
||||
notify-send --hint=string:x-dunst-stack-tag:bHEPn7rW --urgency=critical "DL Failed" "$(basename \"$3\" 2> /dev/null)"
|
||||
#+end_src
|
||||
|
21
vim.org
21
vim.org
@@ -139,13 +139,20 @@ 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
|
||||
#+end_src
|
||||
|
||||
** Python
|
||||
#+begin_src vimrc
|
||||
Plug 'pixelneo/vim-python-docstring'
|
||||
#+end_src
|
||||
|
||||
** Org Mode
|
||||
#+begin_src vimrc
|
||||
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 'chrisbra/NrrwRgn' " A Narrow Region Plugin for vim
|
||||
Plug 'mattn/calendar-vim' " calendar vimscript
|
||||
Plug 'vim-scripts/utl.vim' " Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas
|
||||
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 'chrisbra/NrrwRgn' " A Narrow Region Plugin for vim
|
||||
" Plug 'mattn/calendar-vim' " calendar vimscript
|
||||
" Plug 'vim-scripts/utl.vim' " Univeral Text Linking - Execute URLs, footnotes, open emails, organize ideas
|
||||
#+end_src
|
||||
|
||||
** Plug End
|
||||
@@ -789,8 +796,8 @@ let g:UltiSnipsSnippetsDir = '~/.vim/UltiSnip'
|
||||
|
||||
" inoremap <silent><expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
let g:UltiSnipsExpandTrigger="<C-j>"
|
||||
" let g:UltiSnipsJumpForwardTrigger="<tab>"
|
||||
" let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
|
||||
let g:UltiSnipsJumpForwardTrigger="<tab>"
|
||||
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
|
||||
#+end_src
|
||||
|
||||
** =honza/vim-snippets=
|
||||
|
368
xconfig.org
368
xconfig.org
@@ -10,57 +10,40 @@
|
||||
|
||||
** Colors
|
||||
#+begin_src conf
|
||||
#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
|
||||
,*foreground: #d5c4a1
|
||||
#ifdef background_opacity
|
||||
,*background: [background_opacity]base00
|
||||
,*background: [background_opacity]#32302f
|
||||
#else
|
||||
,*background: base00
|
||||
,*background: #32302f
|
||||
#endif
|
||||
,*cursorColor: base05
|
||||
,*cursorColor: #d5c4a1
|
||||
|
||||
,*color0: base00
|
||||
,*color1: base08
|
||||
,*color2: base0B
|
||||
,*color3: base0A
|
||||
,*color4: base0D
|
||||
,*color5: base0E
|
||||
,*color6: base0C
|
||||
,*color7: base05
|
||||
,*color0: #32302f
|
||||
,*color1: #fb4934
|
||||
,*color2: #b8bb26
|
||||
,*color3: #fabd2f
|
||||
,*color4: #83a598
|
||||
,*color5: #d3869b
|
||||
,*color6: #8ec07c
|
||||
,*color7: #d5c4a1
|
||||
|
||||
,*color8: base03
|
||||
,*color9: base08
|
||||
,*color10: base0B
|
||||
,*color11: base0A
|
||||
,*color12: base0D
|
||||
,*color13: base0E
|
||||
,*color14: base0C
|
||||
,*color15: base07
|
||||
,*color8: #665c54
|
||||
,*color9: #fb4934
|
||||
,*color10: #b8bb26
|
||||
,*color11: #fabd2f
|
||||
,*color12: #83a598
|
||||
,*color13: #d3869b
|
||||
,*color14: #8ec07c
|
||||
,*color15: #fbf1c7
|
||||
|
||||
! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
|
||||
! use 'shell' template to set these if necessary
|
||||
,*color16: base09
|
||||
,*color17: base0F
|
||||
,*color18: base01
|
||||
,*color19: base02
|
||||
,*color20: base04
|
||||
,*color21: base06
|
||||
,*color16: #fe8019
|
||||
,*color17: #d65d0e
|
||||
,*color18: #3c3836
|
||||
,*color19: #504945
|
||||
,*color20: #bdae93
|
||||
,*color21: #ebdbb2
|
||||
#+end_src
|
||||
|
||||
** Fonts
|
||||
@@ -80,264 +63,6 @@ Xcursor.theme: Breeze
|
||||
Xcursor.size: 0
|
||||
#+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=
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.xinitrc
|
||||
@@ -352,12 +77,12 @@ dbus-update-activation-environment --systemd DISPLAY
|
||||
|
||||
Fix for Matlab.
|
||||
#+begin_src bash
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
# export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
#+end_src
|
||||
|
||||
Set =DISPLAY= for =dunst= when started with =systemd=.
|
||||
#+begin_src bash
|
||||
systemctl --user import-environment DISPLAY
|
||||
# systemctl --user import-environment DISPLAY
|
||||
#+end_src
|
||||
|
||||
Merge in defaults and keymaps
|
||||
@@ -418,7 +143,7 @@ setxkbmap -layout us -variant intl -option caps:escape &
|
||||
Start programs related to display:
|
||||
#+begin_src bash
|
||||
# Screen options
|
||||
xrandr --output eDP1 --mode 1920x1080 --dpi 192 &
|
||||
xrandr --output eDP-1 --mode 1920x1200 --dpi 192 &
|
||||
|
||||
# Set random wallpaper
|
||||
setbg ~/.local/data/wallpapers/ &
|
||||
@@ -428,7 +153,7 @@ pgrep -xu "$USER" unclutter >/dev/null || \
|
||||
unclutter --timeout 5 &
|
||||
|
||||
# Autolock screen after x minutes
|
||||
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &
|
||||
|
||||
# Redshift
|
||||
pgrep -xu "$USER" redshift >/dev/null || \
|
||||
@@ -436,6 +161,9 @@ pgrep -xu "$USER" redshift >/dev/null || \
|
||||
|
||||
# Run Picom (compositor)
|
||||
picom --daemon &
|
||||
|
||||
# Network Manager Applet
|
||||
nm-applet &
|
||||
#+end_src
|
||||
|
||||
Manually start =mopidy= as it seems to not start automatically:
|
||||
@@ -444,36 +172,6 @@ Manually start =mopidy= as it seems to not start automatically:
|
||||
mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &
|
||||
#+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:
|
||||
#+begin_src bash
|
||||
# Start sxhkd
|
||||
|
Reference in New Issue
Block a user