update theme

This commit is contained in:
2023-10-13 12:30:13 +02:00
parent 9346aee86d
commit f8070f6e51
37 changed files with 3017 additions and 3364 deletions

View File

@@ -8,19 +8,19 @@
#+begin_src yaml
font:
normal:
family: Hack Nerd Font Mono
family: SauceCodePro Nerd Font Mono
style: Regular
bold:
family: Hack Nerd Font Mono
family: SauceCodePro Nerd Font Mono
style: Bold
italic:
family: Hack Nerd Font Mono
family: SauceCodePro Nerd Font Mono
style: Italic
bold_italic:
family: Hack Nerd Font Mono
family: SauceCodePro Nerd Font Mono
style: Bold Italic
size: 10.0

View File

@@ -3,19 +3,17 @@
#+PROPERTY: header-args:conf :comments none :mkdirp yes
* Mime Applications
:PROPERTIES:
:header-args: :tangle ~/.config/mimeapps.list
:END:
#+BEGIN_SRC conf
#+BEGIN_SRC conf :tangle ~/.config/mimeapps.list
[Default Applications]
text/plain=nvim.desktop
x-scheme-handler/magnet=torrent.desktop;
text/x-shellscript=nvim.desktop;
image/png=img.desktop;
image/jpeg=img.desktop;
image/gif=img.desktop;
application/rss+xml=rss.desktop
x-scheme-handler/mailto=neomutt.desktop
message/rfc822=neomutt.desktop
@@ -23,17 +21,23 @@ x-scheme-handler/magnet=stig.desktop;
application/x-bittorrent=stig.desktop
application/pdf=zathura.desktop
x-scheme-handler/http=qutebrowser.desktop
x-scheme-handler/https=qutebrowser.desktop
x-scheme-handler/ftp=qutebrowser.desktop
x-scheme-handler/chrome=qutebrowser.desktop
text/html=qutebrowser.desktop
application/x-extension-htm=qutebrowser.desktop
application/x-extension-html=qutebrowser.desktop
application/x-extension-shtml=qutebrowser.desktop
application/xhtml+xml=qutebrowser.desktop
application/x-extension-xhtml=qutebrowser.desktop
application/x-extension-xht=qutebrowser.desktop
text/xml=org.qutebrowser.qutebrowser.desktop
text/html=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/ftp=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/chrome=org.qutebrowser.qutebrowser.desktop
application/x-extension-htm=org.qutebrowser.qutebrowser.desktop
application/x-extension-html=org.qutebrowser.qutebrowser.desktop
application/x-extension-shtml=org.qutebrowser.qutebrowser.desktop
application/xhtml+xml=org.qutebrowser.qutebrowser.desktop
application/x-extension-xhtml=org.qutebrowser.qutebrowser.desktop
application/x-extension-xht=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/about=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/unknown=org.qutebrowser.qutebrowser.desktop
text/calendar=ics_add.desktop
[Added Associations]
text/plain=mousepad.desktop;
@@ -41,14 +45,12 @@ application/x-bittorrent=stig.desktop;
#+END_SRC
* Neomutt
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/neomutt.desktop
:END:
#+begin_src conf
#+begin_src conf :tangle ~/.local/share/applications/neomutt.desktop
[Desktop Entry]
Name=Neomutt
GenericName=Email client
Exec=$TERMINAL -e neomutt %u
Exec=alacritty -e neomutt %u
Type=Application
Icon=/usr/share/icons/Papirus/64x64/apps/mutt.svg
Categories=Network;Email;
@@ -57,12 +59,10 @@ StartupNotify=true
#+end_src
* Matlab
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/matlab.desktop
:END:
#+begin_src conf
#+begin_src conf :tangle ~/.local/share/applications/matlab.desktop
[Desktop Entry]
Version=R2020b
Version=R2019b
Type=Application
Terminal=false
MimeType=text/x-matlab
@@ -74,25 +74,6 @@ Comment=Scientific computing environment
StartupNotify=true
#+end_src
* Neovim
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/nvim.desktop
:END:
#+begin_src conf
[Desktop Entry]
Name=Neovim
GenericName=Text Editor
Comment=Edit text files
Exec=nvim %F
Terminal=true
Type=Application
Keywords=Text;editor;
Icon=/usr/share/icons/Papirus/48x48/apps/nvim.svg
Categories=Utility;TextEditor;
StartupNotify=false
MimeType=text/english;text/plain;text/x-makefile;
#+end_src
* Images
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/img.desktop
@@ -105,10 +86,8 @@ Exec=/usr/bin/sxiv -a %u
#+end_src
* Org-Protocol
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/org-protocol.desktop
:END:
#+begin_src conf
#+begin_src conf :tangle ~/.local/share/applications/org-protocol.desktop
[Desktop Entry]
Name=org-protocol
Exec=emacsclient %u
@@ -118,64 +97,9 @@ Terminal=false
MimeType=x-scheme-handler/org-protocol;
#+end_src
* Ranger
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/ranger.desktop
:END:
#+begin_src conf
[Desktop Entry]
Type=Application
Name=ranger
Comment=Launches the ranger file manager
Icon=utilities-terminal
Terminal=true
Exec=ranger
Categories=ConsoleOnly;System;FileTools;FileManager
MimeType=inode/directory;inode/mount-point;x-scheme-handler/ssh;x-scheme-handler/smb;x-scheme-handler/nfs;x-scheme-handler/ftp;
#+end_src
* Emacs Client
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/emacsclient.desktop
:END:
#+begin_src conf
[Desktop Entry]
Name=Emacs Client
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacsclient -c %f
Icon=emacs
Type=Application
Terminal=false
Categories=Utility;TextEditor;
#+end_src
* Qutebrowser
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/qutebrowser.desktop
:END:
#+begin_src conf
[Desktop Entry]
Name=qutebrowser
StartupWMClass=qutebrowser
GenericName=Web Browser
Comment=A keyboard-driven, vim-like browser based on PyQt5
Icon=qutebrowser
Type=Application
Categories=Network;WebBrowser;
Exec=qutebrowser %u
Terminal=false
StartupNotify=true
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/qute;
Keywords=Browser
Actions=new-window;preferences;
#+end_src
* Zathura
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/zathura.desktop
:END:
#+begin_src conf
#+begin_src conf :tangle ~/.local/share/applications/zathura.desktop
[Desktop Entry]
Version=1.0
Type=Application
@@ -201,3 +125,15 @@ MimeType=application/x-bittorrent
Categories=Network;FileTransfer;P2P;
Keywords=p2p;bittorrent;transmission;rpc;
#+end_src
* ICS-Add
#+begin_src conf :tangle ~/.local/share/applications/ics_add.desktop
[Desktop Entry]
Name=ICS Add
Comment=Add ICS file to the calendar
Terminal=true
Exec=ics-add %U
Type=Application
MimeType=text/calendar
#+end_src

View File

@@ -21,8 +21,8 @@
** FZF
#+begin_src bash
. /usr/share/doc/fzf/examples/completion.bash
. /usr/share/doc/fzf/examples/key-bindings.bash
. /usr/share/fzf/completion.bash
. /usr/share/fzf/key-bindings.bash
#+end_src
** Ignore case for auto-completion
@@ -86,9 +86,13 @@ alias grep='grep --colour=auto'
alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias bat='batcat'
alias mutt="neomutt"
#+END_SRC
Change default configuration file location:
#+BEGIN_SRC bash
alias tmux='tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf'
alias mbsync='mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc'
#+END_SRC
*** One letter aliases
@@ -118,11 +122,6 @@ 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
@@ -250,7 +249,7 @@ PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
** QT And GTK Themes
#+begin_src bash
export QT_QPA_PLATFORMTHEME="qt5ct"
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc.mine"
#+END_SRC
** Gui program to ask for sudo password
@@ -258,15 +257,6 @@ export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
export SUDO_ASKPASS=~/.local/bin/askpass-rofi
#+END_SRC
** Gnome Keyring Daemon
Enable the keyring for applications run through the terminal
#+begin_src bash
if [ -n "$DESKTOP_SESSION" ];then
eval $(gnome-keyring-daemon --start)
export SSH_AUTH_SOCK
fi
#+end_src
** Export some default applications
#+begin_src bash
export EDITOR="nvim"
@@ -280,6 +270,21 @@ export FILE="ranger"
*** XDG Default
#+begin_src bash
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_CACHE_HOME="$HOME/.cache"
#+end_src
#+begin_src bash
export LESSHISTFILE=-
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc"
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtkrc-2.0"
export MATLAB_LOG_DIR="$XDG_CACHE_HOME/matlab"
#+end_src
*** Use Ripgrep for FZF
@@ -288,37 +293,39 @@ export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.g
export FZF_DEFAULT_OPTS='--layout=reverse --height=20'
#+end_src
*** Goland
#+begin_src bash
export GOPATH=$HOME/go
#+end_src
*** Latex Path
#+begin_src bash
export TEXMFHOME=$HOME/.local/share/texmf
#+end_src
*** Python Path
#+begin_src bash
export PYTHONPATH="${PYTHONPATH}:/usr/lib/python3.9/site-packages/configobj"
#+end_src
*** Linkding
#+begin_src bash
export LINKDING_URL=`pass nas/linkding_url`
export LINKDING_TOKEN=`pass nas/linkding_token`
#+end_src
*** Restic
#+begin_src bash
export RESTIC_REPOSITORY=sftp:thomas@homelab:/srv/storage/Backups/esrf-laptop
export RESTIC_PASSWORD_COMMAND="pass show restic"
#+end_src
*** Go
#+begin_src bash
export GOPATH=$HOME/.config/go
#+end_src
*** Japanese input
#+begin_src bash
# Japanese input
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
#+end_src
** Path
#+begin_src bash
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=~/.local/bin/nvim/bin:$PATH
PATH=~/.npm-global/bin:$PATH
PATH=~/miniconda3/bin:$PATH
export PATH
#+END_SRC
@@ -329,9 +336,9 @@ if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
fi
#+end_src
* =~/.inputrc=
* =inputrc=
:PROPERTIES:
:header-args: :tangle ~/.inputrc
:header-args: :tangle ~/.config/readline/inputrc
:header-args+: :comments both :mkdirp yes
:CUSTOM_ID: inputrc
:END:

View File

@@ -10,7 +10,7 @@
:CUSTOM_ID: phonebook
:END:
The phone-list is taken from =scp opid21@lid21nano:/mnt/multipath-shares/sware/pub/phonelist/share/annuaire.txt /home/thomas/.local/data/annuaire.txt=
The phone-list is taken from =scp rnice@esrf.fr:/mnt/multipath-shares/sware/pub/phonelist/share/annuaire.txt /home/thomas/.local/data/annuaire.txt=
#+begin_src bash :tangle ~/.local/bin/phonebook
cat ~/.local/data/annuaire.txt | fzf --header="NAME Phone Box department roomNumber description mail"
@@ -33,77 +33,62 @@ khard | fzf --header="Index Name Phone
$TERMINAL --title esrf-phonebook -e contacts
#+end_src
* =qutebrowser=
:PROPERTIES:
:CUSTOM_ID: qutebrowser
:END:
#+begin_src bash :tangle ~/.local/bin/qutebrowser
~/.local/soft/qutebrowser/.venv/bin/python3 -m qutebrowser "$@"
#+end_src
* =remote-home= - Remote Desktop to Home PC
:PROPERTIES:
:CUSTOM_ID: remote-home
:END:
#+begin_src bash :tangle ~/.local/bin/remote-home
notify-send 'Rdesktop' "Connection to Home PC..."
common_arg="/clipboard /bpp:8 /bpp:16 /compression -themes -wallpaper /async-update /async-input -glyph-cache /audio-mode:1 /dynamic-resolution /auto-reconnect /wm-class:RDP_PC /grab-keyboard /cert:ignore"
xfreerdp $common_arg /u:thomas /p:$(pass home_pc/thomas | sed -n 1p) /v:192.168.1.72 > /tmp/freerdp_home_pc.log 2>&1 &
#+end_src
* =remote-desktop= - Remote Desktop Connect
:PROPERTIES:
:CUSTOM_ID: remote-desktop
:END:
#+begin_src bash :tangle ~/.local/bin/remote-desktop
computer=$(echo -e 'WID21SPEEDGOAT1\nWBM23SPEEDGOAT1\nWID24SPEEDGOAT1\nPCMEL1\nRNICE\nPCDEHAEZE\nLAPPAMU1\nPCNASS1\nDesktop-W10' | rofi -i -dmenu -no-custom -p 'Computer:' -l 20);
computer=$(echo -e 'WID21SPEEDGOAT1\nWID24SPEEDGOAT1\nWBM23SPEEDGOAT1\nWMELSPEEDGOAT1\nWID31PC1\nPCOPTRO\nPCMEL1\nPCMEL2\nRNICE\nPCDEHAEZE\nLAPMEL01\nDesktop-W10' | rofi -i -dmenu -no-custom -p 'Computer:' -l 20);
if [[ -z "$computer" ]]; then
exit 1
fi
notify-send 'Rdesktop' "Connection to ${computer}..."
dunstify --replace=99425 'Rdesktop' "Connection to ${computer}..."
proxy_arg=""
if [ "$computer" = "Desktop-W10" ]; then
# If connect to local PC
if [ ping -c 1 -t 1 desktop-w10.lan &> /dev/null ]; then
ping -c 1 desktop-w10.lan &> /dev/null
if [ $? -ne 0 ]; then
# And outside of local network, use proxy
proxy_arg="/proxy:socks5://localhost:8080"
fi
elif [ -z "$(timeout 1s dig +short proxy.esrf.fr.)" ]; then
else
ping -c 1 proxy.esrf.fr &> /dev/null
if [ $? -ne 0 ]; then
# Outside the ESRF network
proxy_arg="/proxy:socks5://localhost:8081"
fi
fi
common_arg="/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 /cert:ignore"
case "$computer" in
"RNICE" | "PCDEHAEZE" | "PCNASS1")
"RNICE" | "PCDEHAEZE")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:dehaeze /p:$(pass esrf.fr/dehaeze | sed -n 1p) /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"PCMEL1")
"PCMEL1" | "PCMEL2" | "PCOPTRO" | "LAPMEL01")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:OPPEL /p:TonicPEL /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"WMELSPEEDGOAT1")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opd23 /p:tonic23 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"WID31PC1")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid31 /p:tonic31 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"WID21SPEEDGOAT1")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid21 /p:tonic21 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"WBM23SPEEDGOAT1")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opd23 /p:tonic23 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"WID24SPEEDGOAT1")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid24 /p:tonic24 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"LAPPAMU1")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opid00 /p:tonic00 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"WBM23SPEEDGOAT1")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:opd23 /p:tonic23 /v:$computer.esrf.fr > /tmp/freerdp_${computer}.log 2>&1 & ;;
"Desktop-W10")
xfreerdp $proxy_arg $common_arg /d:ESRF /u:thomas /p:$(pass windows/Desktop-W10 | sed -n 1p) /v:192.168.1.72 > /tmp/freerdp_${computer}.log 2>&1 & ;;
xfreerdp $proxy_arg $common_arg /u:thomas /p:$(pass windows/Desktop-W10 | sed -n 1p) /v:192.168.1.72 > /tmp/freerdp_${computer}.log 2>&1 & ;;
esac
#+end_src
@@ -129,9 +114,22 @@ dehaeze@rnice:/home/esrf/dehaeze/ /home/thomas/mnt/unix_home fuse.sshfs no
//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
#+begin_src text :tangle no
//wfiles/groupshare /home/thomas/mnt/groupshare cifs noauto,user,uid=1000,gid=1000,credentials=/home/thomas/.smbcredentials 0 0
homelab:/srv/storage/ /home/thomas/mnt/homelab fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
dehaeze@rnice:/tmp_14_days/ /home/thomas/mnt/tmp_14_days fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
dehaeze@rnice:/home/esrf/dehaeze/ /home/thomas/mnt/unix_home fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
dehaeze@rnice:/data/monochromators/ /home/thomas/mnt/monochromators fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
dehaeze@rnice:/gpfs/jazzy/data/id21/inhouse /home/thomas/mnt/data_id21 fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
blissadm@lmellab:/data/id00/inhouse/DCM /home/thomas/mnt/data_id24 fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
blissadm@lmellab:/data/id00/inhouse/MEL /home/thomas/mnt/data_mel fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
blissadm@lmellab:/users/blissadm/local /home/thomas/mnt/bliss fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
blissadm@lmellab:/data/visitor /home/thomas/mnt/data_bl fuse.sshfs noauto,allow_other,user,uid=1000,gid=1000,default_permissions 0 0
#+end_src
#+begin_src bash :tangle no
if [ $# -eq 0 ]; then
drive=$(echo -e 'monochromators\ntmp_14_days\nhomelab\ngroupshare\nunix_home\ndata_id21' | rofi -dmenu -no-custom -p 'Drive:' -l 20);
drive=$(echo -e 'bliss_mel\nbliss_id21\ndata_bl\ndata_id21\ndata_id24\ndata_mel\ndata_visitor\ndrive\nhomelab\nmonochromators\ntmp_14_days\nunix_home' | rofi -dmenu -no-custom -p 'Drive:' -l 20);
if [[ -z "$drive" ]]; then
exit 1
fi
@@ -142,23 +140,110 @@ fi
if grep -qs "/home/thomas/mnt/$drive" /proc/mounts; then
umount "/home/thomas/mnt/$drive" && \
notify-send "$drive" 'Successfully unmounted' || \
notify-send --urgency=critical "$drive" 'Error while unmounted'
dunstify --replace=58249 "$drive" 'Successfully unmounted' || \
dunstify --replace=58249 --urgency=critical "$drive" 'Error while unmounted'
else
echo "It's not mounted."
mount "/home/thomas/mnt/$drive" && \
notify-send "$drive" 'Successfully mounted' || \
notify-send --urgency=critical "$drive" 'Error while mounted'
dunstify --replace=58249 "$drive" 'Successfully mounted' || \
dunstify --replace=58249 --urgency=critical "$drive" 'Error while mounted'
fi
#+end_src
#+begin_src bash :tangle ~/.local/bin/mount-dir
if [ $# -eq 0 ]; then
drive=$(find ~/mnt/* -maxdepth 0 -type d -empty -printf '%f\n' | rofi -i -dmenu -no-custom -p 'Drive:' -l 20);
if [[ -z "$drive" ]]; then
exit 1
fi
else
exit 1
fi
proxy_arg=""
ping -c 1 proxy.esrf.fr &> /dev/null
if [ $? -ne 0 ]; then
# Outside the ESRF network
proxy_arg=".esrf.fr"
fi
remote_loc=""
passname=""
case "$drive" in
"homelab")
remote_loc="thomas@homelab:/srv/storage/" ;;
"tmp_14_days")
remote_loc="dehaeze@rnice$proxy_arg:/tmp_14_days/"
passname="esrf/dehaeze" ;;
"unix_home")
remote_loc="dehaeze@rnice$proxy_arg:/home/esrf/dehaeze/"
passname="esrf/dehaeze" ;;
"monochromators")
remote_loc="dehaeze@rnice$proxy_arg:/data/monochromators/"
passname="esrf/dehaeze" ;;
"data_mel")
remote_loc="opid00@lmellab$proxy_arg:/data/id00/inhouse/MEL/"
passname="esrf/opid00" ;;
"data_jazzy")
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/jazzy/data/"
passname="esrf/dehaeze" ;;
"data_easy")
remote_loc="dehaeze@rnice$proxy_arg:/gpfs/easy/data/"
passname="esrf/dehaeze" ;;
"data_id31")
remote_loc="opid31@id31$proxy_arg:/data/id31/inhouse/"
passname="esrf/opid31" ;;
"bliss_mel")
remote_loc="blissadm@lmellab$proxy_arg:/users/blissadm/local/"
passname="esrf/blissadm" ;;
"bliss_id21")
remote_loc="blissadm@lid21nano$proxy_arg:/users/blissadm/local/"
passname="esrf/blissadm" ;;
"bliss_id24")
remote_loc="blissadm@foucault$proxy_arg:/users/blissadm/local/"
passname="esrf/blissadm" ;;
"groupshare")
mount ~/mnt/groupshare && \
exit ;;
esac
if [-z $remote_loc ]
then
exit
else
if [-z $passname ]
then
sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions $remote_loc /home/thomas/mnt/$drive
else
pass "$passname" | sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions,password_stdin $remote_loc /home/thomas/mnt/$drive
fi
fi
# sshfs -o allow_other,user,uid=1000,gid=1000,default_permissions $remote_loc /home/thomas/mnt/$drive
#+end_src
#+begin_src bash :tangle ~/.local/bin/umount-dir
if [ $# -eq 0 ]; then
# drive=$(find ~/mnt/* -maxdepth 0 -type d -not -empty -printf '%f\n' | rofi -dmenu -no-custom -p 'Drive:' -l 20);
drive=$(ls ~/mnt/ | rofi -dmenu -no-custom -p 'Drive:' -l 20);
if [[ -z "$drive" ]]; then
exit 1
fi
else
exit 1
fi
umount /home/thomas/mnt/$drive
#+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\nLaptop\nHome" | rofi -dmenu -no-custom -p 'Screen:' -l 20)
option=$(echo -e "Work\nLaptop\nHome" | rofi -i -dmenu -no-custom -p 'Screen:' -l 20)
if [[ -z "$option" ]]; then
exit 1
@@ -188,7 +273,7 @@ case "$option" in
after_screen_change
;;
"Home")
xrandr --output eDP-1 --off --output DP-3-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && \
xrandr --output eDP-1 --off --output DP-1-2 --primary --mode 2560x1440 --pos 0x0 --rotate normal && \
after_screen_change
;;
,*)
@@ -210,11 +295,12 @@ sides=$(echo -e 'one-sided\ntwo-sided-long-edge\ntwo-sided-short-edge' | rofi -d
media=$(echo -e 'A4\nA3' | rofi -dmenu -no-custom -p 'Size:' -l 20);
printer=$(echo -e 'ctb127c1u\nctb110c1u' | rofi -dmenu -no-custom -p 'Size:' -l 20);
if [[ -z "$nbpage" || -z "$side" || -z "$media" || -z "$printer" ]]; then
if [[ -z "$nbpage" || -z "$sides" || -z "$media" || -z "$printer" ]]; then
exit 1
fi
lpr -o media=$media -o sides=$sides -o number-up=$nbpage -P $printer "$1";
rsync -zaP "$1" dehaeze@rnice:/home/esrf/dehaeze/Downloads/to-be-printed.pdf && \
ssh rnice "lpr -o media=$media -o sides=$sides -o number-up=$nbpage -P $printer /home/esrf/dehaeze/Downloads/to-be-printed.pdf";
#+end_src
* =readbib= - Open Bibliography File

View File

@@ -5,123 +5,6 @@
#+PROPERTY: header-args:bash+ :shebang "#!/usr/bin/env bash"
#+PROPERTY: header-args:bash+ :tangle-mode (identity #o555)
* =dmenumount= - Mount USB and Android
:PROPERTIES:
:CUSTOM_ID: dmenumount
:END:
Script taken from Luke Smith.
#+begin_src bash :tangle ~/.local/bin/dmenumount
getmount() { \
[ -z "$chosen" ] && exit 1
# shellcheck disable=SC2086
mp="$(find $1 2>/dev/null | dmenu -i -p "Type in mount point.")" || exit 1
[ "$mp" = "" ] && exit 1
if [ ! -d "$mp" ]; then
mkdiryn=$(printf "No\\nYes" | dmenu -i -p "$mp does not exist. Create it?") || exit 1
[ "$mkdiryn" = "Yes" ] && (mkdir -p "$mp" || sudo -A mkdir -p "$mp")
fi
}
mountusb() { \
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?")" || exit 1
chosen="$(echo "$chosen" | awk '{print $1}')"
sudo -A mount "$chosen" 2>/dev/null && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not ( -path *%s -prune ) ",$3}')
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
partitiontype="$(lsblk -no "fstype" "$chosen")"
case "$partitiontype" in
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
,*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
esac
notify-send "💻 USB mounting" "$chosen mounted to $mp."
}
mountandroid() { \
chosen="$(echo "$anddrives" | dmenu -i -p "Which Android device?")" || exit 1
chosen="$(echo "$chosen" | cut -d : -f 1)"
getmount "$HOME -maxdepth 3 -type d"
simple-mtpfs --device "$chosen" "$mp"
echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1
simple-mtpfs --device "$chosen" "$mp"
notify-send "🤖 Android Mounting" "Android device mounted to $mp."
}
asktype() { \
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Mount a USB drive or Android device?")" || exit 1
case $choice in
USB) mountusb ;;
Android) mountandroid ;;
esac
}
anddrives=$(simple-mtpfs -l 2>/dev/null)
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$4==""{printf "%s (%s)\n",$1,$3}')"
if [ -z "$usbdrives" ]; then
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
echo "Android device(s) detected."
mountandroid
else
if [ -z "$anddrives" ]; then
echo "USB drive(s) detected."
mountusb
else
echo "Mountable USB drive(s) and Android device(s) detected."
asktype
fi
fi
#+end_src
* =dmenuumount= - Unmount USB and Android devices
:PROPERTIES:
:CUSTOM_ID: dmenuumount
:END:
Script taken from Luke Smith.
#+begin_src bash :tangle ~/.local/bin/dmenuumount
unmountusb() {
[ -z "$drives" ] && exit
chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1
chosen="$(echo "$chosen" | awk '{print $1}')"
[ -z "$chosen" ] && exit
sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted."
}
unmountandroid() { \
chosen="$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")" || exit 1
[ -z "$chosen" ] && exit
sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted."
}
asktype() { \
choice="$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" || exit 1
case "$choice" in
USB) unmountusb ;;
Android) unmountandroid ;;
esac
}
drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s)\n",$4,$3}')
if ! grep simple-mtpfs /etc/mtab; then
[ -z "$drives" ] && echo "No drives to unmount." && exit
echo "Unmountable USB drive detected."
unmountusb
else
if [ -z "$drives" ]
then
echo "Unmountable Android device detected."
unmountandroid
else
echo "Unmountable USB drive(s) and Android device(s) detected."
asktype
fi
fi
#+end_src
* =dmenukill= - Kill program using Dmenu
:PROPERTIES:
:CUSTOM_ID: dmenukill
@@ -135,7 +18,7 @@ if [ ! -z "$ps_line" ]; then
name=$(echo $ps_line | awk '{print $4}')
kill -15 $pid && \
notify-send "Kill" "$name (PID $pid)" &
dunstify "Kill" "$name (PID $pid)" &
fi
#+end_src
@@ -147,19 +30,21 @@ fi
To use this this, =nordvpn= must be installed: =yay -S nordvpn-bin=.
In order to populate the country list, =nordvpn countries | tr '\t' '\n' | sed -r '/^\s*$/d' > ~/.local/data/nordvpn_countries.txt=.
#+begin_src bash :tangle ~/.local/bin/nordvpn-toggle
tmpfile="/tmp/vpnstatus";
if [[ $(nordvpn status) == *"Connected"* ]]; then
nordvpn disconnect && \
notify-send "VPN" "Disconnected" && \
dunstify --replace=23198 "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'`;
notify-send "VPN" "Connecting to $country...";
dunstify --replace=23198 "VPN" "Connecting to $country...";
nordvpn connect $country && \
notify-send "VPN" "Connected to $country" && \
dunstify --replace=23198 "VPN" "Connected to $country" && \
echo "on" > $tmpfile;
fi
#+end_src
@@ -254,7 +139,7 @@ if [[ $status != "Copy" ]]; then
if [ -z "$name" ]; then
exit;
fi
filename=~/Pictures/$name.png
filename=~/Cloud/pictures/screenshots/$name.png
fi
case "$status" in
@@ -322,10 +207,10 @@ ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -
#+begin_src bash :tangle ~/.local/bin/yt-audio
if [ $TMUX ]; then
tmux split -v -l 5 "cd ~/Downloads/ && youtube-dl --add-metadata -xic -f bestaudio/best $1" && tmux select-pane -U
tmux split -v -l 5 "cd ~/Downloads/ && yt-dlp --add-metadata -xic --audio-format best $1" && tmux select-pane -U
else
cd ~/Downloads/;
setsid nohup youtube-dl --add-metadata -xic -f bestaudio/best $1 &> /dev/null &
setsid nohup yt-dlp --add-metadata -xic --audio-format flac $1 &> /dev/null &
fi
#+end_src
@@ -336,12 +221,13 @@ fi
#+begin_src bash :tangle ~/.local/bin/yt-video
if [ $TMUX ]; then
tmux split -v -l 5 "cd ~/Downloads/ && youtube-dl --add-metadata -ic $1" && tmux select-pane -U
tmux split -v -l 5 "cd ~/Downloads/ && yt-dlp --add-metadata -ic $1" && tmux select-pane -U
else
cd ~/Downloads/;
setsid nohup youtube-dl --add-metadata -ic $1 &> /dev/null &
setsid nohup yt-dlp --add-metadata -ic $1 &> /dev/null &
fi
#+end_src
* =setbg= - Set Background
:PROPERTIES:
:CUSTOM_ID: setbg
@@ -384,7 +270,7 @@ if [ -n "$1" ]; then
xdotool key Shift+Insert
else
echo "$chosen" | tr -d '\n' | xsel -ib
notify-send "'$chosen' copied to clipboard." &
dunstify "'$chosen' copied to clipboard." &
fi
#+end_src
@@ -408,7 +294,7 @@ if [ -n "$1" ]; then
xdotool key Shift+Insert
else
echo "$chosen" | tr -d '\n' | xsel -ib
notify-send "'$chosen' copied to clipboard." &
dunstify "'$chosen' copied to clipboard." &
fi
#+end_src
@@ -432,6 +318,8 @@ case "$1" in
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && zathura "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
,*svg)
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && inkview "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
,*torrent)
stig add "$1" >/dev/null 2>&1 & ;;
,*mp3|*flac|*opus|*mp3?source*)
setsid curl -LO "$1" >/dev/null 2>&1 & ;;
,*)
@@ -519,8 +407,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 && \
notify-send 'Upload' 'Successful' || \
notify-send --urgency=critical 'Upload' 'Failed'
dunstify 'Upload' 'Successful' || \
dunstify --urgency=critical 'Upload' 'Failed'
fi
#+end_src
@@ -553,54 +441,7 @@ else
fi
#+end_src
* =pdf2bib= - Extract bibtex entry from PDF file
:PROPERTIES:
:CUSTOM_ID: pdf2bib
:END:
#+begin_src bash :tangle ~/.local/bin/pdf2bib
pdf2doi () {
pdfinfo "$1" | grep -io "doi:.*" | grep -Poi "10.\d+/[^\s]+" || \
pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1 | grep -Poi "10.\d+/[^\s]+" || \
pdftotext "$1" 2>/dev/null - | grep -Poi "10.\d+/[^\s]+"
}
doi2bib () {
# curl -LHs "Accept: application/x-bibtex" http://dx.doi.org/$1 -w "\\n"
curl -s "http://api.crossref.org/works/$1/transform/application/x-bibtex" -w "\\n"
}
# If a file is specified, try to extract DOI from the file
if [ -f "$1" ]; then
doi=$(pdf2doi "$1")
fi
if hash rofi 2>/dev/null; then
doi=$(echo "$doi" | rofi -i -dmenu -p "DOI")
else
doi=$(echo "$doi" | dmenu -i -p "DOI")
fi
if [ -n "$1" ]; then
doi2bib $doi | xsel -ib && \
notify-send 'BibTeX' 'Copied to Clipboard' || \
notify-send --urgency=critical 'BibTeX' 'Failed'
fi
#+end_src
* =pdf2png= - Convert a PDF to PNG
:PROPERTIES:
:CUSTOM_ID: pdf2png
:END:
#+begin_src bash :tangle ~/.local/bin/pdf2png
# Check if the input argumetn is a PDF file
if [[ -f "$1" && "$1" == *.pdf ]]; then
pdftoppm -png "$1" > "$(echo "$1" | cut -f 1 -d '.' | sed 's/$/.png/')"
fi
#+end_src
* TODO =convert-file= - Convert any file to another filetype
* =convert-file= - Convert any file to another filetype
:PROPERTIES:
:CUSTOM_ID: convert-file
:header-args: :tangle ~/.local/bin/convert-file
@@ -612,6 +453,8 @@ fi
filename_with_extension=$(basename -- "$1")
# Extract extension of the file
in_ext="${filename_with_extension##*.}"
# To lowercase
in_ext="${in_ext,,}"
# filename without extension
filename_without_extension=${filename_with_extension%.*}
#+end_src
@@ -624,7 +467,7 @@ List of useful programs:
#+begin_src bash
svg2png_function() { \
if command -v inkscape &> /dev/null; then
inkscape --export-type="$out_ext" --export-dpi=200 --export-area-drawing "$filename_with_extension"
inkscape --export-type="png" --export-filename="$filename_without_extension.png" --export-dpi=500 --export-area-drawing "$filename_with_extension"
fi
}
#+end_src
@@ -633,7 +476,7 @@ svg2png_function() { \
#+begin_src bash
svg2pdf_function() { \
if command -v inkscape &> /dev/null; then
inkscape --export-type="$out_ext" "$filename_with_extension"
inkscape --export-type="pdf" --export-filename="$filename_without_extension.pdf" "$filename_with_extension"
fi
}
#+end_src
@@ -890,11 +733,22 @@ gif2png_function() { \
}
#+end_src
*** GIF to mp4
#+begin_src bash
gif2mp4_function() { \
if command -v ffmpeg &> /dev/null; then
loop_num=$(rofi -dmenu -p "Number of loops")
ffmpeg -stream_loop $loop_num -i $filename_with_extension -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" "$filename_without_extension.mp4"
fi
}
#+end_src
*** Main function
#+begin_src bash
# Convert GIF Files
gif2() { \
out_ext=$(echo -e "png" | rofi -i -dmenu -p "Convert GIF to")
out_ext=$(echo -e "png\nmp4" | rofi -i -dmenu -p "Convert GIF to")
if [ -z "$out_ext" ]; then
exit;
@@ -904,6 +758,9 @@ gif2() { \
"png")
gif2png_function
;;
"mp4")
gif2mp4_function
;;
esac
}
#+end_src
@@ -952,11 +809,20 @@ pngresize_function() { \
}
#+end_src
*** PNG Crop
#+begin_src bash
pngcrop_function() { \
if command -v cropgui &> /dev/null; then
cropgui "$filename_with_extension"
fi
}
#+end_src
*** Main function
#+begin_src bash
# Convert PNG Files
png2() { \
out_ext=$(echo -e "pdf\njpg\ntrim\nresize" | rofi -i -dmenu -p "Convert PNG to")
out_ext=$(echo -e "pdf\njpg\ntrim\nresize\ncrop" | rofi -i -dmenu -p "Convert PNG to")
if [ -z "$out_ext" ]; then
exit;
@@ -969,6 +835,9 @@ png2() { \
"jpg")
png2jpg_function
;;
"crop")
pngcrop_function
;;
"trim")
pngtrim_function
;;
@@ -989,6 +858,15 @@ jpg2pdf_function() { \
}
#+end_src
*** JPG to PNG
#+begin_src bash
jpg2png_function() { \
if command -v convert &> /dev/null; then
convert "$filename_with_extension" "$filename_without_extension.png"
fi
}
#+end_src
*** JPG Resize
#+begin_src bash
jpgresize_function() { \
@@ -1005,11 +883,39 @@ jpgresize_function() { \
}
#+end_src
*** JPG Rotate
#+begin_src bash
jpgrotate_function() { \
if command -v convert &> /dev/null; then
# convert "$filename_with_extension" -rotate 90 /tmp/output.jpg && mv /tmp/output.jpg "$filename_with_extension"
convert "$filename_with_extension" -rotate 90 "$filename_with_extension"
fi
}
#+end_src
*** JPG Trim
#+begin_src bash
jpgtrim_function() { \
if command -v convert &> /dev/null; then
convert -trim "$filename_with_extension" "$filename_with_extension"
fi
}
#+end_src
*** JPG Crop
#+begin_src bash
jpgcrop_function() { \
if command -v cropgui &> /dev/null; then
cropgui "$filename_with_extension"
fi
}
#+end_src
*** Main function
#+begin_src bash
# Convert JPG Files
jpg2() { \
out_ext=$(echo -e "pdf\nresize" | rofi -i -dmenu -p "Convert JPG to")
out_ext=$(echo -e "pdf\npng\nresize\ncrop\ntrim\nrotate" | rofi -i -dmenu -p "Convert JPG to")
if [ -z "$out_ext" ]; then
exit;
@@ -1019,9 +925,49 @@ jpg2() { \
"pdf")
jpg2pdf_function
;;
"png")
jpg2png_function
;;
"resize")
jpgresize_function
;;
"crop")
jpgcrop_function
;;
"trim")
jpgtrim_function
;;
"rotate")
jpgrotate_function
;;
esac
}
#+end_src
** XOPP files
*** XOPP to PDF
#+begin_src bash
xopp2pdf_function() { \
if command -v xournalpp &> /dev/null; then
xournalpp -p "$filename_without_extension.pdf" "$filename_with_extension"
fi
}
#+end_src
*** Main function
#+begin_src bash
# Convert XOPP Files
xopp2() { \
out_ext=$(echo -e "pdf" | rofi -i -dmenu -p "Convert XOPP to")
if [ -z "$out_ext" ]; then
exit;
fi
case "$out_ext" in
"pdf")
xopp2pdf_function
;;
esac
}
#+end_src
@@ -1048,11 +994,20 @@ mp42gif_function() { \
}
#+end_src
*** MP4 remove sound
#+begin_src bash
mp4nosound_function() { \
if command -v ffmpeg &> /dev/null; then
ffmpeg -i "$filename_with_extension" -c copy -an "$filename_without_extension-nosound.mp4"
fi
}
#+end_src
*** Main function
#+begin_src bash
# Convert MP4 Files
mp42() { \
out_ext=$(echo -e "gif" | rofi -i -dmenu -p "Convert MP4 to")
out_ext=$(echo -e "gif\nremove sound" | rofi -i -dmenu -p "Convert MP4 to")
if [ -z "$out_ext" ]; then
exit;
@@ -1062,6 +1017,9 @@ mp42() { \
"gif")
mp42gif_function
;;
"remove sound")
mp4nosound_function
;;
esac
}
#+end_src
@@ -1096,9 +1054,12 @@ case "$in_ext" in
"docx")
docx2
;;
"pttx")
"pptx")
docx2
;;
"xopp")
xopp2
;;
esac
#+end_src
@@ -1107,6 +1068,7 @@ esac
:CUSTOM_ID: preview-file
:header-args: :tangle ~/.local/bin/preview-file
:END:
** Get basic information about the file
#+begin_src bash
# Get filename
@@ -1175,129 +1137,6 @@ case "$in_ext" in
esac
#+end_src
* =pdf-shrink= - Pdf Shrink
:PROPERTIES:
:CUSTOM_ID: pdf-shrink
:END:
Simply reduces the size of a given pdf file.
#+begin_src bash :tangle ~/.local/bin/pdf-shrink
shrink ()
{
gs \
-q -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.3 \
-dPDFSETTINGS=/screen \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-dAutoRotatePages=/None \
-dColorImageDownsampleType=/Bicubic \
-dColorImageResolution=$3 \
-dGrayImageDownsampleType=/Bicubic \
-dGrayImageResolution=$3 \
-dMonoImageDownsampleType=/Subsample \
-dMonoImageResolution=$3 \
-sOutputFile="$2" \
"$1"
}
check_smaller ()
{
# If $1 and $2 are regular files, we can compare file sizes to
# see if we succeeded in shrinking. If not, we copy $1 over $2:
if [ ! -f "$1" -o ! -f "$2" ]; then
return 0;
fi
ISIZE="$(echo $(wc -c "$1") | cut -f1 -d\ )"
OSIZE="$(echo $(wc -c "$2") | cut -f1 -d\ )"
if [ "$ISIZE" -lt "$OSIZE" ]; then
echo "Input smaller than output, doing straight copy" >&2
cp "$1" "$2"
fi
}
usage ()
{
echo "Reduces PDF filesize by lossy recompressing with Ghostscript."
echo "Not guaranteed to succeed, but usually works."
echo " Usage: $1 infile [outfile] [resolution_in_dpi]"
}
IFILE="$1"
# Need an input file:
if [ -z "$IFILE" ]; then
usage "$0"
exit 1
fi
# Output filename defaults to "-" (stdout) unless given:
if [ ! -z "$2" ]; then
OFILE="$2"
else
OFILE="-"
fi
# Output resolution defaults to 90 unless given:
if [ ! -z "$3" ]; then
res="$3"
else
res="90"
fi
shrink "$IFILE" "$OFILE" "$res" || exit $?
check_smaller "$IFILE" "$OFILE"
#+end_src
* =pdf-delete-annotations= - Delete Annotations from PDFs
:PROPERTIES:
:CUSTOM_ID: pdf-delete-annotations
:END:
Taken from this [[https://gist.github.com/stefanschmidt/5248592][gist]].
#+begin_src bash :tangle ~/.local/bin/pdf-delete-annotations
# Check if the input argumetn is a PDF file
if [[ -f "$1" && "$1" == *.pdf ]]; then
pdftk $1 output /tmp/uncompressed.pdf uncompress
LANG=C sed -n '/^\/Annots/!p' /tmp/uncompressed.pdf > /tmp/stripped.pdf
pdftk /tmp/stripped.pdf output $1 compress
fi
#+end_src
* =pdf-delete-first-page= - Delete first page of PDF
:PROPERTIES:
:CUSTOM_ID: pdf-delete-first-page
:END:
The requirement is to have =pdftk= or =stapler= installed.
#+begin_src bash :tangle ~/.local/bin/pdf-delete-first-page
# Check if the input argumetn is a PDF file
if [[ -f $1 && $1 == *.pdf ]]; then
if type stapler > /dev/null 2>&1; then
stapler del "$1" 1 /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
elif type pdftk > /dev/null 2>&1; then
pdftk "$1" cat 2-end output /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
else
echo "Neither pdftk nor stapler are installed"
fi
fi
#+end_src
* =rofi-calc= - Simple Calculation using Rofi
:PROPERTIES:
:CUSTOM_ID: rofi-calc
:END:
Run some simple calculations with =rofi=.
#+begin_src bash :tangle ~/.local/bin/rofi-calc
rofi -show calc -mode calc -no-show-match -no-sort
#+end_src
* =pass-gen= - Generate Random Alphanumeric Password
:PROPERTIES:
:CUSTOM_ID: pass-gen
@@ -1317,7 +1156,7 @@ fi
# Send the password to the clipboard
printf "$pass" | xclip -sel clip && \
notify-send 'Password' 'Generated'
dunstify 'Password' 'Generated'
#+end_src
* =sxhkd-help= - List of keybindings using Rofi
@@ -1332,11 +1171,10 @@ awk '/^[a-z]/ && last {print "<small>",$0,"\t",last,"</small>"} {last=""} /^#/{l
#+end_src
* =qrdecode= - Decode QRcode by taking screenshot
- =zbar-tools=
- =main=
- =xclip=
- =notify-send=
To install:
#+begin_src bash :tangle no
paru -S zbar maim xclip dunstify
#+end_src
#+begin_src bash :tangle ~/.local/bin/qrdecode
image_file="/tmp/ocr.png"
@@ -1366,7 +1204,7 @@ fi
printf %b "$decoded_text" | xclip -selection clip
# Let us know that something was decoded
notify-send "qrshot" "$decoded_text"
dunstify "qrshot" "$decoded_text"
# Cleaning up the trash that was left behind
rm $image_file

View File

@@ -1,53 +0,0 @@
#+TITLE: BSPWM
#+SETUPFILE: ./setup/org-setup-file.org
#+PROPERTY: header-args:bash :comments both
#+PROPERTY: header-args:bash+ :mkdirp yes
#+PROPERTY: header-args:bash+ :shebang "#!/bin/sh"
#+PROPERTY: header-args:bash+ :tangle ~/.config/bspwm/bspwmrc
* List Desktops
#+begin_src bash
bspc monitor -d code web mail misc figs
#+end_src
* Basic Config
#+begin_src bash
bspc config border_width 1
bspc config window_gap 8
bspc config top_padding 27 # top_padding I set equal to polybar's height
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focus_follows_pointer true
#+end_src
* Colors
#+begin_src bash
bspc config normal_border_color \#32302f
bspc config focused_border_color \#bdae93
#+end_src
* Rules
Use =xprop= to obtain information about the window.
#+begin_src bash
# If refreshing bspwm, remove all previous rules to prevent doubling up.
bspc rule -r "*"
bspc rule --add qutebrowser desktop='web' follow=on state=tiled
bspc rule --add Emacs desktop='code' follow=on state=tiled
bspc rule --add Zathura state=tiled
bspc rule --add Pavucontrol state=floating
bspc rule --add Blueman-manager state=floating
#+end_src
* Run Polybar and SXHKD
#+begin_src bash
polybar top >>/tmp/polybar.log 2>&1 &
sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc.bspwm &
#+end_src

View File

@@ -14,18 +14,18 @@ status_path = "~/.config/vdirsyncer/status/"
[pair radicale_calendar]
a = "radicale_calendar_remote"
b = "radicale_calendar_local"
collections = ["76bfc802-3186-e3af-f688-7e165115b4f8", "f78f1649-b54e-7bfe-488d-6a7005a5aa2f"]
collections = ["76bfc802-3186-e3af-f688-7e165115b4f8", "f78f1649-b54e-7bfe-488d-6a7005a5aa2f", "627e2bee-7d6a-49dc-128e-fc7a8aed1e8b"]
conflict_resolution = "a wins"
[storage radicale_calendar_remote]
type = "caldav"
url = "https://radicale.tdehaeze.xyz/tdehaeze/"
username = "tdehaeze"
password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
password.fetch = ["command", "~/.local/bin/get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
[storage radicale_calendar_local]
type = "filesystem"
path = "~/.calendars/radicale/"
path = "~/.local/share/calendars/radicale/"
fileext = ".ics"
[pair esrf_calendar]
@@ -38,11 +38,11 @@ conflict_resolution = "a wins"
type = "caldav"
url = "https://calendar.esrf.fr/egroupware/groupdav.php/calendar"
username = "dehaeze"
password.fetch = ["command", "get-pass", "esrf.fr/dehaeze"]
password.fetch = ["command", "~/.local/bin/get-pass", "esrf.fr/dehaeze"]
[storage esrf_calendar_local]
type = "filesystem"
path = "~/.calendars/esrf/"
path = "~/.local/share/calendars/esrf/"
fileext = ".ics"
[pair radicale_contacts]
@@ -53,14 +53,14 @@ conflict_resolution = "a wins"
[storage radicale_contacts_local]
type = "filesystem"
path = "~/.contacts/"
path = "~/.local/share/contacts/"
fileext = ".vcf"
[storage radicale_contacts_remote]
type = "carddav"
url = "https://radicale.tdehaeze.xyz/tdehaeze/"
username = "tdehaeze"
password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
password.fetch = ["command", "~/.local/bin/get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
#+END_SRC
* =khal= - CLI calendar application
@@ -73,19 +73,23 @@ password.fetch = ["command", "get-pass", "radicale.tdehaeze.xyz/tdehaeze"]
[calendars]
[[Home]]
path = ~/.calendars/radicale/76bfc802-3186-e3af-f688-7e165115b4f8/
path = ~/.local/share/calendars/radicale/76bfc802-3186-e3af-f688-7e165115b4f8/
color = "#B8BB26" # Green
[[Orgmode]]
path = ~/.local/share/calendars/radicale/627e2bee-7d6a-49dc-128e-fc7a8aed1e8b/
color = "#D3869B" # aqua
[[Thesis]]
path = ~/.calendars/radicale/f78f1649-b54e-7bfe-488d-6a7005a5aa2f/
path = ~/.local/share/calendars/radicale/f78f1649-b54e-7bfe-488d-6a7005a5aa2f/
color = "#FB4934" # Red
[[ESRF]]
path = ~/.calendars/esrf/calendar/
path = ~/.local/share/calendars/esrf/calendar/
color = "#83A598" # Blue
[[Birthdays]]
path = ~/.contacts/98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7/
path = ~/.local/share/contacts/98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7/
color = "#D3869B" # aqua
type = birthdays
@@ -98,6 +102,7 @@ highlight_event_days = True
[locale]
local_timezone= Europe/Berlin
default_timezone= Europe/Berlin
weeknumbers= left
timeformat= %H:%M
dateformat= %d.%m.
longdateformat= %d.%m.%Y
@@ -119,7 +124,7 @@ new = c
#+BEGIN_SRC conf
[addressbooks]
[[contacts]]
path = ~/.contacts/98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7/
path = ~/.local/share/contacts//98ee5e2c-afcf-70e0-c4a2-9fb9de2e97b7/
[general]
debug = no
@@ -188,7 +193,7 @@ if [[ -f $1 ]]; then
exit;
fi
khal import -a "$calendar" --batch "$1" && \
notify-send --hint=string:x-dunst-stack-tag:fJeNG8gc "Calendar" "Even added";
dunstify "Calendar" "Even added";
fi
fi
#+end_src

View File

@@ -16,7 +16,7 @@ shadow-exclude = [
"window_type = 'dnd'",
"class_g = 'VirtualBox'",
"class_g ?= 'Notify-osd'",
"name = 'cpt_frame_window'", # For zoom problem when sharing screen
"name = 'cpt_frame_xcb_window'", # For zoom problem when sharing screen
"class_g = 'stalonetray'"
];
#+END_SRC

View File

@@ -9,12 +9,26 @@ Host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p.socket
# Host backup
# hostname <<get-password(passname="ip/homelab")>>
# Port 2022
# user thomas
# IdentityFile ~/.ssh/id_rsa
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
IdentityFile ~/.ssh/id_rsa
PubkeyAcceptedAlgorithms +ssh-rsa
HostkeyAlgorithms +ssh-rsa
Host *.esrf.fr
User dehaeze
IdentityFile ~/.ssh/id_rsa
@@ -26,7 +40,6 @@ Host firewall.esrf.fr
Match host *.esrf.fr !host firewall.esrf.fr !exec "~/.ssh/esrf-test"
ProxyJump firewall.esrf.fr
Host rnice
Port 22
user dehaeze
@@ -34,7 +47,7 @@ Host rnice
#+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.)"
test -n "$(ping -c1 -W1 -q proxy.esrf.fr. &> /dev/null )"
#+end_src
* Font
@@ -70,7 +83,7 @@ test -n "$(timeout 1s dig +short proxy.esrf.fr.)"
* GnuPG
:PROPERTIES:
:header-args: :tangle ~/.gnupg/gpg-agent.conf
:header-args: :tangle ~/.config/gnupg/gpg-agent.conf
:header-args+: :comments both :mkdirp yes
:END:
@@ -104,35 +117,6 @@ lat=45.1
lon=5.7
#+end_src
* dmenu
:PROPERTIES:
:header-args: :tangle ~/.dmenurc
:header-args+: :comments both :mkdirp yes
:END:
#+BEGIN_SRC conf
# define the font for dmenu to be used
DMENU_FN="Hack Nerd Font 12"
# background colour for unselected menu-items
DMENU_NB="#222D31"
# textcolour for unselected menu-items
DMENU_NF="#F9FAF9"
# background colour for selected menu-items
DMENU_SB="#16A085"
# textcolour for selected menu-items
DMENU_SF="#F9FAF9"
# command for the terminal application to be used:
TERMINAL_CMD="terminal -e"
# export our variables
DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB"
#+END_SRC
* Locale
:PROPERTIES:
:header-args: :tangle ~/.config/locale.conf
@@ -727,4 +711,44 @@ It is very important that =~/.netrc= as =600= permissions.
machine torrent.tdehaeze.xyz
login tdehaeze
password <<get-password(passname="nas/transmission")>>
machine prowlarr.tdehaeze.xyz
login tdehaeze
password <<get-password(passname="prowlarr.tdehaeze.xyz/tdehaeze")>>
#+end_src
* Gotify Dunst
#+begin_src conf :comments none :mkdirp yes :noweb yes :tangle ~/.config/gotify-dunst/gotify-dunst.conf
[server]
ssl=true
domain=gotify.tdehaeze.xyz
token=<<get-password(passname="nas/gotify_laptop")>>
#+end_src
* SMBCredentials
#+begin_src conf :comments none :mkdirp yes :noweb yes :tangle ~/.smbcredentials :tangle-mode (identity #o600)
user=dehaeze
password=<<get-password(passname="esrf.fr/dehaeze")>>
domain=esrf
#+end_src
* Keyboard repetition rate
Install [[https://github.com/SFTtech/xautocfg][xautocfg]] with =paru -S xautocfg=.
Then create =~/.config/xautocfg.cfg= with:
#+begin_src conf :tangle ~/.config/xautocfg.cfg
# xautocfg config
[keyboard]
# set keyboard repeat rate for every keyboard automatically
# equivalent one-time invocation:
# xset r rate 220 45
# when to start repeating
delay = 200
# rate in hz for repetitions
rate = 40
#+end_src
And then enable the service with: =systemctl --user enable xautocfg.service=

1262
doom.org

File diff suppressed because it is too large Load Diff

26
git.org
View File

@@ -1,9 +1,9 @@
#+TITLE: Git Configuration
#+SETUPFILE: ./setup/org-setup-file.org
* =~/.gitconfig=
* =gitconfig=
:PROPERTIES:
:header-args:conf: :tangle ~/.gitconfig
:header-args:conf: :tangle ~/.config/git/config
:header-args:conf+: :comments both :mkdirp yes
:END:
@@ -157,12 +157,10 @@
# http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html
precomposeunicode = false
pager = diff-so-fancy | less --tabs=4 -RFX
autocrlf = input
# Open vim, start Goyo and enter insert mode on the first line
editor = "nvim -c ':Goyo' -c 'goto 1' -c 'startinsert'"
# editor = "nvim -c ':Goyo' -c 'goto 1' -c 'startinsert'"
#+END_SRC
** Credentials using pass
@@ -180,24 +178,6 @@
username = dehaeze
#+END_SRC
** Diff-so-fancy
#+begin_src conf
[diff-so-fancy]
markEmptyLines = false
#+end_src
* =~/.gitignore_global= - Global Git Ignore
:PROPERTIES:
:header-args:conf: :tangle ~/.gitignore_global
:header-args:conf+: :comments both :mkdirp yes
:END:
#+BEGIN_SRC conf
*~
.DS_Store
Session.vim
#+END_SRC
* =pass-git-helper= - Use =pass= for git passwords
:PROPERTIES:
:header-args: :tangle ~/.config/pass-git-helper/git-pass-mapping.ini

View File

@@ -3,7 +3,7 @@
* GTK-2.0
:PROPERTIES:
:header-args: :tangle ~/.gtkrc-2.0.mine
:header-args: :tangle ~/.config/gtkrc-2.0
:header-args+: :comments both :mkdirp yes
:END:

File diff suppressed because it is too large Load Diff

16
i3.org
View File

@@ -16,9 +16,9 @@ set $mod Mod4
* Border Style
#+begin_src conf
# Use custom colors for black
new_window pixel 1
new_float normal
default_border pixel 2
default_floating_border pixel 2
for_window [class="^.*"] border pixel 2
#+end_src
Hide borders
@@ -72,11 +72,6 @@ workspace_layout default
focus_follows_mouse no
#+end_src
* Border
#+begin_src conf
default_border pixel 2
#+end_src
* Settings for i3-gaps
#+begin_src conf
gaps inner 10
@@ -133,12 +128,17 @@ for_window [title="Simulink Library Browser"] floating enable
for_window [class="Floating"] floating enable, resize set 800 600, move position 1100 460
for_window [class="mpv"] floating enable # Size/Position is defined in mpv.conf
for_window [class="Sxiv"] floating enable, resize set 800 600, move position center
for_window [class="Cropgui"] floating enable, resize set 800 600, move position center
for_window [title="khal"] floating enable, resize set 600 600, move position center
for_window [title="ncmpcpp"] floating enable, resize set 800 400, move position center
for_window [title="stig"] floating enable, resize set 800 400, move position center
for_window [title="Sensors"] floating enable, resize set 800 400, move position center
for_window [title="TexText"] floating enable, resize set 800 400, move position center
for_window [title="nmtui"] floating enable, resize set 800 600, move position center
for_window [title="Xournal"] floating enable, resize set 1100 750, move position center
for_window [title="esrf-phonebook"] floating enable, resize set 1400 400, move position center
for_window [title="zoom "] floating enable
for_window [title="F3D"] floating enable, resize set 800 600, move position center
#+end_src
* Scratchpad

View File

@@ -7,7 +7,7 @@
The general installation procedure is described [[file:install.org][here]].
There are Specific configuration files for:
- *Windows Manager*: [[file:bspwm.org][BSPWM]] and [[file:i3.org][I3]]
- *Windows Manager*: [[file:i3.org][I3]]
- *Hotkey Manager*: [[file:sxhkd.org][SXHKD]]
- *Status Bar*: [[file:polybar.org][Polybar]]
- *Launcher*: [[file:rofi.org][Rofi]]
@@ -24,7 +24,6 @@ There are Specific configuration files for:
- *Video Setup*: [[file:video.org][Mpv]]
- *Web Browser*: [[file:qutebrowser.org][Qutebrowser]]
- *PDF Reader*: [[file:zathura.org][Zathura]]
- *GUI File Manager*: [[file:pcmanfm.org][PCManFM]]
- *Terminal File Manager*: [[file:ranger.org][Ranger]]
- *Calendar and Contacts*: [[file:calendar-contact.org][Vdirsyncer, Khal and Khard]]
- *Mails*: [[file:mail.org][Mbsync, Msmtp, Mu and Neomutt]]

View File

@@ -4,6 +4,29 @@
#+PROPERTY: header-args :comments no
#+PROPERTY: header-args+ :mkdirp yes
#+begin_src conf :tangle /home/thomas/.config/inkscape/palettes/reasonable_colors.gpl
GIMP Palette
Name: Matlab Colors
#
# Last update: 26.04.2022
#
# Original palette by Matthew Howell
# reasonable.work/colors
#
# GPL palette coded by Rob Mocci (with permission)
# patreon.com/rmocci
#
0 114 189
217 83 25
237 177 32
126 47 142
119 172 48
77 190 238
162 20 47
0 0 0
255 255 255
#+end_src
* Save Selection to SVG extension
** =ink= file

File diff suppressed because it is too large Load Diff

View File

@@ -3,12 +3,12 @@
Installation:
#+begin_src bash :tangle no
sudo apt install mbsync msmtp maildir-utils neomutt lynx
paru -S mbsync msmtp neomutt lynx urlview
#+end_src
* =mbsync= - Synchronize Mailboxes
:PROPERTIES:
:header-args:conf: :tangle ~/.mbsyncrc
:header-args:conf: :tangle ~/.config/isync/mbsyncrc
:header-args:conf+: :comments both :mkdirp yes
:CUSTOM_ID: mbsync
:END:
@@ -40,8 +40,8 @@ IMAPStore gmail-remote
Account gmail
MaildirStore gmail-local
Path ~/.mail/gmail/
Inbox ~/.mail/gmail/Inbox
Path ~/.local/share/mails/gmail/
Inbox ~/.local/share/mails/gmail/Inbox
Channel gmail-Home
Far :gmail-remote:INBOX
@@ -106,8 +106,8 @@ IMAPStore esrf-remote
Account esrf
MaildirStore esrf-local
Path ~/.mail/esrf/
Inbox ~/.mail/esrf/Inbox
Path ~/.local/share/mails/esrf/
Inbox ~/.local/share/mails/esrf/Inbox
Channel esrf-Home
Far :esrf-remote:INBOX
@@ -171,8 +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
# proxy_host localhost
# proxy_port 8080
#+END_SRC
** ESRF Account
@@ -589,7 +589,6 @@ Write/Reply/Forward mail
#+BEGIN_SRC conf
bind index,pager p recall-message
bind index,pager m mail
bind index,pager M resend-message
bind index,pager r reply
bind index,pager R group-reply
bind index,pager b bounce-message
@@ -603,6 +602,7 @@ bind index,pager s sync-mailbox
Sync email
#+BEGIN_SRC conf
macro index,pager e "<shell-escape>$HOME/.config/neomutt/bin/get_new_esrf_mail.sh<enter>"
macro index,pager o "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh<enter>"
macro index,pager O "<shell-escape>$HOME/.config/neomutt/bin/get_new_mail.sh -a<enter>"
#+END_SRC
@@ -646,7 +646,7 @@ bind attach q exit
bind attach <return> view-mailcap
macro attach W <save-entry><kill-line>~/Downloads/<enter>y "Save entry"
macro attach W <save-entry><kill-line>$HOME/Downloads/<enter>y "Save entry"
#+end_src
*** Compose
@@ -684,7 +684,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 --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-drop --target --print-path --keep > $tmpfile && sed -i 's/\s/\\ /g' $tmpfile && echo "$(awk 'BEGIN {printf "%s", "push "} {printf "%s", "<attach-file>"$0"<enter>"}' $tmpfile)" > $tmpfile
elif [ $1 == "clean" ]; then
ls $tmpfile
fi
@@ -721,7 +721,7 @@ bind index,pager \Ch sidebar-toggle-visible
*** Reload Configuration
#+begin_src conf
macro generic,index,pager,editor ,<Space> ":source ~/.config/neomutt/neomuttrc\n" "Reload mutt's configuration file"
macro generic,index,pager,editor ,<Space> ":source $HOME/.config/neomutt/neomuttrc\n" "Reload mutt's configuration file"
#+end_src
*** urlview - Open URL in emails
@@ -738,11 +738,11 @@ macro attach,compose,index,pager \cw "\
*** Searching using Mu
#+begin_src conf
macro index,pager \Cf "<shell-escape>$HOME/.config/neomutt/bin/search_mail.sh<enter><change-folder-readonly>~/.mail/search<enter>" \
macro index,pager \Cf "<shell-escape>$HOME/.config/neomutt/bin/search_mail.sh<enter><change-folder-readonly>$HOME/.local/share/mails/search<enter>" \
"test"
# macro index,pager \Cf "<shell-escape>mu find --clearlinks --format=links --linksdir=~/.mail/search " \
# macro index,pager \Cf "<shell-escape>mu find --clearlinks --format=links --linksdir=$HOME/.local/share/mails/search " \
# "mu find"
macro index,pager gf "<change-folder-readonly>~/.mail/search<enter>" \
macro index,pager gf "<change-folder-readonly>$HOME/.local/share/mails/search<enter>" \
"mu find results"
#+end_src
@@ -782,7 +782,7 @@ message_to = message['to']
# Ask emacsclient to save a link to the message
subprocess.Popen([
'emacsclient',
f'org-protocol://capture?template=ps&url={message_id}&title={subject}&body={message_to}'
f'org-protocol://capture?template=pm&url={message_id}&title={subject}&body={message_to}'
])
#+end_src
@@ -853,13 +853,13 @@ bind editor <Tab> complete-query
** Paths
#+BEGIN_SRC conf
set folder = ~/.mail # mail location
set alias_file = ~/.config/neomutt/alias # where to store aliases
set header_cache = ~/.config/neomutt/cache/headers # where to store headers
set message_cachedir = ~/.config/neomutt/cache/bodies # where to store bodies
set certificate_file = ~/.config/neomutt/certificates # where to store certs
set mailcap_path = ~/.config/neomutt/mailcap # entries for filetypes
set tmpdir = ~/.config/neomutt/temp # where to keep temp files
set folder = $HOME/.local/share/mails # mail location
set alias_file = $HOME/.config/neomutt/alias # where to store aliases
set header_cache = $HOME/.config/neomutt/cache/headers # where to store headers
set message_cachedir = $HOME/.config/neomutt/cache/bodies # where to store bodies
set certificate_file = $HOME/.config/neomutt/certificates # where to store certs
set mailcap_path = $HOME/.config/neomutt/mailcap # entries for filetypes
set tmpdir = $HOME/.config/neomutt/temp # where to keep temp files
#+END_SRC
** Print
@@ -875,8 +875,8 @@ set spoolfile = "+esrf/Inbox" # Default inbox
set realname = "Dehaeze Thomas"
set from = "thomas.dehaeze@esrf.fr"
folder-hook gmail/* source ~/.config/neomutt/accounts/gmail
folder-hook esrf/* source ~/.config/neomutt/accounts/esrf
folder-hook gmail/* source $HOME/.config/neomutt/accounts/gmail
folder-hook esrf/* source $HOME/.config/neomutt/accounts/esrf
macro index,pager ge "<change-folder>+esrf/Inbox<enter>" "go to inbox"
macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
@@ -886,7 +886,7 @@ macro index,pager gm "<change-folder>+gmail/Inbox<enter>" "go to inbox"
**** Configuration
#+begin_src conf :tangle ~/.config/neomutt/accounts/gmail :comments none
set from = "dehaeze.thomas@gmail.com"
set sendmail = "~/.config/neomutt/bin/send_mail.sh gmail"
set sendmail = "$HOME/.config/neomutt/bin/send_mail.sh gmail"
# Other special folders.
set mbox = "+gmail/Archive" # Archive Box
@@ -894,7 +894,7 @@ set postponed = "+gmail/Drafts"
unset record # Don't copy send message to Sent folder: Gmail does that for us
set signature = "~/.config/neomutt/accounts/gmail.signature"
set signature = "$HOME/.config/neomutt/accounts/gmail.signature"
macro index,pager d \
"<save-message>+gmail/Archive<enter>" \
@@ -917,14 +917,14 @@ This empty code block is used to add a new line after signature
**** Configuration
#+begin_src conf :tangle ~/.config/neomutt/accounts/esrf :comments none
set from = "thomas.dehaeze@esrf.fr"
set sendmail = "~/.config/neomutt/bin/send_mail.sh esrf"
set sendmail = "$HOME/.config/neomutt/bin/send_mail.sh esrf"
# Other special folders.
set mbox = "+esrf/Archive"
set record = "+esrf/Sent"
set postponed = "+esrf/Drafts"
set signature = "~/.config/neomutt/accounts/esrf.signature"
set signature = "$HOME/.config/neomutt/accounts/esrf.signature"
macro index,pager d \
"<save-message>+esrf/Archive<enter>" \
@@ -1091,22 +1091,23 @@ set sidebar_format = '%D %* %?N?[%N]?'
# path - mailbox path
# unsorted - do not sort the mailboxes
set sidebar_sort_method = 'unsorted'
set sort_browser = 'unsorted'
#+END_SRC
*** Mailboxes to show in the sidebar.
#+BEGIN_SRC conf
named-mailboxes " Search" =search
named-mailboxes " Search" =search
named-mailboxes " GMAIL" =empty/gmail
named-mailboxes "  Inbox" =gmail/Inbox
named-mailboxes "  Sent" =gmail/Sent
named-mailboxes "  Drafts" =gmail/Drafts
named-mailboxes " Archive" =gmail/Archive
named-mailboxes " Archive" =gmail/Archive
named-mailboxes "  Trash" =gmail/Trash
named-mailboxes " ESRF" =empty/esrf
named-mailboxes "  Inbox" =esrf/Inbox
named-mailboxes "  Sent" =esrf/Sent
named-mailboxes "  Drafts" =esrf/Drafts
named-mailboxes " Archive" =esrf/Archive
named-mailboxes " Archive" =esrf/Archive
named-mailboxes "  Trash" =esrf/Trash
#+END_SRC
@@ -1145,16 +1146,16 @@ set abort_noattach_regex = "\\<(attach(|ed|ments?)|(attaché|attachés|attache|a
*** Search Mail
#+begin_src bash :tangle ~/.config/neomutt/bin/search_mail.sh
arg_subject=$(rofi -p "Search" -dmenu)
arg_subject=$(rofi -p "Contains" -dmenu)
arg_from=$(rofi -p "From" -dmenu)
if [ ! -z "$arg_from" ]; then
arg_from="from:${arg_from}"
arg_from="from:/.*${arg_from}.*/"
fi
arg_to=$(rofi -p "To" -dmenu)
if [ ! -z "$arg_to" ]; then
arg_to="to:${arg_to}"
arg_to="to:/.*${arg_to}.*/"
fi
arg_mime=$(echo -e "\napplication/pdf\nimage/*\nvideo/*" | rofi -i -p "Mime" -dmenu)
@@ -1162,16 +1163,16 @@ if [ ! -z "$arg_mime" ]; then
arg_mime="mime:${arg_mime}"
fi
mu find --clearlinks --format=links --linksdir=~/.mail/search "${arg_from} ${arg_to} ${arg_mime} ${arg_subject}"
mu find --clearlinks --format=links --linksdir=$HOME/.local/share/mails/search "${arg_from} ${arg_to} ${arg_mime} ${arg_subject}"
#+end_src
*** Send Mail Script
*** Sync "Send Mail" Script
#+begin_src bash :tangle ~/.config/neomutt/bin/send_mail.sh
msmtp -a $1 ${@:2} && \
if [ $TMUX ]; then
tmux split -v -l 1 mbsync $1-Sent && tmux select-pane -U
tmux split -v -l 1 mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc $1-Sent && tmux select-pane -U
else
mbsync $1-Sent
mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc $1-Sent
fi
#+end_src
@@ -1184,6 +1185,15 @@ else
fi
#+end_src
*** Sync ESRF Mail Script
#+begin_src bash :tangle ~/.config/neomutt/bin/get_new_esrf_mail.sh
if [ $TMUX ]; then
tmux split -v -l 1 mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc esrf && tmux select-pane -U
else
mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc esrf
fi
#+end_src
*** Openfile Scripts
#+begin_src bash :tangle ~/.config/neomutt/bin/openfile.sh
base=$(basename "$1")

View File

@@ -7,7 +7,7 @@
* Startup
:PROPERTIES:
:HEADER-ARGS:matlab+: :tangle ~/Documents/MATLAB/startup.m
:HEADER-ARGS:matlab+: :tangle ~/.config/matlab/startup.m
:END:
** Setup LaTeX as a default interpreter
@@ -16,7 +16,6 @@ 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
@@ -39,14 +38,12 @@ 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
@@ -88,6 +85,13 @@ format compact;
format long g;
#+end_src
** Change TMPDIR to deal with Archlinux issue
See https://fr.mathworks.com/matlabcentral/answers/1798895-invalid-cross-device-link-18-when-saving-a-file-on-arch-linux?s_tid=srchtitle
#+begin_src matlab
setenv('TMPDIR', '/home/thomas/.cache')
#+end_src
** Home Path
#+begin_src matlab
toolboxes_path = '~/Cloud/programming/matlab/';
@@ -161,7 +165,7 @@ clear;
* Setup
:PROPERTIES:
:HEADER-ARGS:matlab+: :tangle ~/Documents/MATLAB/setup.m
:HEADER-ARGS:matlab+: :tangle ~/.config/matlab/setup.m
:END:
This script should be run once after Matlab is installed.

View File

@@ -33,7 +33,7 @@ hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
connection_timeout = 30
zeroconf = Mopidy MPD server on $hostname
command_blacklist = listall,listallinfo
default_playlist_scheme = m3u
@@ -48,7 +48,7 @@ album_format = {ProductionYear} - {Name}
max_bitrate = 10000
[file]
enabled = true
enabled = false
media_dirs = /home/thomas/Music
excluded_file_extensions =
.db
@@ -81,6 +81,7 @@ Cheatsheet: https://pkgbuild.com/~jelle/ncmpcpp/
Configuration directory.
#+begin_src conf
ncmpcpp_directory = ~/.config/ncmpcpp
lyrics_directory = ~/.local/share/lyrics
#+end_src
MPD Configuration.
@@ -92,7 +93,7 @@ mpd_music_dir = ~/Music
Notification of song change.
#+begin_src conf
execute_on_song_change = notify-send --hint=string:x-dunst-stack-tag:Z7uCd3ZP "Now Playing ♫" "$(mpc current)"
execute_on_song_change = dunstify --replace=19845 "Now Playing ♫" "$(mpc current)"
#+end_src
Better user interface
@@ -104,6 +105,11 @@ browser_display_mode = "columns"
playlist_display_mode = "columns"
#+end_src
Lyrics
#+begin_src conf
lyrics_fetchers = musixmatch, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet
#+end_src
Sorting by tracking number and then title
#+begin_src conf
browser_sort_mode = "format"
@@ -160,51 +166,3 @@ def_key "-"
#+end_src
* =beets= - Media library management
:PROPERTIES:
:header-args:conf: :tangle ~/.config/beets/config.yaml
:header-args:conf+: :comments both :mkdirp yes
:CUSTOM_ID: beets
:END:
http://beets.io/
#+begin_src conf
directory: ~/Music
library: ~/Music/musiclibrary.db
art_filename: cover
import:
move: yes
plugins: fromfilename discogs
#+end_src
* =curseradio= - Radio with curseradio
:PROPERTIES:
:header-args:conf: :tangle ~/.config/curseradio/curseradio.cfg
:header-args:conf+: :comments none :mkdirp yes
:CUSTOM_ID: curseradio
:END:
#+begin_src conf
[opml]
root = http://opml.radiotime.com/
[playback]
command = /usr/bin/mpv
[interface]
keymap = vi
[keymap.vi]
up = k
down = j
start = 0
end = $
pageup = u
pagedown = d
enter = l
stop = p
exit = q
favourite = f
#+end_src

View File

@@ -1,498 +0,0 @@
#+TITLE: Newsboat Configuration
#+SETUPFILE: ./setup/org-setup-file.org
https://wiki.archlinux.org/index.php/Newsboat
https://newsboat.org/releases/2.12/docs/newsboat.html
* Config
:PROPERTIES:
:header-args: :tangle ~/.config/newsboat/config
:header-args+: :comments both :mkdirp yes
:END:
** Reload configuration
#+BEGIN_SRC conf
# All feeds will be automatically reloaded after a certain time has passed
auto-reload yes
# The number of minutes between automatic reloads.
reload-time 120
# The number of parallel reload threads that shall be started when all feeds are reloaded.
reload-threads 3
# If set to yes, then the first automatic reload will be suppressed if auto-reload is set to yes.
suppress-first-reload yes
#+END_SRC
** Basic configuration
#+BEGIN_SRC conf
confirm-exit no
external-url-viewer "urlscan -dc -r 'linkhandler {}'"
goto-first-unread no
goto-next-feed no
save-path "~/Documents/newsboat/saved"
download-path "~/Documents/newsboat/downloaded"
# If set to no, then the keymap hints on the bottom of screen will not be displayed.
show-keymap-hint no
player "mpv"
#+END_SRC
** Queries
#+begin_src conf
prepopulate-query-feeds yes
#+end_src
** Filters
#+begin_src conf :tangle no
define-filter "Unread Articles" "unread = \"yes\""
#+end_src
** Notifications
#+BEGIN_SRC conf
notify-format "%n unread articles"
notify-program ~/.config/newsboat/scripts/newsboat-notify.sh
notify-always no
#+END_SRC
*** Notification Script
:PROPERTIES:
:header-args: :tangle ~/.config/newsboat/scripts/newsboat-notify.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
notify-send "Newsboat " "$1"
#+end_src
** Bindings
#+BEGIN_SRC conf
bind-key j down
bind-key k up
bind-key j next articlelist
bind-key k prev articlelist
bind-key J next-feed articlelist
bind-key K prev-feed articlelist
bind-key G end
bind-key g home
bind-key ^D pagedown
bind-key ^U pageup
bind-key q toggle-show-read-feeds
bind-key Q quit
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
bind-key U show-urls
bind-key t set-tag
bind-key T clear-tag
bind-key r reload # Reload the currently selected feed
bind-key R reload-all # Reload all feeds
#+END_SRC
** Bookmarking
#+begin_src conf
bookmark-autopilot no
bookmark-cmd "~/.config/newsboat/scripts/buku-add.sh"
bookmark-interactive no
#+end_src
*** Buku Scripts
:PROPERTIES:
:header-args: :tangle ~/.config/newsboat/scripts/buku-add.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
buku --add "$1" --title "$2" --comment "$3" && \
notify-send "Buku" "Bookmark Added" && \
exit 0
#+end_src
** Macros - Starts with , key
#+BEGIN_SRC conf
# Default Browser
browser linkhandler
# Open in Browser
macro , open-in-browser
# Download Video with Youtube-DL
macro v set browser "cd ~/Documents/to-watch && ~/.local/bin/yt-video %u" ; open-in-browser ; set browser linkhandler
# Download Audio with Youtube-DL
macro a set browser "cd ~/Documents/to-watch && ~/.local/bin/yt-audio %u" ; open-in-browser ; set browser linkhandler
# Open Video with MPV
macro m set browser "setsid nohup mpv %u &> /dev/null &" ; open-in-browser ; set browser linkhandler
# Open With W3M
macro w set browser "w3m %u" ; open-in-browser ; set browser linkhandler
# Copy Address to clipboard
macro c set browser "xsel -b <<<" ; open-in-browser ; set browser linkhandler
# Quit
macro q set browser "tmux detach" ; open-in-browser ; set browser linkhandler
#+END_SRC
** hide articles matching
#+BEGIN_SRC conf :tangle no
ignore-article "*" "title =~ \"Sponsor\""
ignore-article "*" "title =~ \"Advertisement\""
ignore-mode "display"
#+END_SRC
** Feedlist and Article Format
#+BEGIN_SRC conf
feedlist-format "%4i %n %11u %t"
feedlist-title-format "N %V - Your feeds (%u unread, %t total)%?T? - tag `%T'&?"
articlelist-format "%3i %f %D %?T?|%-17T| ?%t"
articlelist-title-format "%N %V - Articles in feed '%T' (%u unread, %t total) - %U"
itemview-title-format "Article '%T'"
#+END_SRC
** Color Scheme
#+BEGIN_SRC conf
include "~/.config/newsboat/colors"
#+END_SRC
* Colors
:PROPERTIES:
:header-args: :tangle ~/.config/newsboat/colors
:header-args+: :comments both :mkdirp yes
:END:
#+BEGIN_SRC conf
color background default default
color listnormal default default
color listnormal_unread default default
color listfocus black yellow
color listfocus_unread black yellow
color info default black
color article default default
# highlights
highlight article "^(Title):.*$" blue default
highlight article "https?://[^ ]+" red default
highlight article "\\[image\\ [0-9]+\\]" green default
#+END_SRC
* URLS
:PROPERTIES:
:header-args: :tangle ~/.config/newsboat/urls
:header-args+: :comments both :mkdirp yes
:END:
** Queries
#+begin_src conf :tangle no
"query:Unread:unread = \"yes\""
"query:Unwatch - Youtube:unread = \"yes\" and tags # \"youtube\""
"query:Unread - Linux:unread = \"yes\" and tags # \"linux\""
"query:Unread - Emacs:unread = \"yes\" and tags # \"emacs\""
"query:Unread - Sciences:unread = \"yes\" and tags # \"science\""
#+end_src
** Newsfeeds
*** Matlab and Control
#+begin_src conf
https://undocumentedmatlab.com/feed/ "~RSS undocumentedmatlab" matlab
http://blogs.mathworks.com/seth/feed/ "~RSS Guy on Simulink" matlab control
http://blogs.mathworks.com/loren/?feed=rss2 "~RSS Loren on the Art of MATLAB" matlab
http://blogs.mathworks.com/pick/feed/ "~RSS File Exchange Pick of the Week" matlab
https://enriquedelsol.com/feed/ "~RSS Enrique del Sol" control
http://brettbeauregard.com/blog/feed/ "~RSS Project Blog" control
https://mburkeonmbd.com/feed/ "~RSS Model-Based Design" control matlab
https://medium.com/feed/@mithi "~RSS Medium - Mithi" control
#+end_src
*** Audio and Electronics
#+begin_src conf
http://jipihorn.wordpress.com/feed/ "~RSS Jipihorn's Blog" electronics audio
https://quantasylum.com/blogs/news.atom "~RSS QuantAsylum" audio
https://www.scrample.xyz/index.xml "~RSS Scrample" electronics
#+end_src
*** Science
#+begin_src conf
http://sciencetonnante.wordpress.com/feed/ "~RSS Science étonnante" science
https://brushingupscience.com/feed/ "~RSS Brushing Up Science" science
#+end_src
*** Linux, Emacs and Computer Science
#+begin_src conf
https://yiufung.net/index.xml "~RSS yiufung" emacs
https://bzg.fr/index.xml "~RSS bzg" emacs
https://thomashartmann.dev/rss.xml "~RSS thomashartmann.dev" emacs linux
http://cachestocaches.com/feed/ "~RSS CachesToCaches" emacs
http://frederic.bezies.free.fr/blog/?feed=rss2 "~RSS Le Weblog de Frederic Bezies" linux
https://la-bibliotex.fr/feed/ "~RSS La biblioTeX" latex
https://so.nwalsh.com/feed/ "~RSS so..." emacs
http://karl-voit.at/feeds/lazyblorg-all.atom_1.0.links-and-content.xml "~RSS Public Voit" emacs
https://people.umass.edu/weikaichen/index.xml "~RSS Weikai Chen" emacs
https://babbagefiles.xyz/index.xml "~RSS The Neo-Babbage Files" linux emacs
https://write.as/dani/feed/ "~RSS Dani" emacs
https://lepisma.xyz/atom.xml "~RSS Lepisma" emacs
http://kitchingroup.cheme.cmu.edu/blog/feed "~RSS The Kitchin Research Group" emacs
http://lukesmith.xyz/rss.xml "~RSS The Latest from Luke" linux
http://manuel-uberti.github.io/feed.xml "~RSS Manuel Uberti" emacs
https://lord.re/index.xml "~RSS /home/lord" linux
https://beepb00p.xyz/rss.xml "~RSS beepb00p" linux emacs
http://pragmaticemacs.com/feed/ "~RSS Pragmatic Emacs" emacs
https://jonathanabennett.github.io/rss.xml "~RSS Jonathan Bennett's Blog" emacs
https://joshrollinswrites.com/index.xml "~RSS The Art of Not Asking Why" emacs linux
http://endlessparentheses.com/atom.xml "~RSS Endless Parentheses" emacs
https://www.gonsie.com/blorg/feed.xml "~RSS Elsa Gonsiorowski" emacs
http://tiagoweber.github.io/blog.xml "~RSS Tiago Oliveira Weber" matlab emacs science
https://shreyas.ragavan.co/index.xml "~RSS Shreyas Ragavan" emacs
https://pinecast.com/feed/emacscast "~RSS EmacsCast" emacs
http://amitp.blogspot.com/feeds/posts/default "~RSS Amit's Thoughts" emacs
http://sachachua.com/wp/category/emacs/feed/ "~RSS Sacha Chua" emacs
https://cestlaz.github.io/rss.xml "~RSS C'est la Z" emacs
https://www-public.imtbs-tsp.eu/~berger_o/weblog/tag/org-mode/feed/ "~RSS WebLog Pro Olivier Berger" emacs
https://scripter.co/index.xml "~RSS A Scripter's Notes" linux emacs
https://assortedarray.com/index.xml "~RSS Assorted Array" emacs
https://www.with-emacs.com/rss.xml "~RSS with-emacs" emacs
https://linktohack.com/index.xml "~RSS QL's blog" emacs
https://itsfoss.com/feed "~RSS It's FOSS" linux
https://llazarek.com/feeds/all.rss.xml "~RSS llazarek" emacs
https://200ok.ch/rss.xml "~RSS 200ok" emacs
http://irreal.org/blog/?feed=rss2 "~RSS Irreal" emacs
https://emacs.cafe/feed.xml "~RSS Emacs café" emacs
http://vxlabs.com/feed/ "~RSS vxlabs" emacs linux
https://www.rousette.org.uk/index.xml "~RSS But she's a Girl..." emacs
https://www.anand-iyer.com/feed.xml "~RSS Anand Iyer" emacs
https://addy-dclxvi.github.io/index.xml "~RSS Addy's Blog" linux
https://ekaschalk.github.io/index.xml "~RSS Modern Emacs" emacs
http://howardism.org/index.xml "~RSS Howardism" emacs
http://xkcd.com/rss.xml "~RSS XKCD" random
https://blog.jethro.dev/index.xml "~RSS Jethro Kuan" emacs
https://lord.re/posts/index.xml "~RSS Lord~" linux
https://rgoswami.me/posts/index.xml "~RSS Rohit Goswami~" linux emacs
https://translucentink.gitlab.io/rss.xml "~RSS Translucent Ink" emacs
https://jherrlin.github.io/index.xml "~RSS Jherrlin" emacs linux
https://camsaul.com/feed.xml "~RSS Camsaul" emacs
https://ag91.github.io/rss.xml "~RSS Were Parallels Cross" emacs
# https://jonathanh.co.uk/
#+end_src
** Youtube
*** Matlab and Control
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCm5mt-A4w61lknZ9lCsZtBw "~YT Steve Brunton" youtube control science
https://www.youtube.com/feeds/videos.xml?channel_id=UCoUOaSVYkTV6W4uLvxvgiFA "~YT Nathan Kutz" youtube science control
https://www.youtube.com/feeds/videos.xml?channel_id=UCSlhlkPaq3RL1CP0Tv1xWBQ "~YT MIT Institute for Data, Systems, and Society" youtube science control
https://www.youtube.com/feeds/videos.xml?channel_id=UCmkP178NasnhR3TWQyyP4Gw "~YT How To Mechatronics" youtube science control
https://www.youtube.com/feeds/videos.xml?channel_id=UCGNxF654kRelnM0nKxM6QDQ "~YT Tom Oomen" youtube science control
https://www.youtube.com/feeds/videos.xml?channel_id=UCRCdl2SXma02BG384RuZPqg "~YT katkimshow" youtube science control
https://www.youtube.com/feeds/videos.xml?channel_id=UCq0imsn84ShAe9PBOFnoIrg "~YT Brian Douglas" youtube control
https://www.youtube.com/feeds/videos.xml?channel_id=UC7vVhkEfw4nOGp8TyDk7RcQ "~YT BostonDynamics" youtube control engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UCPUuVY7w8brL0r__P8UBgyQ "~YT Christopher Lum" youtube matlab control
https://www.youtube.com/feeds/videos.xml?channel_id=UCNm2TzhsV5wGlFIAcpCx9hQ "~YT Jousef Murad" youtube engineering matlab
https://www.youtube.com/feeds/videos.xml?channel_id=UCMBXZxd-j6VqrynykO1dURw "~YT John Rossiter" youtube control
#+end_src
*** Audio and Electronics
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCI-FgEdZQxBASsm3HNcWKxQ "~YT Red Robbo's Workshop" youtube linux audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCtpB66XKjAtFZfZyzmC-_Cg "~YT HexiBase" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCGIr92yrDW4cRLD-QaZmS6w "~YT Ethan Winer" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCslWMxX93gcaiXwxMv4asHA "~YT Jean Maurer Swiss Audio Manufacture SA" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UC6mzA8J7n0ylf0RnDpj-vrg "~YT PS Audio" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCy0tKL1T7wFoYcxCe0xjN6Q "~YT Technology Connections" youtube audio engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UCSqyMHDUsc1gs6wz4sUy91w "~YT jipihorn" youtube electronics audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCOuow_HIYmeaIqi42zVs3qg "~YT Kirby Meets Audio" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCWOhWAOydPUqillkpt5UlaA "~YT Dakoustics" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCm2rchKqdoSKdB448TTVEnQ "~YT Impulse Audio" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UC5QPFDZ3Y4ylkkGJc6Y1OOA "~YT Philippe Demerliac" youtube electronics
https://www.youtube.com/feeds/videos.xml?channel_id=UCVqx3vXNghSqUcVg2nmegYA "~YT U꞊RI" youtube electronics diy
https://www.youtube.com/feeds/videos.xml?channel_id=UCUJQSGHlYC9Xyz-uNfSpSsA "~YT ElectronikHeart" youtube electronics
https://www.youtube.com/feeds/videos.xml?channel_id=UC74xmXx1NfeIIa44J1IU84w "~YT Audio Fest" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCP_yR0wxxyLa46rRgsmje3Q "~YT DIY Speaker Building" youtube audio
https://www.youtube.com/feeds/videos.xml?channel_id=UCVryWqJ4cSlbTSETBHpBUWw "~YT Phil S" youtube electronics control
#+end_src
*** Linux, Emacs and Computer Science
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCNqFXwI5gNcyxt2c1zTQAKw "~YT Yisrael Dov L" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~YT Luke Smith" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCkf4VIqu3Acnfzuk3kRIFwA "~YT gotbletu" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCVHICXXtKG7rZgtC5xonNdQ "~YT Howard Abrams" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCEfFUaIkjbI06PhALdcXNVA "~YT EmacsCast" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCzgkOWKcwy0uhYilE6bd1Lg "~YT Zaiste Programming" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UC5dAH2txWtKSsgmRglRB88A "~YT kyptin" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA "~YT Brodie Robertson" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "~YT Greg Hurrell" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCxjDcP3Su59bg5VDnlwyt5A "~YT Bailey Ling" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCi8XrDg1bK_MJ0goOnbpTMQ "~YT budlabs" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCfbGTpcJyEOMwKP-eYz3_fg "~YT Rainer König" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCsnGwSIHyoYN0kiINAGUKxg "~YT Wolfgang's Channel" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCQp2VLAOlvq142YN3JO3y8w "~YT John Kitchin" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCFk8kgNu_bqsRZewxMGqkzQ "~YT Emacs SF" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCIFJHWyIlN0XFrW2vMKG6QA "~YT Alain M. Lafon" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCvA_wgsX6eFAOXI8Rbg_WiQ "~YT tutoriaLinux" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCUF4bHszxd8T4ulrvLejumA "~YT Alexander Fu" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCbW6-rTEn6nPj56K_9dLozQ "~YT Gilles Castel" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCUR1pFG_3XoZn3JNKjulqZg "~YT thoughtbot" youtube linux emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg "~YT DistroTube" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCDEtZ7AKmwS0_GNJog01D2g "~YT Uncle Dave" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCYnrHo7CDgKobmoJ3Borrnw "~YT Niklas Carlsson" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCljOhRB2a3sQgLCdK9CHQvQ "~YT Leafshade Software" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCwRXb5dUK4cvsHbx-rGzSgw "~YT Derek Banas" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCP2bshADPrVMoNrdJvZEQzw "~YT KeepItTechie" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCVRJ6D343dX-x730MRP8tNw "~YT cocadmin" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCxkMDXQ5qzYOgXPRnOBrp1w "~YT Mike Zamansky" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCgREucssIfY9e0Iy3yhse8w "~YT Conner McDaniel" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCkRmQ_G_NbdbCQMpALg6UPg "~YT emacsrocks" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UC0uTPqBCFIpZxlz_Lv1tk_g "~YT Protesilaos Stavrou" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCsJXkw_Ssp-1myJFm4_SMJA "~YT Seorenn" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCvrQyT2xhsxq2a4Xopf2JTA "~YT Zaeph" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCYnl1cugi7Lv1h8j6JNqNEg "~YT Dima Gerasimov" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCDKPGD9T00eS_l--D_DRTUQ "~YT Linuxtricks" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCcCeYbIBGQPB1G12psAPMKw "~YT Spudlyo" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCS97tchJDq17Qms3cux8wcA "~YT Chrisatmachine" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UCwFpzG5MK5Shg_ncAhrgr9g "~YT Awesome Open Source" youtube linux
https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA "~YT Mental Outlaw" youtube linux
#+end_src
*** 3D-Printing and DIY
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCGEBcDJ7QIY1LuEddDM9x9Q "~YT Oldies" youtube 3d-printing
https://www.youtube.com/feeds/videos.xml?channel_id=UCqdRx3JV3xRchi4_xwFJUTA "~YT 8FabLab" youtube diy
https://www.youtube.com/feeds/videos.xml?channel_id=UCCsdIja21VT7AKkbVI5y8bQ "~YT Alain Vaillancourt" youtube diy
https://www.youtube.com/feeds/videos.xml?channel_id=UCyi6pFP-lmaDD3Eb4dqsvdg "~YT ioduremetallique" youtube diy
https://www.youtube.com/feeds/videos.xml?channel_id=UCYI8olK-jH9Ubc2FaA2LgPw "~YT Egalistel" youtube 3d-printing
https://www.youtube.com/feeds/videos.xml?channel_id=UCSULDz1yaHLVQWHpm4g_GHA "~YT monsieur bidouille" youtube diy
https://www.youtube.com/feeds/videos.xml?channel_id=UC2UT8pPDlUvRbQXTVOf5Ocw "~YT Henri Hihacks" youtube diy
https://www.youtube.com/feeds/videos.xml?channel_id=UCLecVrux63S6aYiErxdiy4w "~YT BRUH Automation" youtube diy
https://www.youtube.com/feeds/videos.xml?channel_id=UCQfMyugsjrVUWU0v_ZxQs2Q "~YT Machine Tech Video Blog" youtube diy engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UCjED9uS41ioeFuPfbR-OBlw "~YT Les Freres Poulain" youtube diy
https://www.youtube.com/feeds/videos.xml?channel_id=UCVSHXNNBitaPd5lYz48--yg "~YT Tech Ingredients" youtube diy
https://www.youtube.com/feeds/videos.xml?channel_id=UCPFChjpOgkUqckj3378jt5w "~YT Heliox" youtube 3d-printing
https://www.youtube.com/feeds/videos.xml?channel_id=UC9_nxvBohH1G2yR77XTdA2g "~YT Tommy Desrochers" youtube 3d-printing diy
https://www.youtube.com/feeds/videos.xml?channel_id=UC6mIxFTvXkWQVEHPsEdflzQ "~YT GreatScott" youtube diy
#+end_src
*** Interesting - General
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UC5eOLQO5VUEFJukNg9cl5jg "~YT Histoire Brève" youtube interesting
https://www.youtube.com/feeds/videos.xml?channel_id=UCMFcMhePnH4onVHt2-ItPZw "~YT Hygiène Mentale" youtube interesting
https://www.youtube.com/feeds/videos.xml?channel_id=UC9BnGZLT4iPaJtDOXYwQuHQ "~YT Primum Non Nocere" youtube interesting
https://www.youtube.com/feeds/videos.xml?channel_id=UCP46_MXP_WG_auH88FnfS1A "~YT Nota Bene" youtube interesting
https://www.youtube.com/feeds/videos.xml?channel_id=UCUR03ZSZlEvCO6EWwv4jU2w "~YT Absol Vidéos" youtube interesting
https://www.youtube.com/feeds/videos.xml?channel_id=UCWty1tzwZW_ZNSp5GVGteaA "~YT La statistique expliquée à mon chat" youtube interesting
https://www.youtube.com/feeds/videos.xml?channel_id=UCLbgxBMMEo6mAYe87esxGmg "~YT horror humanum est" youtube interesting
https://www.youtube.com/feeds/videos.xml?channel_id=UCOuIgj0CYCXCvjWywjDbauw "~YT Chat Sceptique" youtube interesting
#+end_src
*** Science
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCwgqYNmYaij2_8hq_tOFyZw "~YT Aurelien Barrau" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCeR8BYZS7IHYjk_9Mh5JgkA "~YT Scilabus" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UC1Ue7TuX3iH4y8-Qrjj-hyg "~YT J'm'énerve pas, j'explique" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCjsHDXUU3BjBCG7OaCbNDyQ "~YT Le Sense Of Wonder" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UC4PasDd25MXqlXBogBw9CAg "~YT Mickaël Launay" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCsz9DiwPtgDvxJ-njWnieZw "~YT Passe-Science" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UC_GlthPB9gzdxfkTTEIVxMA "~YT Incroyables Expériences" youtube science engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UCxqAWLTk1CmBvZFPzeZMd9A "~YT Domain of Science" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCaNlbnghtwlsGF-KzAFThqA "~YT ScienceEtonnante" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCeQEKFH31vvD-InkTGSvCrA "~YT brusspup" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~YT Veritasium" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCH6ppHEvV3_WIXEwmhv9HEg "~YT Deus Ex Silicium" youtube engineering science
https://www.youtube.com/feeds/videos.xml?channel_id=UC2LZO6swZ9SLUEOks3WnsfA "~YT 2veritasium" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCvGag7MyHR8H9oRm9iL9Ifw "~YT Experimentboy" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UC6107grRI4m0o2-emgoDnAA "~YT SmarterEveryDay" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCtqICqGbPSbTN09K1_7VZ3Q "~YT DirtyBiology" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UC_ZChHhr5nDrUymz7qsRqRw "~YT Confér'ENS" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCNmLe68qKzdjuEpT_YTDFuA "~YT Etonnarium" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCCSN5zJTKjl6UKvPcLzLuiw "~YT Macroscopie" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UC7DdEm33SyaTDtWYGO2CwdA "~YT Physics Girl" youtube science
#+end_src
*** Keyboard
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UC5ClFK9Ko4ACRgXjRZc_GfA "~YT Rhinofeed" youtube keyboards
https://www.youtube.com/feeds/videos.xml?channel_id=UC2yitP8oH86YBRVU4anycoA "~YT Quentin Lebastard" youtube keyboards
#+end_src
*** Music
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UC3gZqwD45zGCsduBn-Q2lew "~YT Gabrielle Grau" youtube music
https://www.youtube.com/feeds/videos.xml?channel_id=UCZHPwKyeypWwU8SNJSzQhCw "~YT Révisons nos Classiques" youtube music
https://www.youtube.com/feeds/videos.xml?channel_id=UCPpNtkHeCnwN7Tl5oLq4AAg "~YT Une chanson, l'addition" youtube music
https://www.youtube.com/feeds/videos.xml?channel_id=UC_17P1ruDpCVujf7C_SxhOA "~YT Metalliquoi" youtube music
https://www.youtube.com/feeds/videos.xml?channel_id=UCzabZYC0MYRR2MFkq62d6yQ "~YT Florent Garcia" youtube music
#+end_src
*** Space
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCdL3UpiseRlvxXuORJjmqZw "~YT Stardust" youtube space
https://www.youtube.com/feeds/videos.xml?channel_id=UC5X4e8ScZI2AFd_vkjSoyoQ "~YT AstronoGeek" youtube space
#+end_src
*** Engineering
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCotwjyJnb-4KW7bmsOoLfkg "~YT Art of the Problem" youtube engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UCR1IuLEqb6UEA_zQ81kwXfg "~YT Real Engineering" youtube engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UCfsznjef2zGJnrCRQBXqo6Q "~YT Machine Thinking" youtube engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UC2bkHVIDjXS7sgrgjFtzOXQ "~YT engineerguy" youtube engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UCivA7_KLKWo43tFcCkFvydw "~YT Applied Science" youtube science engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UCk0fGHsCEzGig-rSzkfCjMw "~YT The Engineering Mindset" youtube engineering
https://www.youtube.com/feeds/videos.xml?channel_id=UC5_Y-BKzq1uW_2rexWkUzlA "~YT New Mind" youtube engineering
#+end_src
*** Random - Fun - Others
#+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCJM10Rp7G0h9j5S92QszJ5Q "~YT Tales From The Click" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCCMxHHciWRBBouzk-PGzmtQ "~YT Bazar du Grenier" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCTt2AnK--mnRmICnf-CCcrw "~YT Le Rire Jaune" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCJRljQ8OcyfzHBYpS_bDbow "~YT La Mezzanine" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCVTAmJvZOxuj9Kto8Ty9L8Q "~YT Rapha Gaming" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCTafEJoRl5myC8A50plIrng "~YT FabienOlicard" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCZeyUZmGAyRLDfM2ir3q-OQ "~YT Captain Popcorn" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCwzxu1j19ICnfW5zrBvUw-w "~YT Une bière et Jivay" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCPF7JOWMDWZmnP_cQfyAezg "~YT Scinéma" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCUK0HBIBWgM2c4vsPhkYY4w "~YT The Slow Mo Guys" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCxeA1l2E5AYrtpkqUbBEg3A "~YT Pierre Lecourt" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCYD22MFqaNqXp-ogTMosW_A "~YT Le Show Jaune" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UC4HANn7TBY-xcION-eL3rLA "~YT Daniil le Russe" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCf0mOxfawezlHIVuHd3L2VA "~YT Didi Chandouidoui" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCw3tZ7g_FljNjzGprCuptpA "~YT Taupe10" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCfXXAQ-mp1uUcvSpvMcAAtw "~YT LinksTheSun" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCWeg2Pkate69NFdBeuRFTAw "~YT Squeezie" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCtI6_1vGanPlH5lgVIDjJGQ "~YT MrAntoineDaniel" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCm3C3OSgcyzaTBXrNRupB3Q "~YT Le Woop" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCuBzVunAVbcwzMfQaJVacuw "~YT LE ROI DES RATS" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCyWqModMQlbIo8274Wh_ZsQ "~YT Cyprien" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCAFQjCZo5okIPkHUQlBZM-g "~YT Bonjour Tristesse" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCoZoRz4-y6r87ptDp4Jk74g "~YT Palmashow" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCww2zZWg4Cf5xcRKG-ThmXQ "~YT NORMAN FAIT DES VIDÉOS" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCkEa1AfdeB93-he4VziKGFg "~YT JIGMÉ" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCND0gjuG9ltEWDvh82VJITg "~YT Jeannot Nymouce" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCP5tjEmvPItGyLhmjdwP7Ww "~YT RealLifeLore" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCwbV8cTR4yBgFdfa_BXV2OA "~YT Le Fossoyeur de Films" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCGgvKW19IWVvUUblrr8EgHA "~YT Experimentboy 2" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCJZ94qp4dtCw0Q5UQqAkg7w "~YT larsandersen23" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UCDPK_MTu3uTUFJXRVcTJcEw "~YT Mcfly et Carlito" youtube random
https://www.youtube.com/feeds/videos.xml?channel_id=UC2_OG1L8DLTzQ7UrZVOk7OA "~YT Axolot" youtube random
#+end_src

View File

@@ -1,42 +0,0 @@
#+TITLE: PCManFM
#+SETUPFILE: ./setup/org-setup-file.org
#+PROPERTY: header-args:bash :comments both
#+PROPERTY: header-args:bash+ :mkdirp yes
#+PROPERTY: header-args:bash+ :shebang "#!/bin/sh"
#+PROPERTY: header-args:bash+ :tangle ~/.config/pcmanfm/default/pcmanfm.conf
* Config
#+BEGIN_SRC conf
[config]
bm_open_method=0
#+END_SRC
* Volume
#+BEGIN_SRC conf
[volume]
mount_on_startup=0
mount_removable=0
autorun=0
#+END_SRC
* UI
#+BEGIN_SRC conf
[ui]
always_show_tabs=0
max_tab_chars=32
win_width=1263
win_height=690
splitter_pos=150
media_in_new_tab=0
desktop_folder_new_win=0
change_tab_on_drop=1
close_on_unmount=1
focus_previous=0
side_pane_mode=places
view_mode=icon
show_hidden=0
sort=mtime;descending;
toolbar=newtab;navigation;home;
show_statusbar=1
pathbar_mode_buttons=0
#+END_SRC

View File

@@ -52,7 +52,7 @@ line-size = 2
border-size = 0
padding-left = 2
padding-right = 12
padding-right = 16
module-margin-left = 1
module-margin-right = 1
@@ -62,7 +62,7 @@ font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
modules-left = i3 xwindow
modules-center =
modules-right = pulseaudio drive_monochromator drive_tmp drive_homelab drive_groupshare drive_data_id21 drive_unix_home dunst cursor unread_mail calendar battery date
modules-right = mpd pulseaudio tunnel_homelab tunnel_esrf dunst cursor unread_mail calendar timer battery date
# wm-restack = i3
@@ -128,7 +128,7 @@ label-urgent-padding = 1
#+BEGIN_SRC conf
[module/mpd]
type = internal/mpd
format-online = <icon-prev> <toggle> <icon-next> %{A1:$TERMINAL -e ncmpcpp &:}<label-song>%{A}
format-online = <toggle> %{A1:$TERMINAL -e tmux new-session -A -s ncmpcpp ncmpcpp:}<label-song>%{A}
format-online-spacing = 0
format-online-padding = 0
@@ -141,13 +141,13 @@ label-song = %artist% - %title%
label-song-maxlen = 30
label-song-ellipsis = true
icon-prev =
icon-stop =
icon-play =
icon-pause =
icon-next =
icon-random =
icon-repeat =
icon-prev = 󰒮
icon-stop =
icon-play =
icon-pause =
icon-next = 󰒭
icon-random =
icon-repeat =
# Used to display the state of random/repeat/repeatone/single
# Only applies if <icon-[random|repeat|repeatone|single]> is used
@@ -189,7 +189,7 @@ interval = 2
format-prefix-foreground = ${colors.fg}
format-underline = ${colors.bg}
label = %{A1:$TERMINAL -e htop &:} %percentage:2%%%{A}
label = %{A1:$TERMINAL -e htop &:} %percentage:2%%%{A}
#+END_SRC
* Date
@@ -221,7 +221,7 @@ format-volume =%{A1:pavucontrol &:}<label-volume> <bar-volume>%{A}
label-volume = %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = muted
label-muted = muted
bar-volume-width = 10
bar-volume-foreground-0 = ${colors.green}
@@ -291,6 +291,7 @@ ramp-foreground = ${colors.fg}
#+end_src
* Unread Mails
** Module
#+BEGIN_SRC conf
[module/unread_mail]
type = custom/script
@@ -310,12 +311,12 @@ interval = 2
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l`
mail_nb=`du -a ~/.local/share/mails/*/Inbox/new/* 2>/dev/null | wc -l`
if [ "$mail_nb" -eq "0" ]; then
echo "";
echo "";
else
echo "%{F#859900} $mail_nb%{F-}";
echo "%{F#859900} $mail_nb%{F-}";
fi
#+end_src
@@ -326,11 +327,11 @@ fi
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "Syncing...";
dunstify --replace=98465 "Mails " "Syncing...";
checkmail -q && \
mail_nb=`du -a ~/.mail/*/Inbox/new/* 2>/dev/null | wc -l` && \
mail_nb=`du -a ~/.local/share/mails/*/Inbox/new/* 2>/dev/null | wc -l` && \
if [ "$mail_nb" -eq "0" ]; then
notify-send --hint=string:x-dunst-stack-tag:YpqAgorv "Mails " "No new mail";
dunstify --replace=98465 "Mails " "No new mail";
fi
#+end_src
@@ -344,65 +345,8 @@ checkmail -q && \
$TERMINAL -e tmux new-session -A -s neomutt neomutt
#+end_src
* Unread News
#+BEGIN_SRC conf
[module/unread_news]
type = custom/script
format-underline = ${colors.bg}
click-left = ~/.config/polybar/scripts/news-open.sh >/dev/null 2>%1 &
click-right = ~/.config/polybar/scripts/news-refresh.sh >/dev/null 2>%1 &
format = <label>
exec = ~/.config/polybar/scripts/news-status.sh
interval = 60
#+END_SRC
** Unread News Scripts
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/news-status.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
news_nb=`newsboat -x print-unread 2>/dev/null | cut -d " " -f1`
if [ -z "$news_nb" ] || [ "$news_nb" -eq "0" ]; then
echo "";
else
echo "%{F#859900} $news_nb%{F-}";
fi
#+end_src
** Refresh News Scripts
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/news-refresh.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
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
tmux send-keys -t newsboat R
else
newsboat -x reload && /
news_nb=`newsboat -x print-unread | cut -d " " -f1` && \
notify-send --hint=string:x-dunst-stack-tag:4z5CvV6G "Newsboat " "$news_nb Unread News";
fi
#+end_src
** Open Newsboat
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/news-open.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
$TERMINAL -e tmux new-session -A -s newsboat newsboat
#+end_src
* Calendar
** Module
#+BEGIN_SRC conf
[module/calendar]
type = custom/script
@@ -458,6 +402,7 @@ $TERMINAL --title=khal -e ikhal
#+end_src
* Redshift
** Module
#+BEGIN_SRC conf
[module/redshift]
type = custom/script
@@ -477,9 +422,9 @@ interval = 2
:END:
#+begin_src bash
if pgrep -x "redshift" >/dev/null; then
echo "";
echo "";
else
echo "";
echo "󰖨";
fi
#+end_src
@@ -492,76 +437,15 @@ fi
#+begin_src bash
if pgrep -x "redshift" >/dev/null; then
killall redshift && \
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift " "Turned off";
dunstify --replace=36492 "Redshift " "Turned off";
else
nohup redshift > /dev/null 2>&1 &
notify-send --hint=string:x-dunst-stack-tag:EKFLpst1 "Redshift " "Starting...";
dunstify --replace=36492 "Redshift " "Starting...";
fi
#+end_src
* Packages
#+BEGIN_SRC conf
[module/packages]
type = custom/script
format-underline = ${colors.bg}
click-left = ~/.config/polybar/scripts/packages-update.sh >/dev/null 2>%1 &
click-right = ~/.config/polybar/scripts/packages-refresh.sh >/dev/null 2>%1 &
format = <label>
exec = ~/.config/polybar/scripts/packages-status.sh
interval = 600
#+END_SRC
** Packages Status script
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/packages-status.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+BEGIN_SRC bash
paru -Sy > /dev/null 2>&1 && \
package_nb=`paru -Qu 2> /dev/null | wc -l` || \
package_nb=0
if [ "$package_nb" -eq "0" ]; then
echo "";
else
echo "%{F#859900} $package_nb%{F-}";
fi
#+END_SRC
** Refresh New Packages script
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/packages-refresh.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+BEGIN_SRC bash
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
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "No upgrade available"
else
notify-send --hint=string:x-dunst-stack-tag:SE5nDEVA 'Packages ' "$package_nb upgrade(s) available"
fi
#+END_SRC
** Packages Update
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/packages-update.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+BEGIN_SRC bash
$TERMINAL -e paru
#+END_SRC
* Dunst
** Module
#+BEGIN_SRC conf
[module/dunst]
type = custom/script
@@ -605,9 +489,9 @@ tmpfile="/tmp/dunststatus";
if [ -f $tmpfile ] && grep -q "off" $tmpfile ; then
killall -SIGUSR2 dunst && \
echo "on" > $tmpfile;
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Activated";
dunstify --replace=16549 "Notifications " "Activated";
else
notify-send --hint=string:x-dunst-stack-tag:KLJ63nVo "Notifications " "Deactivated";
dunstify --replace=16549 "Notifications " "Deactivated";
sleep 1 && \
killall -SIGUSR1 dunst && \
echo "off" > $tmpfile;
@@ -615,6 +499,7 @@ fi
#+END_SRC
* Lock Screen
** Module
#+BEGIN_SRC conf
[module/lockscreen]
type = custom/script
@@ -653,14 +538,15 @@ fi
#+begin_src bash
if pgrep -x "xautolock" >/dev/null ; then
pkill xautolock && \
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Desactivated'
dunstify --replace=13602 'Lock Screen ' 'Desactivated'
else
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u --hint=string:x-dunst-stack-tag:tH6bxvvv critical -t 10000 -- 'Locking Screen' '60 seconds'" &
notify-send --hint=string:x-dunst-stack-tag:tH6bxvvv 'Lock Screen ' 'Activated'
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'
fi
#+end_src
* Network
** Modules
#+begin_src conf
[module/wired-network]
type = internal/network
@@ -717,17 +603,18 @@ isdevicedown=$(nmcli device status | grep ^$1 | grep disconnected)
if [ -z "$isdevicedown" ]
then
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnecting..." && \
dunstify --replace=84847 "$1" "Disconnecting..." && \
nmcli device disconnect $1 && \
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Disconnected"
dunstify --replace=84847 "$1" "Disconnected"
else
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connection..." && \
dunstify --replace=84847 "$1" "Connection..." && \
nmcli device connect $1 && \
notify-send --hint=string:x-dunst-stack-tag:EfjAHGgu "$1" "Connected"
dunstify --replace=84847 "$1" "Connected"
fi
#+end_src
* Bluetooth
** Module
#+BEGIN_SRC conf
[module/bluetooth]
type = custom/script
@@ -766,7 +653,7 @@ isconnected=$(bluetoothctl show $controllerid | grep Powered | grep yes)
if [ -z "$isconnected" ]
then
echo ""
echo ""
else
echo "%{F#859900}%{F-}"
fi
@@ -787,14 +674,15 @@ isconnected=$(bluetoothctl show $controllerid | grep Powered | grep yes)
if [ -z "$isconnected" ]
then
bluetoothctl power on && \
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power ON"
dunstify --replace=88498 "Bluetooth" "Power ON"
else
bluetoothctl power off && \
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Bluetooth" "Power OFF"
dunstify --replace=88498 "Bluetooth" "Power OFF"
fi
#+end_src
* NordVPN
** Module
#+BEGIN_SRC conf
[module/nordvpn]
type = custom/script
@@ -817,9 +705,9 @@ interval = 2
tmpfile="/tmp/vpnstatus";
if [ -f $tmpfile ] && grep -q "on" $tmpfile; then
echo "%{F#859900}%{F-}";
echo "%{F#859900}󰲀%{F-}";
else
echo "";
echo "󰲀";
fi
#+END_SRC
@@ -827,9 +715,62 @@ fi
The script is accessible [[file:binaries.org::#nordvpn-toggle][here]].
* High cursor
This is using this program: module/
* Wireguard
** Module
#+BEGIN_SRC conf
[module/wireguard]
type = custom/script
format-underline = ${colors.bg}
click-left = ~/.config/polybar/scripts/wireguard-toggle.sh >/dev/null 2>%1 &
format = <label>
exec = ~/.config/polybar/scripts/wireguard-status.sh
interval = 2
#+END_SRC
** Wireguard Connection Status
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/wireguard-status.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
config="homelab"
connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
if [ "$connection" = "$config" ]; then
echo "%{F#859900}󰒄%{F-}"
else
echo "󰒄"
fi
#+end_src
** Toggle Wireguard Connection
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/wireguard-toggle.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
config="homelab"
connection=$(sudo wg show "$config" 2>/dev/null | head -n 1 | awk '{print $NF }')
if [ "$connection" = "$config" ]; then
sudo wg-quick down "$config" && \
dunstify --replace=83244 "Wireguard" "Disconnected from $config"
else
sudo wg-quick up "$config" && \
dunstify --replace=83244 "Wireguard" "Connected to $config"
fi
#+end_src
* Highlight cursor
** Module
#+BEGIN_SRC conf
[module/cursor]
type = custom/script
@@ -850,9 +791,9 @@ interval = 2
:END:
#+begin_src bash
if pgrep -x "highlight-point" >/dev/null; then
echo "%{F#859900}%{F-}";
echo "%{F#859900}%{F-}";
else
echo "";
echo "";
fi
#+end_src
@@ -864,16 +805,16 @@ fi
:END:
#+begin_src bash
if pgrep -x "highlight-point" >/dev/null; then
killall highlight-point && \
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Turned off";
killall highlight-pointer && \
dunstify --replace=22111 --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Turned off";
else
nohup highlight-pointer -r 10 > /dev/null 2>&1 &
notify-send --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Highlight...";
dunstify --replace=22111 --hint=string:x-dunst-stack-tag:kidF4g53 "Cursor" "Highlight...";
fi
#+end_src
* Mounted Drives
** Modules
#+BEGIN_SRC conf
[module/drive_tmp]
type = custom/script
@@ -954,18 +895,223 @@ interval = 5
:END:
#+begin_src bash
if mountpoint -q ~/mnt/$1; then
echo "%{F#859900}$2 %{F-}";
echo "%{F#859900}$2 󰡰%{F-}";
else
echo "$2 ";
echo "$2 󰲁";
fi
#+end_src
* Tunnel Status
** Module
#+BEGIN_SRC conf
[module/tunnel_esrf]
type = custom/script
format-underline = ${colors.bg}
click-left = ~/.config/polybar/scripts/systemd-service-toggle.sh esrf-tunnel E >/dev/null 2>%1 &
format = <label>
exec = ~/.config/polybar/scripts/systemd-service-status.sh esrf-tunnel E
interval = 2
#+END_SRC
#+BEGIN_SRC conf
[module/tunnel_homelab]
type = custom/script
format-underline = ${colors.bg}
click-left = ~/.config/polybar/scripts/systemd-service-toggle.sh homelab-tunnel H >/dev/null 2>%1 &
format = <label>
exec = ~/.config/polybar/scripts/systemd-service-status.sh homelab-tunnel H
interval = 2
#+END_SRC
** Tunnel - Status
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/systemd-service-status.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
SERVICE_NAME="$1"
if [ "$(systemctl --user is-active "$SERVICE_NAME")" != "active" ]
then
echo "$2 󰢭";
else
echo "%{F#859900}$2 󰢭%{F-}";
fi
#+end_src
** Tunnel - Toggle
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/systemd-service-toggle.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
SERVICE_NAME="$1"
if [ "$(systemctl --user is-active $SERVICE_NAME)" != "active" ]
then
systemctl --user start $SERVICE_NAME
else
systemctl --user stop $SERVICE_NAME
fi
#+end_src
* Timer
** Module
#+BEGIN_SRC conf
[module/timer]
type = custom/script
format = <label>
exec = ~/.config/polybar/scripts/timer.sh tail 'TIMER' 5
tail = true
click-left = ~/.config/polybar/scripts/timer.sh new 25 'Pomo session' 'Paused' 'notify-send "Session finished"' ; ~/.config/polybar/scripts/timer.sh update %pid%
click-middle = ~/.config/polybar/scripts/timer.sh cancel ; ~/.config/polybar/scripts/timer.sh update %pid%
click-right = ~/.config/polybar/scripts/timer.sh togglepause ; ~/.config/polybar/scripts/timer.sh update %pid%
scroll-up = ~/.config/polybar/scripts/timer.sh increase 60 || ~/.config/polybar/scripts/timer.sh new 1 'TIMER' 'PAUSED' 'notify-send -u critical "Timer expired."' ; ~/.config/polybar/scripts/timer.sh update %pid%
scroll-down = ~/.config/polybar/scripts/timer.sh increase -60 ; ~/.config/polybar/scripts/timer.sh update %pid%
interval = 2
#+END_SRC
** Timer
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/timer.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
### AUTHOR: Johann Birnick (github: jbirnick)
### PROJECT REPO: https://github.com/jbirnick/polybar-timer
## FUNCTIONS
now () { date --utc +%s; }
killTimer () { rm -rf /tmp/polybar-timer ; }
timerSet () { [ -e /tmp/polybar-timer/ ] ; }
timerPaused () { [ -f /tmp/polybar-timer/paused ] ; }
timerExpiry () { cat /tmp/polybar-timer/expiry ; }
timerLabelRunning () { cat /tmp/polybar-timer/label_running ; }
timerLabelPaused () { cat /tmp/polybar-timer/label_paused ; }
timerAction () { cat /tmp/polybar-timer/action ; }
secondsLeftWhenPaused () { cat /tmp/polybar-timer/paused ; }
minutesLeftWhenPaused () { echo $(( ( $(secondsLeftWhenPaused) + 59 ) / 60 )) ; }
secondsLeft () { echo $(( $(timerExpiry) - $(now) )) ; }
minutesLeft () { echo $(( ( $(secondsLeft) + 59 ) / 60 )) ; }
printExpiryTime () { dunstify -u low -r -12345 "Timer expires at $( date -d "$(secondsLeft) sec" +%H:%M)" ;}
printPaused () { dunstify -u low -r -12345 "Timer paused" ; }
removePrinting () { dunstify -C -12345 ; }
updateTail () {
# check whether timer is expired
if timerSet
then
if { timerPaused && [ $(minutesLeftWhenPaused) -le 0 ] ; } || { ! timerPaused && [ $(minutesLeft) -le 0 ] ; }
then
eval $(timerAction)
killTimer
removePrinting
fi
fi
# update output
if timerSet
then
if timerPaused
then
echo "$(timerLabelPaused) $(minutesLeftWhenPaused)"
else
echo "$(timerLabelRunning) $(minutesLeft)"
fi
else
echo "${STANDBY_LABEL}"
fi
}
## MAIN CODE
case $1 in
tail)
STANDBY_LABEL=$2
trap updateTail USR1
while true
do
updateTail
sleep ${3} &
wait
done
;;
update)
kill -USR1 $(pgrep --oldest --parent ${2})
;;
new)
killTimer
mkdir /tmp/polybar-timer
echo "$(( $(now) + 60*${2} ))" > /tmp/polybar-timer/expiry
echo "${3}" > /tmp/polybar-timer/label_running
echo "${4}" > /tmp/polybar-timer/label_paused
echo "${5}" > /tmp/polybar-timer/action
printExpiryTime
;;
increase)
if timerSet
then
if timerPaused
then
echo "$(( $(secondsLeftWhenPaused) + ${2} ))" > /tmp/polybar-timer/paused
else
echo "$(( $(timerExpiry) + ${2} ))" > /tmp/polybar-timer/expiry
printExpiryTime
fi
else
exit 1
fi
;;
cancel)
killTimer
removePrinting
;;
togglepause)
if timerSet
then
if timerPaused
then
echo "$(( $(now) + $(secondsLeftWhenPaused) ))" > /tmp/polybar-timer/expiry
rm -f /tmp/polybar-timer/paused
printExpiryTime
else
secondsLeft > /tmp/polybar-timer/paused
rm -f /tmp/polybar-timer/expiry
printPaused
fi
else
exit 1
fi
;;
*)
echo "Please read the manual at https://github.com/jbirnick/polybar-timer ."
;;
esac
#+end_src
* Screenshot
#+BEGIN_SRC conf
[module/screenshot]
type = custom/text
content = ""
content = ""
click-left = ~/.local/bin/screenshot >/dev/null 2>%1 &
#+END_SRC

View File

@@ -23,7 +23,7 @@ config.load_autoconfig(True)
c.aliases = {'w': 'session-save', 'q': 'quit', 'wq': 'quit --save'}
c.auto_save.session = False
c.backend = 'webengine'
c.confirm_quit = ['downloads']
c.confirm_quit = ['downloads', 'multiple-tabs']
#+END_SRC
#+begin_src python
@@ -42,7 +42,6 @@ c.content.autoplay = False
c.content.notifications.enabled = False
c.content.geolocation = 'ask'
c.content.javascript.alert = True
c.content.javascript.can_access_clipboard = True
c.content.pdfjs = False
c.content.proxy = 'system'
c.content.blocking.method = 'both'
@@ -180,8 +179,8 @@ c.url.searchengines = {
'sm': 'https://www.openstreetmap.org/search?query={}',
'am': 'https://www.amazon.fr/s?k={}',
'md': 'https://fr.mathworks.com/help/search.html?qdoc={}&submitsearch=',
'tf': 'https://translate.google.com/#view=home&op=translate&sl=en&tl=fr&text={}',
'te': 'https://translate.google.com/#view=home&op=translate&sl=fr&tl=en&text={}',
'tf': 'https://www.deepl.com/en/translator#en/fr/{}',
'te': 'https://www.deepl.com/en/translator#fr/en/{}',
'lb': 'https://www.leboncoin.fr/recherche?text={}',
}
#+end_src
@@ -234,8 +233,8 @@ config.bind('m', 'quickmark-save')
Open New Pages/Tabs
#+begin_src python
config.bind('o', 'set-cmd-text -s :open')
config.bind('O', 'set-cmd-text -s :open -t')
config.bind('o', 'cmd-set-text -s :open')
config.bind('O', 'cmd-set-text -s :open -t')
#+end_src
Open new page/tab with clipboard content
@@ -370,12 +369,6 @@ c.aliases['Download_AES'] = 'spawn --userscript aes-download.sh'
config.bind(',E', 'Download_AES')
#+end_src
Download a torrent
#+begin_src python
c.aliases['Download_Torrent_Homelab'] = 'hint links spawn torrent-add {hint-url}'
config.bind(',t', 'Download_Torrent_Homelab')
#+end_src
See Amazon price history using CamelCamelCamel
#+begin_src python
c.aliases['CamelCamelCamel'] = 'open -t https://fr.camelcamelcamel.com/search?sq={url}'
@@ -406,17 +399,17 @@ config.bind(',q', 'QRcode')
** Create a new password
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/add-passowrd.sh
url=$(echo "$QUTE_URL" | awk -F[/:] '{print $4}' | rofi -p "URL" -dmenu -lines 1)
url=$(echo "$QUTE_URL" | awk -F[/:] '{print $4}' | rofi -i -p "URL" -dmenu -lines 1)
username=$(echo -e "dehaeze.thomas@gmail.com\nthomas.dehaeze@esrf.fr\ntdehaeze" | rofi -p "Username" -dmenu -lines 5)
password=$(rofi -p "Password" -dmenu -password -lines 1)
if [ -z "$url" ] || [ -z "$username" ] || [ -z "$password" ]; then
notify-send --hint=string:x-dunst-stack-tag:0vRM5AMP --urgency=critical "Pass" "Failed to Add Password"
dunstify --urgency=critical "Pass" "Failed to Add Password"
else
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
notify-send --hint=string:x-dunst-stack-tag:0vRM5AMP "Pass " "Password Added"
dunstify "Pass " "Password Added"
fi
#+end_src
@@ -429,15 +422,15 @@ if [[ "$1" == *"list"* ]]; then
fi
if [ -n "$choice" ] && [ "$choice" = "Playlist" ]; then
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloading Playlist...";
dunstify --replace=19243 "Youtube " "Downloading Playlist...";
youtube-dl -i -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" -o "%(playlist_title)s/%(playlist_index)s-%(title)s.%(ext)s" && \
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"
dunstify --replace=19243 "Youtube " "Downloaded" || \
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
else
notify-send --hint=string:x-dunst-stack-tag:iOGRwrDG "Youtube " "Downloading Video...";
dunstify --replace=19243 "Youtube " "Downloading Video...";
youtube-dl --no-playlist -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' "$1" && \
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"
dunstify --replace=19243 "Youtube " "Downloaded" || \
dunstify --replace=19243 --urgency=critical "Youtube " "Failed to download"
fi
#+end_src
@@ -620,7 +613,7 @@ if [[ -z "${LINKDING_TOKEN}" ]]; then
LINKDING_TOKEN=$(pass nas/linkding_token)
fi
curl -H "Authorization: Token ${LINKDING_TOKEN}" ${LINKDING_URL}/api/bookmarks/ | jq '.results[] | "\(.title) - \(.url) - [#\((.tag_names | join(", #")))]"' -r | rofi -dmenu -no-custom | grep -Eo 'https?://[^ ]+' | head -1 | xargs -I {} echo "open -t {}" >> "$QUTE_FIFO"
curl -H "Authorization: Token ${LINKDING_TOKEN}" ${LINKDING_URL}/api/bookmarks/ | jq '.results[] | "\(.title) - \(.url) - [#\((.tag_names | join(", #")))]"' -r | rofi -dmenu -i -no-custom | grep -Eo 'https?://[^ ]+' | head -1 | xargs -I {} echo "open -t {}" >> "$QUTE_FIFO"
#+end_src
** Add Url to Linkding
@@ -641,8 +634,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/ && \
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"
dunstify "Linkding" " Bookmark Added" || \
dunstify --urgency=critical "Linkding" "Failed"
#+end_src
** Add Url to Buku using Rofi
@@ -651,28 +644,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" && \
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"
dunstify "Buku" "Bookmark Added" || \
dunstify --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" && \
notify-send "Buku" "📑 Bookmark Added"
dunstify "Buku" "📑 Bookmark Added"
#+end_src
** Download with aria2c
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/aria2c-add.sh
aria2p add "$1" && \
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
dunstify "Aria2" "Download Started" || \
dunstify "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') && \
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Download Started" || \
notify-send --hint=string:x-dunst-stack-tag:2SGClDoI "Aria2" "Error"
dunstify "Aria2" "Download Started" || \
dunstify "Aria2" "Error"
#+end_src
** Save to PNG
@@ -680,19 +673,19 @@ dl-add $(echo "$1" | sed 's/\&af=.*$//g') && \
filename=$(rofi -p "filename" -dmenu -lines 1)
if [ -n "filename" ]; then
cd ~/Pictures/ && \
firefox -P default -headless --screenshot "$filename.png" "$QUTE_URL" && \
notify-send "Screenshot" "Taken successfully"
cd ~/Cloud/pictures/screenshots/ && \
firefox-developer-edition -P default -headless --screenshot "$filename.png" "$QUTE_URL" && \
dunstify "Screenshot" "Taken successfully"
fi
#+end_src
** Get OTP number
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/get-otp.sh
passname=$(ls ~/.password-store/totp-* | xargs -n 1 basename | sed -e 's/\..*$//' | rofi -p "TOPT" -dmenu)
passname=$(ls ~/.local/share/pass/totp-* | xargs -n 1 basename | sed -e 's/\..*$//' | rofi -p "TOPT" -dmenu)
if [ -n "$passname" ]; then
pass otp $passname | xsel -ib && \
notify-send 'OTP' 'copied to clipboard.' &
dunstify 'OTP' 'copied to clipboard.' &
fi
#+end_src
@@ -701,12 +694,12 @@ fi
m3u8_path=`curl -L -s "$QUTE_URL" | pcregrep -o1 "file = \"\/(.*aes.*mp4)\""`
if [ -z "$m3u8_path" ]; then
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP --urgency=critical "Qutebrowser" "No m3u8 playlist found"
dunstify --urgency=critical "Qutebrowser" "No m3u8 playlist found"
else
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "Downloads..." && \
dunstify "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" && \
notify-send --hint=string:x-dunst-stack-tag:ng4iXDxP "Qutebrowser" "$QUTE_TITLE Downloaded"
dunstify "Qutebrowser" "$QUTE_TITLE Downloaded"
fi
#+end_src
@@ -714,3 +707,27 @@ fi
#+begin_src bash :tangle ~/.config/qutebrowser/userscripts/url-to-qrcode.sh
qrencode -o /tmp/qrcode.png "$1" && sxiv /tmp/qrcode.png
#+end_src
* Greasemonkey Scripts
** Skip Youtube ads
https://github.com/qutebrowser/qutebrowser/issues/6480
#+begin_src javascript :tangle ~/.local/share/qutebrowser/greasemonkey/youtube-adblock.user.js
// ==UserScript==
// @name Auto Skip YouTube Ads
// @version 1.0.0
// @description Speed up and skip YouTube ads automatically
// @author jso8910
// @match *://*.youtube.com/*
// @exclude *://*.youtube.com/subscribe_embed?*
// ==/UserScript==
setInterval(() => {
const btn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')
if (btn) {
btn.click()
}
const ad = [...document.querySelectorAll('.ad-showing')][0];
if (ad) {
document.querySelector('video').playbackRate = 10;
}
}, 50)
#+end_src

View File

@@ -18,6 +18,16 @@ ranger --copy-config=scope
To add =scope.sh=.
The following has been added to preview =xournalpp= file:
#+begin_src bash
case "${FILE_EXTENSION_LOWER}" in
## xournall file
xopp)
xournalpp-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
;;
esac
#+end_src
To have image preview:
#+begin_src bash :tangle no
sudo pip3 install ueberzug
@@ -41,7 +51,7 @@ set viewmode miller
set column_ratios 1,1
# Which files should be hidden? (regular expression)
set hidden_filter ^\.|\.(?:pyc|vrb|pyo|lof|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$
set hidden_filter ^\.|\.(?:pyc|vrb|pyo|lof|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl|xopp~)$|^lost\+found$|^__(py)?cache__$
# Show hidden files? You can toggle this by typing 'zh'
set show_hidden false
@@ -202,16 +212,16 @@ Compress:
map ,z shell ~/.config/ranger/scripts/compress.sh %f
#+END_SRC
Get Bibtex from PDF:
#+BEGIN_SRC conf
map ,b shell pdf2bib %f
#+END_SRC
Convert images/pdf/...:
#+BEGIN_SRC conf
map ,c shell convert-file %f
#+END_SRC
Extract BibTeX:
#+begin_src conf
map ,b shell ~/.config/ranger/scripts/add-reference.sh %d/%f
#+end_src
Open SXIV on current directory:
#+BEGIN_SRC conf
map ,s shell nohup sxiv -t %d &
@@ -242,6 +252,32 @@ map ,y shell ~/.config/ranger/scripts/copy-content.sh %s &
#+end_src
** Scripts
*** Extract DOI, create BibTeX and rename file
:PROPERTIES:
:header-args: :tangle ~/.config/ranger/scripts/add-reference.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
add_reference () {
doi=$(pdf2doi $1 | sed 's/^DOI *//' | sed 's/ \+.*//')
# If empty DOI, ask manually
if [ -z $doi ]; then
doi=$(rofi -dmenu -p "DOI")
fi
# If DOI, add it to Emacs
if [ ! -z $doi ]; then
emacsclient --eval "(tdh-org-ref-import-pdf \"$doi\" \"$1\")" && \
dunstify --replace=49496 "BibTeX" "File copied."
else
dunstify --replace=49496 "BibTeX" "Failed to get DOI"
fi
}
add_reference "$1"
#+end_src
*** Extract Script
:PROPERTIES:
:header-args: :tangle ~/.config/ranger/scripts/extract.sh
@@ -385,8 +421,9 @@ map cd console cd%space
#+BEGIN_SRC conf
map gh cd ~/
map gw cd ~/Cloud/work-projects
map gp cd ~/Pictures
map gp cd ~/Cloud/personnal
map gP cd ~/Cloud/pictures/phone
map gs cd ~/Cloud/pictures/screenshots
map gT cd ~/.local/share/Trash/files
map gd cd ~/Downloads
map gD cd ~/Cloud/documents
@@ -415,7 +452,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 -a -x %p
map D shell dragon-drop -a -x %p
#+END_SRC
*** Rename files
@@ -591,7 +628,27 @@ copycmap <end> <C-e>
# only running the current file even if you have marked multiple files.
#+END_SRC
** Websites
#+BEGIN_SRC conf
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
ext x?html?, has firefox, X, flag f = firefox -- "$@"
ext x?html?, has elinks, terminal = elinks "$@"
ext x?html?, has w3m, terminal = w3m "$@"
#+END_SRC
** Text Files
3D files (before the rest)
#+begin_src conf
ext stp, X, flag f = f3d -- "$@"
ext step, X, flag f = f3d -- "$@"
ext stl, X, flag f = f3d -- "$@"
#+end_src
Calendar files
#+begin_src conf
ext ics, X, flag f = ics-add "$@"
#+end_src
Define the =$EDITOR= for text files as first action:
#+BEGIN_SRC conf
mime ^text, label editor = $EDITOR -- "$@"
@@ -638,6 +695,11 @@ ext djvu, has evince, X, flag f = evince -- "$@"
ext djvu, has atril, X, flag f = atril -- "$@"
#+END_SRC
** Xournalpp
#+begin_src conf
ext xopp, X, flag f = xournalpp "$@"
#+end_src
** Archives
#+BEGIN_SRC conf
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool -- "$@" | "$PAGER"
@@ -650,12 +712,9 @@ ext tar|gz, has tar = tar vvtf "$@" | "$PAGER"
ext tar|gz, has tar = tar vvxf "$@"
#+END_SRC
** Websites
** Torrent
#+BEGIN_SRC conf
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
ext x?html?, has firefox, X, flag f = firefox -- "$@"
ext x?html?, has elinks, terminal = elinks "$@"
ext x?html?, has w3m, terminal = w3m "$@"
ext torrent, X, flag f = stig add -- "$@"
#+END_SRC
** Word, Excel and Presentation files
@@ -722,7 +781,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, X, flag f = dragon -a -x "$@"
has dragon-drop, X, flag f = dragon-drop -a -x "$@"
#+END_SRC
* Ranger Commands

View File

@@ -31,7 +31,6 @@ hide-scrollbar: true;
fullscreen: false;
dpi: -1;
show-match: true;
theme: "gruvbox-dark-soft";
kb-move-front: "Control+a";
kb-move-end: "Control+e";
kb-move-word-back: "Alt+b,Control+Left";
@@ -48,12 +47,13 @@ kb-accept-alt: "Shift+Return";
kb-delete-entry: "Shift+Delete";
kb-row-up: "Up,Control+p";
kb-row-down: "Down,Control+n";
kb-row-tab: "Tab";
kb-row-first: "Home,KP_Home";
kb-row-last: "End,KP_End";
kb-row-select: "Control+space";
kb-cancel: "Escape,Control+g";
}
@theme "gruvbox-dark-soft"
#+END_SRC
* Theme

View File

@@ -1,4 +1,4 @@
#+TITLE: Open-WRT Router (Netgear R7000)
#+TITLE: Open-WRT Router (Netgear R7800)
#+SETUPFILE: ./setup/org-setup-file.org
* Installation
@@ -15,11 +15,16 @@ opkg update && opkg install luci-ssl-openssl luci-theme-material ipset curl diff
#+end_src
* Update
#+begin_src matlab
opkg update
#+end_src
#+begin_src bash
opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade
#+end_src
* Configuration
** Configuration Files
https://openwrt.org/docs/guide-user/base-system/uci#common_principles
Configuration files are in =/etc/config=.
@@ -32,3 +37,54 @@ Configuration files are in =/etc/config=.
| =/etc/config/network= | Switch, interface and route configuration: |
| =/etc/config/system= | Misc. system settings, NTP, RNG, Watchcat |
| =/etc/config/wireless= | Wireless settings and wifi network definition |
Nice theme:
https://github.com/jerrykuku/luci-theme-argon
** VLAN
| ID | Name | Description |
|----+-----------+-------------|
| 1 | LAN | |
| 2 | WAN | |
| 3 | GUEST | |
| 4 | IOT | |
| 5 | Unifi-LAN | |
** IP Addresses
*** LAN
| Hostname | MAC-Address | IPv4-Address | Description |
|-----------------+-------------------+---------------+-------------|
| xps13 | 94:05:BB:13:6E:55 | 192.168.1.71 | |
| desktop-w10 | 14:DA:E9:D5:9D:F4 | 192.168.1.72 | |
| smart-tv | 5C:85:7E:45:F9:82 | 192.168.1.73 | |
| unifi-u6-lite-1 | 70:A7:41:C6:BE:60 | 192.168.1.74 | |
|-----------------+-------------------+---------------+-------------|
| homelab | D4:5D:64:7C:38:3C | 192.168.1.21 | |
|-----------------+-------------------+---------------+-------------|
| oneplus8 | 5A:C7:3D:21:DE:D7 | 192.168.1.101 | |
|-----------------+-------------------+---------------+-------------|
| valetudo | 7C:25:DA:37:A5:BC | 192.168.1.110 | |
*** IOT
| Hostname | MAC-Address | IPv4-Address | Description |
|-------------------------------+-------------------+--------------+-------------|
| http://shutter-1.lan/ | C4:5B:BE:5F:C8:32 | 192.168.2.10 | Shutters |
| http://shutter-2.lan/ | C4:5B:BE:5F:3A:E2 | 192.168.2.11 | |
| http://shutter-3.lan/ | C4:5B:BE:5F:35:41 | 192.168.2.12 | |
| http://shutter-salon.lan/ | 48:3F:DA:49:24:01 | 192.168.2.13 | (ESP8266) |
|-------------------------------+-------------------+--------------+-------------|
| http://shelly1-1.lan/ | E8:68:E7:86:C1:2C | 192.168.2.20 | Light-bulbs |
| http://shelly1-2.lan/ | E8:68:E7:87:46:51 | 192.168.2.21 | |
| http://shelly1-3.lan/ | 8C:AA:B5:74:CD:16 | 192.168.2.22 | |
| http://shelly1-salon.lan/ | E8:68:E7:87:27:1D | 192.168.2.24 | |
| http://shelly25-cuisine.lan/ | 98:CD:AC:1E:11:8E | 192.168.2.25 | |
| http://shelly25-entrance.lan/ | C4:5B:BE:6B:87:39 | 192.168.2.26 | |
|-------------------------------+-------------------+--------------+-------------|
| http://xiaomi-ble.lan/ | 3C:61:05:12:A8:C4 | 192.168.2.28 | Temperature |
|-------------------------------+-------------------+--------------+-------------|
| http://shellytrv-1.lan/ | BC:33:AC:03:35:8C | 192.168.2.40 | TRV |
| http://shellytrv-2.lan/ | 60:A4:23:DC:C7:1E | 192.168.2.41 | |
| http://shellytrv-3.lan/ | 60:A4:23:DC:C8:14 | 192.168.2.42 | |
| http://shellytrv-s.lan/ | 60:A4:23:DB:2B:76 | 192.168.2.43 | |
| http://shellytrv-e.lan/ | 60:A4:23:DB:2C:8C | 192.168.2.44 | |

View File

@@ -71,11 +71,11 @@ XF86AudioLowerVolume
#+begin_src conf
# Increase Backlight
XF86MonBrightnessUp
xbacklight -inc 10
light -A 10
# Descrease Backlight
XF86MonBrightnessDown
xbacklight -dec 10
light -U 10
#+end_src
** Change Tracks
@@ -166,7 +166,7 @@ super + shift + b
# Calculator
super + shift + c
rofi -show calc -modi calc -no-show-match -no-sort
rofi -show calc -modi calc -no-show-match -no-sort -no-persist-history
# Sound Manager
super + shift + s

View File

@@ -15,8 +15,11 @@ https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-
Description=Sync Brain Website everyday
RefuseManualStart=no
RefuseManualStop=yes
OnFailure=notify-via-gotify@%i.service
[Service]
Environment="PASSWORD_STORE_DIR=/home/thomas/.local/share/pass"
Environment="GNUPGHOME=/home/thomas/.local/share/gnupg"
Type=oneshot
ExecStart=%h/.local/bin/brain_git_push
#+END_SRC
@@ -36,8 +39,9 @@ Wants=network-online.target
After=network-online.target
[Timer]
OnCalendar=*-*-* 16:00:00
Persistent=true
Persistent=false
OnBootSec=30min
OnUnitActiveSec=1d
Unit=braingit.service
[Install]
@@ -52,7 +56,7 @@ WantedBy=default.target
:END:
#+begin_src bash
cd ~/Cloud/programming/brain-website/
cd /home/thomas/Cloud/programming/brain-website/
if [[ ! -z $(git status -s content/) ]]
then
@@ -63,6 +67,93 @@ then
fi
#+end_src
* =notify-via-gotify= - Notify
** Service
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/notify-via-gotify@.service
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Unit]
Description=%i failure notification over gotify
[Service]
Environment="PASSWORD_STORE_DIR=/home/thomas/.local/share/pass"
Environment="GNUPGHOME=/home/thomas/.local/share/gnupg"
Type=oneshot
ExecStart=/bin/bash -c "systemctl status -n10 %i | ~/.local/bin/create-gotify-notification-for-systemd --unit %i --host %H | curl -XPOST \"https://gotify.tdehaeze.xyz/message?token=$(pass nas/gotify_notif_token | sed -n 1p)\" -H \"Content-Type: application/json\" --data-binary @-"
#+end_src
** Script
:PROPERTIES:
:header-args: :tangle ~/.local/bin/create-gotify-notification-for-systemd
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env python3"
:END:
#+begin_src python
import json
import argparse
import sys
TITLE_TEMPLATE = "Systemd unit failed"
MESSAGE_TEMPLATE = "Systemd unit {unit} failed on host {host}."
def main():
arguments = parse_arguments()
status = "\n".join(" " + line.rstrip() for line in sys.stdin.readlines())
message = MESSAGE_TEMPLATE.format(unit=arguments.unit, host=arguments.host, status=status)
title = TITLE_TEMPLATE.format(unit=arguments.unit, host=arguments.host)
output = create_gotify_json(title, message, arguments.priority)
print(output)
def parse_arguments():
parser = argparse.ArgumentParser(
description="Create Gotify notification for failing systemd unit",
)
parser.add_argument(
"--unit",
default="unknown",
help="the failing systemd unit name",
)
parser.add_argument(
"--host",
default="unknown",
help="the failing systemd unit host",
)
parser.add_argument(
"--priority",
default="5",
type=int,
help="the notification priority",
)
return parser.parse_args()
def create_gotify_json(title, message, priority):
data = {
"title": title,
"message": message,
"priority": priority,
"extras": {
"client::display": {
"contentType": "text/markdown"
},
},
}
return json.dumps(data)
if __name__ == '__main__':
main()
#+end_src
* =checkmail= - Check new mails
** Service
:PROPERTIES:
@@ -75,8 +166,11 @@ fi
Description=Check new mails
RefuseManualStart=no
RefuseManualStop=yes
OnFailure=notify-via-gotify@%i.service
[Service]
Environment="PASSWORD_STORE_DIR=/home/thomas/.local/share/pass"
Environment="GNUPGHOME=/home/thomas/.local/share/gnupg"
Type=oneshot
ExecStart=%h/.local/bin/checkmail -q
#+END_SRC
@@ -94,7 +188,6 @@ RefuseManualStart=no
RefuseManualStop=no
Wants=network-online.target
After=network-online.target
Requires=checkmail.service
[Timer]
Persistent=false
@@ -125,45 +218,24 @@ while [ -n "$1" ]; do # while loop starts
shift
done
# Count number of new mails before retreiving mails
gmail_old="$(ls ~/.local/share/mails/gmail/Inbox/new | wc -l)"
esrf_old="$(ls ~/.local/share/mails/esrf/Inbox/new | wc -l)"
# =============================================================
# Count number of mails
gmail_old="$(ls ~/.mail/gmail/Inbox/new | wc -l)"
esrf_old="$(ls ~/.mail/esrf/Inbox/new | wc -l)"
# =============================================================
# =============================================================
# Retreive mails
mbsync $opt_all $opt_verbose gmail-Home esrf-Home 2>/tmp/mbsync.log
# =============================================================
mbsync -c /home/thomas/.config/isync/mbsyncrc $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)"
# =============================================================
# Count number of new mails after retreiving mails
gmail_new="$(ls ~/.local/share/mails/gmail/Inbox/new | wc -l)"
esrf_new="$(ls ~/.local/share/mails/esrf/Inbox/new | wc -l)"
# =============================================================
# Total Number of new mails since last checking
new="$(($esrf_new+$gmail_new))"
old="$(($esrf_old+$gmail_old))"
# =============================================================
# =============================================================
# Notification
if [ "$new" -gt 0 ]; then
notify-send --hint=string:x-dunst-stack-tag:fV84ivMi 'Mails ' "$new new mail(s)"
# Notification if there are new retreive mails
if [ "$(($esrf_new+$gmail_new))" -gt "$(($esrf_old+$gmail_old))" ]; then
dunstify --replace=98465 'Mails ' "$(($gmail_new+$esrf_new)) new mail(s)"
fi
# =============================================================
# =============================================================
# Indexation and Tags
if pgrep -f 'mu server'; then
emacsclient --eval '(mu4e-update-index)'
else
mu index -m ~/.mail $opt_verbose $opt_quiet
fi
# =============================================================
mu index $opt_verbose $opt_quiet
#+end_src
* =syncmail= - Synchronize all mails
@@ -178,8 +250,11 @@ fi
Description=Sync all mails
RefuseManualStart=no
RefuseManualStop=yes
OnFailure=notify-via-gotify@%i.service
[Service]
Environment="PASSWORD_STORE_DIR=/home/thomas/.local/share/pass"
Environment="GNUPGHOME=/home/thomas/.local/share/gnupg"
Type=oneshot
ExecStart=%h/.local/bin/checkmail -a -q
#+END_SRC
@@ -197,7 +272,6 @@ RefuseManualStart=no
RefuseManualStop=no
Wants=network-online.target
After=network-online.target
Requires=syncmail.service
[Timer]
Persistent=false
@@ -223,9 +297,12 @@ Description=Synchronize calendars and contacts
Documentation=https://vdirsyncer.readthedocs.org/
Wants=network-online.target
After=network-online.target
OnFailure=notify-via-gotify@%i.service
[Service]
ExecStart=/home/thomas/.local/bin/vdirsyncer --verbosity "ERROR" sync
Environment="PASSWORD_STORE_DIR=/home/thomas/.local/share/pass"
Environment="GNUPGHOME=/home/thomas/.local/share/gnupg"
ExecStart=/usr/bin/vdirsyncer --verbosity "ERROR" sync
Type=oneshot
#+end_src
@@ -248,89 +325,13 @@ AccuracySec=5m
WantedBy=timers.target
#+end_src
* TODO =ssh-agent= - SSH Agent
** Service
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/ssh-agent.service
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Unit]
Description=SSH key agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
[Install]
WantedBy=default.target
#+end_src
* TODO =emacs= - Emacs
** Service
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/emacs.service
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Unit]
Description=Emacs text editor
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
[Service]
Type=simple
ExecStart=/usr/bin/emacs --fg-daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=on-failure
[Install]
WantedBy=default.target
#+end_src
* TODO =trash-empty= - Empty the trash for files older than 30 days
** Service
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/trash-empty.service
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Unit]
Description=Empty the trash for files older than 30 days
Documentation=https://github.com/andreafrancia/trash-cli
[Service]
ExecStart=/home/thomas/.local/bin/trash-empty 30
Type=oneshot
#+end_src
** Timer
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/trash-empty.timer
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Unit]
Description=Empty trash
[Timer]
OnCalendar=*-*-* 16:00:00
Persistent=true
Unit=trash-empty
[Install]
WantedBy=timers.target
#+end_src
* =syncthing=
* =syncthing= - Synchronize =Cloud= directory
** 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
@@ -348,6 +349,150 @@ RestartForceExitStatus=3 4
WantedBy=default.target
#+end_src
* =restic-backup= - Backup Home Directory
** Backup
*** Service
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/restic-backup.service
:header-args+: :comments both :mkdirp yes
:END:
#+BEGIN_SRC conf
[Unit]
Description=Backup Home Directory
RefuseManualStart=no
RefuseManualStop=no
OnFailure=notify-via-gotify@%i.service
[Service]
Environment="PASSWORD_STORE_DIR=/home/thomas/.local/share/pass"
Environment="GNUPGHOME=/home/thomas/.local/share/gnupg"
Type=oneshot
ExecStart=%h/.local/bin/restic-backup
ExecStartPost=/bin/sleep 30
ExecStartPost=%h/.local/bin/restic-forget
#+END_SRC
*** Timer
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/restic-backup.timer
:header-args+: :comments both :mkdirp yes
:END:
#+BEGIN_SRC conf
[Unit]
Description=Backup Home Directory Everyday
RefuseManualStart=no
RefuseManualStop=no
Wants=network-online.target
[Timer]
Persistent=true
OnCalendar=daily
Unit=restic-backup.service
[Install]
WantedBy=default.target
#+END_SRC
*** Script - Backup
:PROPERTIES:
:header-args: :tangle ~/.local/bin/restic-backup
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
restic backup \
-r sftp:thomas@homelab:/srv/storage/Backups/esrf-laptop \
--password-command "pass show restic" \
--verbose --one-file-system --tag systemd.timer \
--exclude "/home/thomas/.cache" \
--exclude "/home/thomas/Cloud" \
--exclude "/home/thomas/mnt" \
--exclude "/home/thomas/perl5" \
--exclude "/home/thomas/.local/soft" \
/home/thomas
#+end_src
*** Script - Forget
:PROPERTIES:
:header-args: :tangle ~/.local/bin/restic-forget
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
restic unlock \
-r sftp:thomas@homelab:/srv/storage/Backups/esrf-laptop \
--password-command "pass show restic" && \
restic forget \
-r sftp:thomas@homelab:/srv/storage/Backups/esrf-laptop \
--password-command "pass show restic" \
--verbose --tag systemd.timer \
--group-by "paths,tags" \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 1 \
--keep-yearly 1
#+end_src
** Prune
*** Service
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/restic-prune.service
:header-args+: :comments both :mkdirp yes
:END:
#+BEGIN_SRC conf
[Unit]
Description=Prune restic backup
RefuseManualStart=no
RefuseManualStop=no
OnFailure=notify-via-gotify@%i.service
[Service]
Environment="PASSWORD_STORE_DIR=/home/thomas/.local/share/pass"
Environment="GNUPGHOME=/home/thomas/.local/share/gnupg"
Type=oneshot
ExecStart=%h/.local/bin/restic-prune
#+END_SRC
*** Timer
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/restic-prune.timer
:header-args+: :comments both :mkdirp yes
:END:
#+BEGIN_SRC conf
[Unit]
Description=Prune Restic Backup
RefuseManualStart=no
RefuseManualStop=no
Wants=network-online.target
[Timer]
Persistent=true
OnCalendar=monthly
Unit=restic-prune.service
[Install]
WantedBy=default.target
#+END_SRC
*** Script
:PROPERTIES:
:header-args: :tangle ~/.local/bin/restic-prune
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
restic prune \
-r sftp:thomas@homelab:/srv/storage/Backups/esrf-laptop \
--password-command "pass show restic" \
#+end_src
* =homelab-tunnel= - SSH Tunnel
Useful to bypass firewalls.
This can we used on the browser:
@@ -390,7 +535,7 @@ Description=Setup a secure tunnel with ESRF
After=network.target
[Service]
ExecStart=/usr/bin/ssh -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -D 8081 -q -N -T rnice.esrf.fr
ExecStart=/usr/bin/ssh -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -D 8081 -q -N -T firewall.esrf.fr
# Restart every >2 seconds to avoid StartLimitInterval failure
RestartSec=5

View File

@@ -1,5 +1,8 @@
#+TITLE: Drawing Tablet - Xournal
#+SETUPFILE: ./setup/org-setup-file.org
#+PROPERTY: header-args:bash :comments both :mkdirp yes
#+PROPERTY: header-args:bash+ :shebang "#!/usr/bin/env bash"
#+PROPERTY: header-args:bash+ :tangle-mode (identity #o555)
* =xournalpp=
@@ -50,3 +53,48 @@ Special lines in =settings.xml=:
<property name="eagerPageCleanup" value="true"/>
<property name="pageTemplate" value="xoj/template&#10;copyLastPageSettings=false&#10;size=600.0x400.0&#10;backgroundType=plain&#10;backgroundColor=#ffffff&#10;"/>
#+end_src
* Automatically configure tablet
See [[https://unix.stackexchange.com/questions/65788/why-doesnt-xsetwacom-work-from-udev][here]].
=sudoedit /etc/udev/rules.d/99-huion-tablet.rules=
#+begin_src conf :tangle no
SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="256c", ATTRS{idProduct}=="006d", RUN="/home/thomas/.local/scripts/setup-huion-tablet.sh"
#+end_src
Then two scripts are used.
The first one is just used to call the second one in the background
#+begin_src bash :tangle ~/.local/scripts/setup-huion-tablet.sh
/home/thomas/.local/scripts/setup-huion-tablet-script.sh &
#+end_src
And this is the second one with the actual config:
#+begin_src bash :tangle ~/.local/scripts/setup-huion-tablet-script.sh
sleep 2
DISPLAY=:0
XAUTHORITY=/home/thomas/.Xauthority
export DISPLAY XAUTHORITY
# 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
# 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 Y # 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 Shift E # Errase
xsetwacom set "HUION Huion Tablet_H320M Pad pad" button 15 key Ctrl Q # Quit
#+end_src

View File

@@ -1,6 +1,6 @@
#+TITLE: Tmux Configuration
#+SETUPFILE: ./setup/org-setup-file.org
#+PROPERTY: header-args :tangle ~/.tmux.conf
#+PROPERTY: header-args :tangle ~/.config/tmux/tmux.conf
#+PROPERTY: header-args+ :comments both :mkdirp yes
* Line

View File

@@ -1,12 +1,11 @@
#+TITLE: Torrent Configuration
#+SETUPFILE: ./setup/org-setup-file.org
* =stig= - TUI and CLI for Transmission
https://github.com/rndusr/stig
* =stig= - TUI and CLI for Transmission ([[https://github.com/rndusr/stig][link]])
#+begin_src conf :comments none :mkdirp yes :tangle ~/.config/stig/rc :noweb no-export
# Host that runs Transmission daemon
set connect.host torrent.tdehaeze.xyz
set connect.host <<get-password(passname="ip/homelab")>>
set connect.port 9091
set connect.user tdehaeze
set connect.password <<get-password(passname="nas/transmission")>>

View File

@@ -28,8 +28,6 @@ alang=en,fr
# Do not close mpv at the end of video
keep-open=yes
script-opts=ytdl_hook-ytdl_path=/home/thomas/miniconda3/bin/yt-dlp
#+end_src
* =input.conf= - MPV Key Bindings

192
vim.org
View File

@@ -2,12 +2,12 @@
#+SETUPFILE: ./setup/org-setup-file.org
#+PROPERTY: header-args :comments none
#+PROPERTY: header-args+ :mkdirp yes
#+PROPERTY: header-args+ :tangle ~/.vimrc
#+PROPERTY: header-args+ :tangle ~/.config/nvim/init.vim
* Plugins Install
** Plug start
#+BEGIN_SRC vimrc
call plug#begin('~/.vim/plugged')
call plug#begin('~/.config/nvim/plugged')
#+end_src
** Manage Files
@@ -34,7 +34,6 @@ Plug 'jiangmiao/auto-pairs' " Vim plugin, insert or delete brackets,
** Git
#+begin_src vimrc
" Plug 'mhinz/vim-signify' " Show a diff using Vim its sign column
Plug 'TimUntersberger/neogit'
#+end_src
@@ -78,7 +77,7 @@ Plug 'morhetz/gruvbox' " Retro groove color scheme for Vim
Other nice themes are [[https://github.com/mhartington/oceanic-next][oceanic-next]] and [[https://github.com/jacoborus/tender.vim][tender]].
** TODO Language Server Protocol
** Language Server Protocol
#+begin_src vimrc
" LSP Support
Plug 'neovim/nvim-lspconfig'
@@ -103,28 +102,12 @@ Plug 'VonHeikemen/lsp-zero.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
#+end_src
** Snippnets and autocompletion
#+begin_src vimrc
" Plug 'SirVer/ultisnips' " The ultimate snippet solution for Vim
" Plug 'honza/vim-snippets' " Vim-snipmate default snippets
#+end_src
** Syntax Checking and Build Utils
#+begin_src vimrc
" Plug 'neomake/neomake' " Asynchronous linting and make framework for Neovim/Vim
#+end_src
** Tmux
#+begin_src vimrc
Plug 'christoomey/vim-tmux-navigator' " Seamless navigation between tmux panes and vim splits
Plug 'jpalardy/vim-slime' " Used to type text into a REPL
#+end_src
** Syntax
#+begin_src vimrc
" Plug 'sheerun/vim-polyglot' " A solid language pack for Vim
#+end_src
** LaTeX
#+begin_src vimrc
" Plug 'lervag/vimtex', { 'for': 'tex' } " A modern vim plugin for editing LaTeX files.
@@ -144,8 +127,6 @@ call plug#end()
* Basic
** General
#+begin_src vimrc
set runtimepath+=~/.vim
" Sets how many lines of history VIM has to remember
set history=500
@@ -443,7 +424,7 @@ set guioptions-=L
** Turn persistent undo on
#+begin_src vimrc
try
set undodir=~/.vim_runtime/temp_dirs/undodir
set undodir=~/.local/share/nvim/undodir
set undofile
catch
endtry
@@ -662,7 +643,7 @@ au FileType matlab nmap <buffer> <localleader>mw :SlimeSend0('workspace')<CR>
#+end_src
* Plugins Config
** Treesitter
** =nvim-treesitter=
#+begin_src vimrc
lua <<EOF
require'nvim-treesitter.configs'.setup {
@@ -674,97 +655,7 @@ require'nvim-treesitter.configs'.setup {
EOF
#+end_src
** =junegunn/fzf=
#+begin_src vimrc
" " This is the default extra key bindings
" let g:fzf_action = {
" \ 'ctrl-t': 'tab split',
" \ 'ctrl-h': 'split',
" \ 'ctrl-v': 'vsplit' }
" " [[B]Commits] Customize the options used by 'git log':
" let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
" let g:fzf_colors =
" \ { 'fg': ['fg', 'Normal'],
" \ 'bg': ['bg', 'Normal'],
" \ 'hl': ['fg', 'Comment'],
" \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
" \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
" \ 'hl+': ['fg', 'Statement'],
" \ 'info': ['fg', 'PreProc'],
" \ 'prompt': ['fg', 'Conditional'],
" \ 'pointer': ['fg', 'Exception'],
" \ 'marker': ['fg', 'Keyword'],
" \ 'spinner': ['fg', 'Label'],
" \ 'header': ['fg', 'Comment'] }
" function! s:fzf_statusline()
" " Override statusline as you like
" highlight fzf1 ctermfg=161 ctermbg=251
" highlight fzf2 ctermfg=23 ctermbg=251
" highlight fzf3 ctermfg=237 ctermbg=251
" setlocal statusline=%#fzf1#\ >\ %#fzf2#fz%#fzf3#f
" endfunction
" autocmd! User FzfStatusLine call <SID>fzf_statusline()
#+end_src
** =autozimu/LanguageClient-neovim=
#+begin_src vimrc
" let g:LanguageClient_serverCommands = {
" \ 'matlab': ['java', ' -Djava.library.path=$MATLABROOT/bin/glnxa64 -cp $MATLABROOT/extern/engines/java/jar/engine.jar:$MATLABROOT/java/jar/jmi.jar:/home/thomas/github/matlab-langserver/build/libs/lsp-matlab-0.1.jar org.tokor.lspmatlab.Application'],
" \ }
" nnoremap <F5> :call LanguageClient_contextMenu()<CR>
" " Or map each action separately
" nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR>
" nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
" nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
#+end_src
** =JamshedVesuna/vim-markdown-preview=
#+begin_src vimrc
" let vim_markdown_preview_github=1
" let vim_markdown_preview_browser='Google Chrome'
" let vim_markdown_preview_temp_file=1
" let vim_markdown_preview_pandoc=1
#+end_src
** =mhinz/vim-signify=
#+begin_src vimrc
let g:signify_vcs_list = ['git']
let g:signify_disable_by_default = 1
#+end_src
** =Deoplete=
#+begin_src vimrc
" let g:deoplete#enable_at_startup = 1
" let g:deoplete#omni#functions = {}
" set completeopt=longest,menuone,preview
" let g:deoplete#sources = {}
" let g:deoplete#enable_smart_case = 1
" call deoplete#custom#set('ultisnips', 'matchers', ['matcher_fuzzy'])
#+end_src
** =SirVer/ultisnips=
#+begin_src vimrc
" 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>"
#+end_src
** =honza/vim-snippets=
#+begin_src vimrc
let g:snipMate = {}
let g:snipMate.scope_aliases = {}
#+end_src
** =itchyny/lightline.vim=
** =lightline=
#+begin_src vimrc
" \ 'colorscheme': 'gruvbox',
let g:lightline = {
@@ -784,7 +675,7 @@ let g:lightline = {
\ }
#+end_src
** Git
** =neogit=
#+begin_src vimrc
lua <<EOF
local neogit = require('neogit')
@@ -793,7 +684,7 @@ neogit.setup {}
EOF
#+end_src
** LSP
** =lsp-zero=
#+begin_src vimrc
lua <<EOF
local lsp = require('lsp-zero')
@@ -803,25 +694,25 @@ lsp.setup()
EOF
#+end_src
** =Autopairs=
** =autopairs=
#+begin_src vimrc
" Incompatibilité entre auto-pairs et clang-complete
let g:AutoPairsMapCR = 0
imap <silent><CR> <CR><Plug>AutoPairsReturn
#+end_src
** =Yggdroot/indentLine=
** =indentLine=
#+begin_src vimrc
" :IndentLinesToggle toggles lines on and off.
let g:indentLine_color_term = 239
#+end_src
** =ryanoasis/vim-devicons=
** =vim-devicons=
#+begin_src vimrc
let g:webdevicons_enable_ctrlp = 1
#+end_src
** =tpope/vim-surround=
** =vim-surround=
#+begin_src vimrc
vmap Si S(i_<esc>f)
au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc>
@@ -829,43 +720,14 @@ au FileType mako vmap Si S"i${ _(<esc>2f"a) }<esc>
let g:surround_{char2nr('b')} = "__\r__"
#+end_src
** =Neomake=
#+begin_src vimrc
" " Latex
" autocmd! BufWritePost *.tex Neomake
" let g:neomake_tex_chktex_maker = {
" \ 'exe': 'chktex',
" \ 'args': ['--inputfiles'],
" \ 'errorformat':
" \ '%EError %n in %f line %l: %m,' .
" \ '%WWarning %n in %f line %l: %m,' .
" \ '%WMessage %n in %f line %l: %m,' .
" \ '%Z%p^,' .
" \ '%-G%.%#'
" \ }
" let g:neomake_tex_enabled_makers = ['chktex']
" " Matlab
" autocmd! BufWritePost *.m Neomake
" let g:neomake_matlab_mlint_maker = {
" \ 'exe': 'mlint',
" \ 'mapexpr': "neomake_bufname.':'.v:val",
" \ 'errorformat':
" \ '%f:L %l (C %c): %m,' .
" \ '%f:L %l (C %c-%*[0-9]): %m,',
" \ }
" let g:neomake_matlab_enabled_makers = ['mlint']
** =vimtex=
#+begin_src vimrc :tangle no
let g:tex_conceal=""
autocmd FileType tex let b:vimtex_main = 'main.tex'
let g:vimtex_mappings_enabled=0
#+end_src
** =lervag/vimtex=
#+begin_src vimrc
" let g:tex_conceal=""
" autocmd FileType tex let b:vimtex_main = 'main.tex'
" let g:vimtex_mappings_enabled=0
#+end_src
** =jpalardy/vim-slime=
** =vim-slime=
#+begin_src vimrc
if exists('$TMUX')
let g:slime_target = "tmux"
@@ -874,20 +736,14 @@ if exists('$TMUX')
endif
#+end_src
** =mhinz/vim-grepper=
#+begin_src vimrc
" nnoremap <leader>G :Grepper -tool ag<cr>
" nmap gs <plug>(GrepperOperator)
" xmap gs <plug>(GrepperOperator)
** =vim-grepper=
#+begin_src vimrc :tangle no
nnoremap <leader>G :Grepper -tool ag<cr>
nmap gs <plug>(GrepperOperator)
xmap gs <plug>(GrepperOperator)
#+end_src
** Editor config
#+begin_src vimrc
" To ensure that this plugin works well with Tim Pope's fugitive, use the following patterns array:
let g:EditorConfig_exclude_patterns = ['fugitive://.*']
#+end_src
** Telescope
** =telescope=
#+begin_src vimrc
lua <<EOF
require('telescope').load_extension('fzf')

View File

@@ -23,7 +23,7 @@ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManage
Then, install all required software using one command:
#+begin_src bash
choco install -y firefox 7zip.install vlc git.install malwarebytes sumatrapdf.install steam anydesk discord f.lux cmder cura ccleaner neovim imageglass
choco install -y firefox 7zip.install vlc git.install malwarebytes sumatrapdf.install steam anydesk discord f.lux cmder cura ccleaner neovim imageglass mobaxterm
#+end_src
* Debloat windows10

View File

@@ -63,29 +63,25 @@ Xcursor.theme: Breeze
Xcursor.size: 0
#+END_SRC
* =~/.xinitrc=
* =xinitrc=
:PROPERTIES:
:header-args: :tangle ~/.xinitrc
:header-args: :tangle ~/.config/X11/xinitrc
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/bin/sh"
:CUSTOM_ID: xinitrc
:END:
Use the cache directory instead of the default =$HOME/.xsession-errors=.
#+begin_src bash
dbus-update-activation-environment --systemd DISPLAY
#+end_src
Fix for Matlab.
#+begin_src bash
# export _JAVA_AWT_WM_NONREPARENTING=1
ERRFILE="$XDG_CACHE_HOME/X11/xsession-errors"
#+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
Merge the defaults:
#+BEGIN_SRC bash
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
@@ -109,10 +105,14 @@ if [ -f "$usermodmap" ]; then
fi
#+END_SRC
Start =gnome-keyring-daemon=.
Run some default scripts:
#+begin_src bash
eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
#+end_src
#+begin_src bash
@@ -133,9 +133,6 @@ exec i3
Keyboard Options:
#+begin_src bash
# Set repetition keyboard rate
xset r rate 200 40 &
# Set International US keyboard layout
setxkbmap -layout us -variant intl -option caps:escape &
#+end_src
@@ -157,7 +154,7 @@ xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -no
# Redshift
pgrep -xu "$USER" redshift >/dev/null || \
redshift &
redshift -l 48.8582:2.3387 &
# Run Picom (compositor)
picom --daemon &
@@ -170,6 +167,9 @@ blueman-applet &
# Udiskie - Automatic USB mount
udiskie --notify --automount --tray &
# Japanese input
fcitx -d &
#+end_src
Manually start =mopidy= as it seems to not start automatically:

View File

@@ -42,7 +42,8 @@ map t toggle_statusbar
map <Space> scroll full-down
map <BackSpace> scroll full-up
map <C-s> feedkeys ":exec /home/thomas/.config/zathura/scripts/extract-pdf-page.sh $FILE<Return>"
map <C-s> feedkeys ":exec /home/thomas/.config/zathura/scripts/extract-pdf-page.sh $FILE $PAGE<Return>"
map P feedkeys ":exec /home/thomas/.local/bin/print-esrf $FILE<Return>"
#+END_SRC
* Colors
@@ -96,9 +97,9 @@ tmpfile=/tmp/pdf_page.pdf
# Ask for page number
# Ideally would get the page from Zathura...
pagenum=$(rofi -dmenu -p "Page Number")
# pagenum=$(rofi -dmenu -p "Page Number")
pdftk "$1" cat $pagenum output "$tmpfile.pdf" && \
pdftk "$1" cat $2 output "$tmpfile.pdf" && \
pdf2svg "$tmpfile.pdf" "$tmpfile.svg" && \
inkscape "$tmpfile.svg"
#+end_src