Major Update!

This commit is contained in:
Thomas Dehaeze 2019-05-16 21:13:08 +02:00
parent 53f501e847
commit 37f033c802
20 changed files with 3702 additions and 2709 deletions

View File

@ -7,11 +7,11 @@
:END: :END:
#+begin_src conf #+begin_src conf
[Desktop Entry] [Desktop Entry]
Name=neomutt Name=Neomutt
GenericName=Email client GenericName=Email client
Exec=/usr/bin/kitty --class neomutt /usr/bin/neomutt Exec=/usr/bin/termite -e neomutt %u
Type=Application Type=Application
Icon=/usr/share/doc/neomutt/logo/neomutt-128.png Icon=/usr/share/icons/Papirus/64x64/apps/mutt.svg
Categories=Network;Email; Categories=Network;Email;
MimeType=message/rfc822;x-scheme-handler/mailto;application/x-xpinstall; MimeType=message/rfc822;x-scheme-handler/mailto;application/x-xpinstall;
StartupNotify=true StartupNotify=true
@ -29,30 +29,103 @@
Name=Zathura Name=Zathura
Comment=A minimalistic document viewer Comment=A minimalistic document viewer
Exec=zathura %U Exec=zathura %U
# Translators: Icon of the desktop entry. Icon=/usr/share/icons/Papirus/64x64/apps/zathura.svg
Icon=org.pwmt.zathura
Terminal=false Terminal=false
Categories=Office;Viewer; Categories=Office;Viewer;
# Translators: Search terms to find this application. Do not translate or
# localize the semicolons. The list must also end with a semicolon.
Keywords=PDF;PS;PostScript;DjVU;document;presentation;viewer; Keywords=PDF;PS;PostScript;DjVU;document;presentation;viewer;
#+end_src #+end_src
* Weechat * Weechat
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.local/share/applications/weechat.desktop :header-args: :tangle ~/.local/share/applications/weechat.desktop
:header-args+: :comments both :mkdirp yes :header-args+: :comments both :mkdirp yes
:END: :END:
#+begin_src conf #+begin_src conf
[Desktop Entry] [Desktop Entry]
Encoding=UTF-8 Encoding=UTF-8
MultipleArgs=false MultipleArgs=false
Terminal=false Terminal=false
Exec=termite --class=WeeChat -e 'weechat' Exec=termite --class=WeeChat -e 'weechat'
StartupWMClass=WeeChat StartupWMClass=WeeChat
Icon=chat Icon=/usr/share/icons/Papirus/64x64/apps/weechat.svg
Type=Application Type=Application
Categories=Network;IRCClient; Categories=Network;IRCClient;
StartupNotify=true StartupNotify=true
Name=WeeChat Name=WeeChat
GenericName=IRC Client GenericName=IRC Client
#+end_src
* Matlab
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/matlab.desktop
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/usr/local/bin/matlab -desktop
Name=MATLAB
Icon=/usr/share/icons/Papirus/48x48/apps/matlab.svg
Categories=Development;Math;Science
Comment=Scientific computing environment
StartupNotify=true
StartupWMClass=com-mathworks-util-PostVMInit
#+end_src
* Neovim
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/nvim.desktop
:header-args+: :comments both :mkdirp yes
: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
* TODO Transmission
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/transmission.desktop
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Desktop Entry]
Type=Application
Name=Torrent
Exec=/usr/bin/env transadd %U
#+end_src
* Images
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/img.desktop
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Desktop Entry]
Type=Application
Name=Image viewer
Exec=/usr/bin/sxiv -a %u
#+end_src
* TODO RSS
:PROPERTIES:
:header-args: :tangle ~/.local/share/applications/rss.desktop
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Desktop Entry]
Type=Application
Name=RSS feed addition
Exec=/usr/bin/env rssadd %U
#+end_src #+end_src

View File

@ -30,23 +30,25 @@ esac
** Use Color ** Use Color
#+BEGIN_SRC conf #+BEGIN_SRC conf
use_color=true use_color=true
alias ls='ls -hN --color=auto --group-directories-first'
alias grep='grep --colour=auto'
#+END_SRC #+END_SRC
** TODO Set colorful PS1 only on colorful terminals. ** TODO Set colorful PS1 only on colorful terminals.
dircolors --print-database uses its own built-in database instead of using /etc/DIR_COLORS. Try to use the external file first to take advantage of user additions. Use internal bash globbing instead of external grep binary. dircolors --print-database uses its own built-in database instead of using /etc/DIR_COLORS. Try to use the external file first to take advantage of user additions. Use internal bash globbing instead of external grep binary.
#+BEGIN_SRC conf #+BEGIN_SRC conf
safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
match_lhs="" match_lhs=""
[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)" [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
[[ -z ${match_lhs} ]] \ [[ -z ${match_lhs} ]] \
&& type -P dircolors >/dev/null \ && type -P dircolors >/dev/null \
&& match_lhs=$(dircolors --print-database) && match_lhs=$(dircolors --print-database)
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
if ${use_color} ; then if ${use_color} ; then
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489 # Enable colors for ls, etc. Prefer ~/.dir_colors #64489
if type -P dircolors >/dev/null ; then if type -P dircolors >/dev/null ; then
if [[ -f ~/.dir_colors ]] ; then if [[ -f ~/.dir_colors ]] ; then
@ -61,19 +63,14 @@ if ${use_color} ; then
else else
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
fi fi
else
alias ls='ls --color=auto'
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
else
if [[ ${EUID} == 0 ]] ; then if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors # show root@ when we don't have colors
PS1='\u@\h \W \$ ' PS1='\u@\h \W \$ '
else else
PS1='\u@\h \w \$ ' PS1='\u@\h \w \$ '
fi fi
fi fi
#+END_SRC #+END_SRC
#+BEGIN_SRC conf #+BEGIN_SRC conf
@ -122,11 +119,18 @@ bind '"\e[B": history-search-forward'
alias m="neomutt" alias m="neomutt"
alias y="yadm" alias y="yadm"
alias o="xdg-open" alias o="xdg-open"
alias x="sxiv -ft *"
#+END_SRC #+END_SRC
*** Neovim
#+begin_src conf
command -v nvim >/dev/null && alias vim="nvim" vimdiff="nvim -d" # Use neovim for vim if present.
#+end_src
*** Magit *** Magit
#+BEGIN_SRC conf #+BEGIN_SRC conf
alias magit="emacsclient -create-frame --alternate-editor=\"\" --eval '(magit-status)'" # alias magit="emacsclient -create-frame --alternate-editor=\"\" --eval '(magit-status)'"
alias magit="nvim -c MagitOnly"
#+END_SRC #+END_SRC
*** Vim-like *** Vim-like
@ -298,11 +302,7 @@ function nullify() {
** Prompt ** Prompt
#+BEGIN_SRC conf #+BEGIN_SRC conf
if [ "`id -u`" -eq 0 ]; then export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
PS1="\[\033[m\]|\[\033[1;35m\]\t\[\033[m\]|\[\e[1;31m\]\u\[\e[1;36m\]\[\033[m\]@\[\e[1;36m\]\h\[\033[m\]:\[\e[0m\]\[\e[1;32m\][\W]> \[\e[0m\]"
else
PS1="\[\033[m\]|\[\033[1;35m\]\t\[\033[m\]|\[\e[1m\]\u\[\e[1;36m\]\[\033[m\]@\[\e[1;36m\]\h\[\033[m\]:\[\e[0m\]\[\e[1;32m\][\W]> \[\e[0m\]"
fi
#+END_SRC #+END_SRC
** Exports ** Exports
@ -391,8 +391,11 @@ export SUDO_ASKPASS=~/bin/askpass-rofi
** Default ** Default
#+BEGIN_SRC conf #+BEGIN_SRC conf
export EDITOR=/usr/bin/nvim export EDITOR="nvim"
export BROWSER=/usr/bin/qutebrowser export TERMINAL="st"
export BROWSER="qutebrowser"
export READER="zathura"
export FILE="vifm"
#+END_SRC #+END_SRC
** Path ** Path

521
dotfiles/binaries.org Normal file
View File

@ -0,0 +1,521 @@
#+TITLE: Binaries
* Select Screen
:PROPERTIES:
:header-args: :tangle ~/bin/displayselect
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
Script taken from Luke Smith.
#+begin_src bash
twoscreen() { # If multi-monitor is selected and there are two screens.
mirror=$(printf "no\\nyes" | dmenu -i -p "Mirror displays?")
# Mirror displays using native resolution of external display and a scaled
# version for the internal display
if [ "$mirror" = "yes" ]; then
external=$(echo "$screens" | dmenu -i -p "Optimize resolution for:")
internal=$(echo "$screens" | grep -v "$external")
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
tail -n 1 | awk '{print $1}')
res_internal=$(xrandr --query | sed -n "/^$internal/,/\+/p" | \
tail -n 1 | awk '{print $1}')
res_ext_x=$(echo $res_external | sed 's/x.*//')
res_ext_y=$(echo $res_external | sed 's/.*x//')
res_int_x=$(echo $res_internal | sed 's/x.*//')
res_int_y=$(echo $res_internal | sed 's/.*x//')
scale_x=$(echo "$res_ext_x / $res_int_x" | bc -l)
scale_y=$(echo "$res_ext_y / $res_int_y" | bc -l)
xrandr --output "$external" --auto --scale 1.0x1.0 \
--output "$internal" --auto --same-as "$external" \
--scale "$scale_x"x"$scale_y"
else
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
fi
}
morescreen() { # If multi-monitor is selected and there are more than two screens.
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:")
xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto
}
multimon() { # Multi-monitor handler.
case "$(echo "$screens" | wc -l)" in
1) xrandr $(echo "$allposs" | grep -v "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
2) twoscreen ;;
,*) morescreen ;;
esac ;}
# Get all possible displays
allposs=$(xrandr -q | grep "connected")
# Get all connected screens.
screens=$(echo "$allposs" | grep " connected" | awk '{print $1}')
# Get user choice including multi-monitor and manual selection:
chosen=$(printf "%s\\ncancel\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p "Select display arangement:") &&
case "$chosen" in
"cancel") exit ;;
"manual selection") arandr ; exit ;;
"multi-monitor") multimon ;;
,*) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;;
esac
# setbg # Fix background if screen size/arangement has changed.
$HOME/.config/polybar/scripts/launch.sh # restart polybar
pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen
#+end_src
* getbib
:PROPERTIES:
:header-args: :tangle ~/bin/getbib
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
[ -z "$1" ] && echo "Give either a pdf file or a DOI as an argument." && exit
if [ -f "$1" ]; then
# Try to get DOI from pdfinfo or pdftotext output.
doi=$(pdfinfo "$1" | grep -io "doi:.*") ||
doi=$(pdftotext "$1" 2>/dev/null - | grep -io "doi:.*" -m 1) ||
exit 1
else
doi="$1"
fi
# Check crossref.org for the bib citation.
curl -s "http://api.crossref.org/works/$doi/transform/application/x-bibtex" -w "\\n"
#+end_src
* vpnToggle
:PROPERTIES:
:header-args: :tangle ~/bin/vpntoggle
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
if [[ $(nordvpn status) == *"Connected"* ]]; then
nordvpn disconnect && dunstify --replace=23198 "VPN" "Disconnected";
else
country=`nordvpn countries | sed 's/\s*\t\s*/ /g ; s/\s/\n/g ; s/_/ /g ; /^[a-zA-Z]/!d ; s/\(.*\)/\L\1/' | rofi -i -dmenu | sed 's/\s/_/g'`
nordvpn connect $country && dunstify --replace=23198 "VPN" "Connected to $country";
fi
#+end_src
* bukurun
:PROPERTIES:
:header-args: :tangle ~/bin/bukurun
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
_rofi () {
rofi -dmenu -i -no-levenshtein-sort -width 1000 "$@"
}
# display settings
display_type=1
max_str_width=80
# keybindings
switch_view="Alt+Tab"
new_bookmark="Alt+n"
actions="Alt+a"
edit="Alt+e"
delete="Alt+d"
# colors
help_color="#334433"
# source global config
if [[ -f /etc/buku_run.config ]]
then
source /etc/buku_run.config
fi
# source local config:
if [[ -z $XDG_CONFIG_DIR ]]
then
if [[ -f $HOME/.config/buku_run/config ]]
then
source $HOME/.config/buku_run/config
else
echo "User config file \'~/.config/buku_run/config\' not found. using global config"
fi
else
if [[ -f "${XDG_CONFIG_DIR}/buku_run/config" ]]
then
source "${XDG_CONFIG_DIR}/buku_run/config"
else
echo "User config file \'~/.config/buku_run/config\' not found. using global config"
fi
fi
main () {
HELP="Welcome to Buku. Use <span color='${help_color}'>${new_bookmark}</span> to add a new Bookmark
Use <span color='${help_color}'>${switch_view}</span> to switch View. <span color='${help_color}'>${actions}</span> for actions"
if [[ $mode == "bookmarks" ]]; then
content=$(parseBuku)
menu=$(echo "${content}" | _rofi -p '> ' -filter "${filter}" -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
elif [[ $mode == "tags" ]]; then
menu=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "${HELP}" -kb-custom-1 "${new_bookmark}" -kb-custom-2 "${switch_view}" -kb-custom-3 "${actions}" -kb-custom-4 "${edit}" -kb-custom-5 "${delete}")
fi
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 12 ]]; then
optionsMenu
elif [[ $val -eq 10 ]]; then
addMark
elif [[ $val -eq 14 ]]; then
deleteMenu
elif [[ $val -eq 13 ]]; then
editMenu
elif [[ $val -eq 11 ]]; then
if [[ $mode == "bookmarks" ]]; then
export mode="tags"
mode=tags main
elif [[ $mode == "tags" ]]; then
export mode="bookmarks"
mode=bookmarks main
fi
elif [[ $val -eq 0 ]]; then
if [[ $mode == "bookmarks" ]]; then
id=$(getId "$content" "$menu")
for bm in ${id}; do
buku -o "${bm}"
done
elif [[ $mode == "tags" ]]; then
filter="${menu}" mode="bookmarks" main
fi
fi
}
optionsMenu () {
if [[ $mode == "bookmarks" ]]; then
askmenu=$(echo -e "< Return\n---\n1. Edit\n2. Delete" | _rofi -p '> ' -mesg "Choose Action for bookmark")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
if [[ $askmenu == "< Return" ]]; then
export mode=bookmarks
main
elif [[ $askmenu == "1. Edit" ]]; then
editMenu
elif [[ $askmenu == "2. Delete" ]]; then
deleteMenu
fi
fi
elif [[ $mode == "tags" ]]; then
askmenu=$(echo -e "< Return\n---\n1. Replace Tag\n2. Delete Tag" | _rofi -p '> ' -mesg "Choose Action for tag \"${menu}\"")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
if [[ $askmenu == "< Return" ]]; then
export mode=tags
main
elif [[ $askmenu == "1. Replace Tag" ]]; then
newtag=$(echo | _rofi -p '> ' -mesg "Enter new tag name for tag \"${menu}\"")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
if [[ $newtag == "" ]]; then
mode=tags main
else
buku -r "${menu}" "${newtag}"
mode=tags main
fi
fi
elif [[ $askmenu == "2. Delete Tag" ]]; then
delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete tag?")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
if [[ $delask == "1. Yes" ]]; then
buku -r "${menu}"
mode=tags main
elif [[ $delask == "2. No" ]]; then
mode=tags main
fi
fi
fi
fi
fi
}
deleteMenu () {
id=$(getId "$content" "$menu")
delask=$(echo -e "1. Yes\n2. No" | _rofi -p '> ' -mesg "Really delete bookmark?")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
if [[ $delask == "1. Yes" ]]; then
buku -d ${id} --tacit
mode=bookmarks main
elif [[ $delask == "2. No" ]]; then
optionsMenu
fi
fi
}
editMenu () {
id=$(getId "$content" "$menu")
title="$(getTitleFromId $id)"
bookmark="$(getUrlFromId $id)"
tags="$(getTagsFromId $id)"
content=$(echo -e "1. title: $title\n2. url: $bookmark\n3. tags: $tags")
editmenu=$(echo -e "< Return\n---\n${content}" | _rofi -p '> ')
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
if [[ $editmenu == "< Return" ]]; then
main
elif [[ $editmenu == "tags: NOTAG" ]]; then
addTags --update
elif [[ $editmenu =~ tags:* ]]; then
tags="${tags}" editTags
elif [[ $editmenu =~ url:* ]]; then
editBookmark
elif [[ $editmenu =~ title:* ]]; then
editTitle
fi
fi
}
editTags () {
edittagsmenu=$(echo | _rofi -filter "${tags}" -p '> ' -mesg "Edit Tags and hit Enter")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
buku -u ${id} --tag "${edittagsmenu}"
fi
mode=bookmarks main
}
editBookmark () {
bmarkmenu=$(echo "" | _rofi -p "> " -filter "${bookmark}" -mesg "Edit Bookmark and hit Enter")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
if [[ $bmarkmenu == "http"* ]]; then
buku -u "${id}" --url "${bmarkmenu}"
else
echo "" | rofi -e "Not a valid URI, Make sure URLs start with http"
editBookmark
fi
fi
mode=bookmarks main
}
editTitle () {
titlemenu=$(echo "" | _rofi -p "> " -filter "${title}" -mesg "Edit Title and hit Enter")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
buku -u "${id}" --title "${titlemenu}"
fi
mode=bookmarks main
}
addMark () {
inserturl=$(echo -e "$(xclip -o)" | _rofi -p '> ' -mesg "Use URL below or type manually")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
addTags
fi
}
addTags () {
inserttags=$(buku --np --st | awk '{$NF=""; print $0}' | cut -d ' ' -f2- | _rofi -p '> ' -mesg "Add some tags. Separate tags with ', '")
val=$?
if [[ $val -eq 1 ]]; then
exit
elif [[ $val -eq 0 ]]; then
if [[ $(echo "${inserttags}" | wc -l) -gt 1 ]]; then
taglist=$(echo "${inserttags}" | tr '\n' ',')
tags=()
for tag in $taglist; do
tags+=("$tag")
done
else
tags=${inserttags}
fi
if [[ $1 == "--update" ]]; then
buku -u "${id}" --tag ${tags}
else
buku -a ${inserturl} ${tags}
fi
fi
}
parseBuku () {
echo "$(buku --nc -p | gawk -v max="$max_str_width" -v type="$display_type" '
BEGIN {
RS=""
FS="\n"
}
{
if ($3 == "")
$3 = " # NOTAG"
id = gensub(/([0-9]+)\.(.*)/, "\\1", "g", $1)
url = substr(gensub(/\s+> (.*)/, "\\1", "g", $2),0,max)
tags = gensub(/\s+# (.*)/, "\\1", "g", $3)
title = substr(gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1),0,max)
if (type == 1)
print id "\t" url "\t" tags
else
print id "\t" title "\t" tags
if (type == 3)
print " \t" url "\t "
print ""
}
' | column -t -s $'\t')"
}
getId () {
id=$(echo "${2%% *}")
if [ -z "$id" ]; then
prev=""
IFS=$'\n'
for line in $1; do
if [ "$2" = "$line" ]; then
id=$(echo "${prev%% *}")
break
else
prev="$line"
fi
done
fi
echo $id
}
getTitleFromId () {
echo "$(buku --nc -p $1 | gawk '
BEGIN {
RS=""
FS="\n"
}
{
print gensub(/[0-9]+\.\s*(.*)/, "\\1", "g", $1)
}
')"
}
getUrlFromId () {
echo "$(buku --nc -p $1 | gawk '
BEGIN {
RS=""
FS="\n"
}
{
print gensub(/\s+> (.*)/, "\\1", "g", $2)
}
')"
}
getTagsFromId () {
echo "$(buku --nc -p $1 | gawk '
BEGIN {
RS=""
FS="\n"
}
{
print gensub(/\s+# (.*)/, "\\1", "g", $3)
}
')"
}
mode=bookmarks main
#+end_src
* i3exit
:PROPERTIES:
:header-args: :tangle ~/bin/i3exit
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
# with openrc use loginctl
[[ $(cat /proc/1/comm) == "systemd" ]] && logind=systemctl || logind=loginctl
case "$1" in
lock)
~/scripts/lockscreen.sh
;;
logout)
i3-msg exit
;;
switch_user)
dm-tool switch-to-greeter
;;
suspend)
~/scripts/lockscreen.sh && $logind suspend
;;
hibernate)
~/scripts/lockscreen.sh && $logind hibernate
;;
reboot)
$logind reboot
;;
shutdown)
$logind poweroff
;;
,*)
echo "== ! i3exit: missing or invalid argument ! =="
echo "Try again with: lock | logout | switch_user | suspend | hibernate | reboot | shutdown"
exit 2
esac
exit 0
#+end_src
* readbib
:PROPERTIES:
:header-args: :tangle ~/bin/readbib
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
cd ~/MEGA/These/Ressources/pdfs/ && ls | dmenu -l 20 | xargs -I {} zathura {}
#+end_src
* askpass
:PROPERTIES:
:header-args: :tangle ~/bin/askpass-rofi
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
Take password prompt from STDIN, print password to STDOUT.
The sed piece just removes the colon from the provided prompt: =rofi -p= already gives us a colon
#+BEGIN_SRC bash
rofi -dmenu \
-password \
-no-fixed-num-lines \
-p "$(printf "$1" | sed s/://)"
#+END_SRC

View File

@ -50,4 +50,9 @@
[default] [default]
highlight_event_days = True highlight_event_days = True
[keybindings]
delete = d
today = .
new = c
#+END_SRC #+END_SRC

View File

@ -80,31 +80,74 @@
** URxvt ** URxvt
#+BEGIN_SRC conf #+BEGIN_SRC conf
URxvt*termName: screen-256color ! -----------------------------------------------------------------------------
URxvt*geometry: 240x84 ! File: gruvbox-dark.xresources
URxvt*loginShell: true ! Description: Retro groove colorscheme generalized
URxvt*scrollstyle: plain ! Author: morhetz <morhetz@gmail.com>
URxvt*scrollTtyKeypress: true ! Source: https://github.com/morhetz/gruvbox-generalized
URxvt*scrollTtyOutput: false ! Last Modified: 6 Sep 2014
URxvt*scrollWithBuffer: false ! -----------------------------------------------------------------------------
URxvt*secondaryScreen: true
URxvt*secondaryScroll: true ! hard contrast: *background: #1d2021
URxvt*skipScroll: true *background: #282828
URxvt*scrollBar: false ! soft contrast: *background: #32302f
URxvt*scrollBar_right: false *foreground: #ebdbb2
URxvt*scrollBar_floating: false ! Black + DarkGrey
URxvt*utmpInhibit: false *color0: #282828
URxvt*urgentOnBell: false *color8: #928374
URxvt*visualBell: true ! DarkRed + Red
URxvt*mapAlert: true *color1: #cc241d
URxvt*mouseWheelScrollPage: true *color9: #fb4934
URxvt*font: xft:Hack Nerd Font Mono:size=10 ! DarkGreen + Green
URxvt*boldFont: xft:Hack Nerd Font Mono:bold:size=10 *color2: #98971a
URxvt.perl-ext-common: selection-to-clipboard *color10: #b8bb26
URxvt.keysym.C-S-c: perl:clipboard:copy ! DarkYellow + Yellow
URxvt.keysym.C-S-v: perl:clipboard:paste *color3: #d79921
*color11: #fabd2f
! DarkBlue + Blue
*color4: #458588
*color12: #83a598
! DarkMagenta + Magenta
*color5: #b16286
*color13: #d3869b
! DarkCyan + Cyan
*color6: #689d6a
*color14: #8ec07c
! LightGrey + White
*color7: #a89984
*color15: #ebdbb2
#+END_SRC #+END_SRC
* Font
:PROPERTIES:
:header-args: :tangle ~/.config/fontconfig/fonts.conf
:header-args+: :comments none :mkdirp yes
:END:
#+begin_src conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>serif</family>
<prefer><family>Linux Libertine</family></prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer><family>Linux Biolinum</family></prefer>
</alias>
<alias>
<family>sans</family>
<prefer><family>Linux Biolinum</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>SauceCodePro Nerd Font Mono</family></prefer>
</alias>
</fontconfig>
#+end_src
* Redshift * Redshift
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/redshift.conf :header-args: :tangle ~/.config/redshift.conf
@ -252,107 +295,261 @@
set completion-ignore-case on set completion-ignore-case on
#+END_SRC #+END_SRC
* Mailcap * Xmodmap
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.mailcap :header-args: :tangle ~/.Xmodmap
:header-args+: :comments both :mkdirp yes :header-args+: :comments no :mkdirp yes
:END: :END:
#+BEGIN_SRC conf
text/plain; nvim %s
audio/*; /usr/bin/xdg-open %s ; copiousoutput
video/*; setsid mpv --quiet %s &; copiousoutput
image/*; ~/scripts/openfile.sh %s;
application/pdf; ~/scripts/openfile.sh %s;
text/html; qutebrowser %s; -n "$DISPLAY"; nametemplate=%s.html;
text/html; w3m -I %{charset} -T text/html; copiousoutput;
text/calendar; khal import --batch -a home %s && khal printics %s; copiousoutput;
application/ics; khal import --batch -a home %s && khal printics %s; copiousoutput;
#+END_SRC
** Libreoffice
#+begin_src conf #+begin_src conf
application/docx; libreoffice %s --nologo &; copiousoutput; keycode 8 =
application/doc; libreoffice --nologo %s &; copiousoutput; keycode 9 = Escape NoSymbol Escape
keycode 10 = 1 exclam 1 exclam
application/vnd.oasis.opendocument.database; libreoffice --nologo --base '%s'; copiousoutput keycode 11 = 2 at 2 at
application/vnd.oasis.opendocument.chart; libreoffice --nologo --calc '%s'; copiousoutput keycode 12 = 3 numbersign 3 numbersign
application/vnd.oasis.opendocument.spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput keycode 13 = 4 dollar 4 dollar
application/vnd.oasis.opendocument.spreadsheet-template; libreoffice --nologo --calc '%s'; copiousoutput keycode 14 = 5 percent 5 percent
application/vnd.oasis.opendocument.graphics; libreoffice --nologo --draw '%s'; copiousoutput keycode 15 = 6 asciicircum 6 asciicircum
application/vnd.oasis.opendocument.graphics-template; libreoffice --nologo --draw '%s'; copiousoutput keycode 16 = 7 ampersand 7 ampersand
application/vnd.oasis.opendocument.presentation; libreoffice --nologo --impress '%s'; copiousoutput keycode 17 = 8 asterisk 8 asterisk
application/vnd.oasis.opendocument.presentation-template; libreoffice --nologo --impress '%s'; copiousoutput keycode 18 = 9 parenleft 9 parenleft
application/vnd.oasis.opendocument.formula; libreoffice --nologo --math '%s'; copiousoutput keycode 19 = 0 parenright 0 parenright
application/vnd.oasis.opendocument.text; libreoffice --nologo --writer '%s'; copiousoutput keycode 20 = minus underscore minus underscore
application/vnd.oasis.opendocument.text-master; libreoffice --nologo -global '%s'; copiousoutput keycode 21 = equal plus equal plus
application/vnd.oasis.opendocument.text-template; libreoffice --nologo --writer '%s'; copiousoutput keycode 22 = BackSpace BackSpace BackSpace BackSpace
application/vnd.oasis.opendocument.text-web; libreoffice --nologo -web '%s'; copiousoutput keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
application/vnd.sun.xml.base; libreoffice --nologo --writer '%s'; copiousoutput keycode 24 = q Q q Q
application/vnd.sun.xml.calc; libreoffice --nologo --calc '%s'; copiousoutput keycode 25 = w W w W
application/vnd.sun.xml.calc.template; libreoffice --nologo --calc '%s'; copiousoutput keycode 26 = e E e E
application/vnd.sun.xml.draw; libreoffice --nologo --draw '%s'; copiousoutput keycode 27 = r R r R
application/vnd.sun.xml.draw.template; libreoffice --nologo --draw '%s'; copiousoutput keycode 28 = t T t T
application/vnd.stardivision.calc; libreoffice --nologo --calc '%s'; copiousoutput keycode 29 = y Y y Y
application/vnd.stardivision.chart; libreoffice --nologo --calc '%s'; copiousoutput keycode 30 = u U u U
application/vnd.stardivision.draw; libreoffice --nologo --draw '%s'; copiousoutput keycode 31 = i I i I
application/vnd.stardivision.impress; libreoffice --nologo --impress '%s'; copiousoutput keycode 32 = o O o O
application/vnd.stardivision.math; libreoffice --nologo --math '%s'; copiousoutput keycode 33 = p P p P
application/vnd.stardivision.writer-global; libreoffice --nologo --writer '%s'; copiousoutput keycode 34 = bracketleft braceleft bracketleft braceleft
application/vnd.stardivision.writer; libreoffice --nologo --writer '%s'; copiousoutput keycode 35 = bracketright braceright bracketright braceright
application/vnd.sun.xml.impress; libreoffice --nologo --impress '%s'; copiousoutput keycode 36 = Return NoSymbol Return
application/vnd.sun.xml.impress.template; libreoffice --nologo --impress '%s'; copiousoutput keycode 37 = Control_L NoSymbol Control_L
application/vnd.sun.xml.math; libreoffice --nologo --math '%s'; copiousoutput keycode 38 = a A a A
application/vnd.sun.xml.writer; libreoffice --nologo --writer '%s'; copiousoutput keycode 39 = s S s S
application/vnd.sun.xml.writer.global; libreoffice --nologo -global '%s'; copiousoutput keycode 40 = d D d D
application/vnd.sun.xml.writer.template; libreoffice --nologo --writer '%s'; copiousoutput keycode 41 = f F f F
text/csv; libreoffice --nologo --calc '%s'; copiousoutput keycode 42 = g G g G
text/spreadsheet; libreoffice --nologo --calc '%s'; copiousoutput keycode 43 = h H h H
application/x-quattropro; libreoffice --nologo --calc '%s'; copiousoutput keycode 44 = j J j J
application/x-dbf; libreoffice --nologo --calc '%s'; copiousoutput keycode 45 = k K k K
application/vnd.ms-excel.sheet.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput keycode 46 = l L l L
application/vnd.ms-excel.template.macroEnabled.12; libreoffice --nologo --calc '%s'; copiousoutput keycode 47 = semicolon colon semicolon colon
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice --nologo --calc '%s'; copiousoutput keycode 48 = apostrophe quotedbl apostrophe quotedbl
application/vnd.openxmlformats-officedocument.spreadsheetml.template; libreoffice --nologo --calc '%s'; copiousoutput keycode 49 = grave asciitilde grave asciitilde
application/vnd.lotus-1-2-3; libreoffice --nologo --calc '%s'; copiousoutput keycode 50 = Shift_L NoSymbol Shift_L
application/vnd.ms-excel; libreoffice --nologo --calc '%s'; copiousoutput keycode 51 = backslash bar backslash bar
application/msexcel; libreoffice --nologo --calc '%s'; copiousoutput keycode 52 = z Z z Z
application/x-dbase; libreoffice --nologo --calc '%s'; copiousoutput keycode 53 = x X x X
text/x-csv; libreoffice --nologo --calc '%s'; copiousoutput keycode 54 = c C c C
application/vnd.ms-powerpoint.presentation.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput keycode 55 = v V v V
application/vnd.ms-powerpoint.slideshow.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput keycode 56 = b B b B
application/vnd.ms-powerpoint.template.macroEnabled.12; libreoffice --nologo --impress '%s'; copiousoutput keycode 57 = n N n N
application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice --nologo --impress '%s'; copiousoutput keycode 58 = m M m M
application/vnd.openxmlformats-officedocument.presentationml.slideshow; libreoffice --nologo --impress '%s'; copiousoutput keycode 59 = comma less comma less
application/vnd.openxmlformats-officedocument.presentationml.template; libreoffice --nologo --impress '%s'; copiousoutput keycode 60 = period greater period greater
application/vnd.ms-powerpoint; libreoffice --nologo --impress '%s'; copiousoutput keycode 61 = slash question slash question
application/mspowerpoint; libreoffice --nologo --impress '%s'; copiousoutput keycode 62 = Shift_R NoSymbol Shift_R
text/mathml; libreoffice --nologo --math '%s'; copiousoutput keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab
application/rtf; libreoffice --nologo --writer '%s'; copiousoutput keycode 64 = Alt_L Meta_L Alt_L Meta_L
application/x-t602; libreoffice --nologo --writer '%s'; copiousoutput keycode 65 = space NoSymbol space
application/vnd.wordperfect; libreoffice --nologo --writer '%s'; copiousoutput keycode 66 = Caps_Lock NoSymbol Caps_Lock
application/vnd.ms-word.document.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1
application/vnd.ms-word.template.macroEnabled.12; libreoffice --nologo --writer '%s'; copiousoutput keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2
application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice --nologo --writer '%s'; copiousoutput keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3
application/vnd.openxmlformats-officedocument.wordprocessingml.template; libreoffice --nologo --writer '%s'; copiousoutput keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4
application/vnd.ms-works; libreoffice --nologo --writer '%s'; copiousoutput keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5
application/msword; libreoffice --nologo --writer '%s'; copiousoutput keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6
application/wordperfect; libreoffice --nologo --writer '%s'; copiousoutput keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7
text/rtf; libreoffice --nologo --writer '%s'; copiousoutput keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8
keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9
keycode 76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10
keycode 77 = Num_Lock NoSymbol Num_Lock
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock
keycode 79 = KP_Home KP_7 KP_Home KP_7
keycode 80 = KP_Up KP_8 KP_Up KP_8
keycode 81 = KP_Prior KP_9 KP_Prior KP_9
keycode 82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode
keycode 83 = KP_Left KP_4 KP_Left KP_4
keycode 84 = KP_Begin KP_5 KP_Begin KP_5
keycode 85 = KP_Right KP_6 KP_Right KP_6
keycode 86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode
keycode 87 = KP_End KP_1 KP_End KP_1
keycode 88 = KP_Down KP_2 KP_Down KP_2
keycode 89 = KP_Next KP_3 KP_Next KP_3
keycode 90 = KP_Insert KP_0 KP_Insert KP_0
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
keycode 93 =
keycode 94 = less greater less greater bar brokenbar bar
keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11
keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12
keycode 97 =
keycode 98 = Katakana NoSymbol Katakana
keycode 99 = Hiragana NoSymbol Hiragana
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana
keycode 102 = Muhenkan NoSymbol Muhenkan
keycode 103 =
keycode 104 = KP_Enter NoSymbol KP_Enter
keycode 105 = Control_R NoSymbol Control_R
keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab
keycode 107 = Print Sys_Req Print Sys_Req
keycode 108 = Alt_R Meta_R Alt_R Meta_R
keycode 109 = Linefeed NoSymbol Linefeed
keycode 110 = Home NoSymbol Home
keycode 111 = Up NoSymbol Up
keycode 112 = Prior NoSymbol Prior
keycode 113 = Left NoSymbol Left
keycode 114 = Right NoSymbol Right
keycode 115 = End NoSymbol End
keycode 116 = Down NoSymbol Down
keycode 117 = Next NoSymbol Next
keycode 118 = Insert NoSymbol Insert
keycode 119 = Delete NoSymbol Delete
keycode 120 =
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff
keycode 125 = KP_Equal NoSymbol KP_Equal
keycode 126 = plusminus NoSymbol plusminus
keycode 127 = Pause Break Pause Break
keycode 128 = XF86LaunchA NoSymbol XF86LaunchA
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
keycode 130 = Hangul NoSymbol Hangul
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja
keycode 132 =
keycode 133 =
keycode 134 = Super_R NoSymbol Super_R
keycode 135 = Menu NoSymbol Menu
keycode 136 = Cancel NoSymbol Cancel
keycode 137 = Redo NoSymbol Redo
keycode 138 = SunProps NoSymbol SunProps
keycode 139 = Undo NoSymbol Undo
keycode 140 = SunFront NoSymbol SunFront
keycode 141 = XF86Copy NoSymbol XF86Copy
keycode 142 = XF86Open NoSymbol XF86Open
keycode 143 = XF86Paste NoSymbol XF86Paste
keycode 144 = Find NoSymbol Find
keycode 145 = XF86Cut NoSymbol XF86Cut
keycode 146 = Help NoSymbol Help
keycode 147 = xf86menukb nosymbol xf86menukb
keycode 148 = XF86Calculator NoSymbol XF86Calculator
keycode 149 =
keycode 150 = XF86Sleep NoSymbol XF86Sleep
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp
keycode 152 = XF86Explorer NoSymbol XF86Explorer
keycode 153 = XF86Send NoSymbol XF86Send
keycode 154 =
keycode 155 = XF86Xfer NoSymbol XF86Xfer
keycode 156 = XF86Launch1 NoSymbol XF86Launch1
keycode 157 = XF86Launch2 NoSymbol XF86Launch2
keycode 158 = XF86WWW NoSymbol XF86WWW
keycode 159 = XF86DOS NoSymbol XF86DOS
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver
keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows
keycode 162 = XF86TaskPane NoSymbol XF86TaskPane
keycode 163 = XF86Mail NoSymbol XF86Mail
keycode 164 = XF86Favorites NoSymbol XF86Favorites
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer
keycode 166 = XF86Back NoSymbol XF86Back
keycode 167 = XF86Forward NoSymbol XF86Forward
keycode 168 =
keycode 169 = XF86Eject NoSymbol XF86Eject
keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind
keycode 177 = XF86Phone NoSymbol XF86Phone
keycode 178 =
keycode 179 = XF86Tools NoSymbol XF86Tools
keycode 180 = XF86HomePage NoSymbol XF86HomePage
keycode 181 = XF86Reload NoSymbol XF86Reload
keycode 182 = XF86Close NoSymbol XF86Close
keycode 183 =
keycode 184 =
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown
keycode 187 = parenleft NoSymbol parenleft
keycode 188 = parenright NoSymbol parenright
keycode 189 = XF86New NoSymbol XF86New
keycode 190 = Redo NoSymbol Redo
keycode 191 = XF86Tools NoSymbol XF86Tools
keycode 192 = XF86Launch5 NoSymbol XF86Launch5
keycode 193 = XF86Launch6 NoSymbol XF86Launch6
keycode 194 = XF86Launch7 NoSymbol XF86Launch7
keycode 195 = XF86Launch8 NoSymbol XF86Launch8
keycode 196 = XF86Launch9 NoSymbol XF86Launch9
keycode 197 =
keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute
keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle
keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn
keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff
keycode 202 =
keycode 203 = Mode_switch NoSymbol Mode_switch
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L
keycode 206 = NoSymbol Super_L NoSymbol Super_L
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause
keycode 210 = XF86Launch3 NoSymbol XF86Launch3
keycode 211 = XF86Launch4 NoSymbol XF86Launch4
keycode 212 = XF86LaunchB NoSymbol XF86LaunchB
keycode 213 = XF86Suspend NoSymbol XF86Suspend
keycode 214 = XF86Close NoSymbol XF86Close
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay
keycode 216 = XF86AudioForward NoSymbol XF86AudioForward
keycode 217 =
keycode 218 = Print NoSymbol Print
keycode 219 =
keycode 220 = XF86WebCam NoSymbol XF86WebCam
keycode 221 =
keycode 222 =
keycode 223 = XF86Mail NoSymbol XF86Mail
keycode 224 = XF86Messenger NoSymbol XF86Messenger
keycode 225 = XF86Search NoSymbol XF86Search
keycode 226 = XF86Go NoSymbol XF86Go
keycode 227 = XF86Finance NoSymbol XF86Finance
keycode 228 = XF86Game NoSymbol XF86Game
keycode 229 = XF86Shop NoSymbol XF86Shop
keycode 230 =
keycode 231 = Cancel NoSymbol Cancel
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia
keycode 235 = XF86Display NoSymbol XF86Display
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp
keycode 239 = XF86Send NoSymbol XF86Send
keycode 240 = XF86Reply NoSymbol XF86Reply
keycode 241 = XF86MailForward NoSymbol XF86MailForward
keycode 242 = XF86Save NoSymbol XF86Save
keycode 243 = XF86Documents NoSymbol XF86Documents
keycode 244 = XF86Battery NoSymbol XF86Battery
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth
keycode 246 = XF86WLAN NoSymbol XF86WLAN
keycode 247 =
keycode 248 = XF86Display NoSymbol XF86Display
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 = XF86WWAN NoSymbol XF86WWAN
keycode 255 = XF86RFKill NoSymbol XF86RFKill
#+end_src #+end_src
* urlview
:PROPERTIES:
:header-args: :tangle ~/.urlview
:header-args+: :comments both :mkdirp yes
:END:
#+BEGIN_SRC conf
REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
COMMAND nohup qutebrowser %s </dev/null &>/dev/null &
#+END_SRC
* TODO xinit * TODO xinit
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.xinitrc :header-args: :tangle ~/.xinitrc
@ -530,7 +727,7 @@ Keyboard Options
frame_width = 2 frame_width = 2
# Defines color of the frame around the notification window. # Defines color of the frame around the notification window.
frame_color = "#2f343f" frame_color = "#32302f"
# Define a color for the separator. # Define a color for the separator.
# possible values are: # possible values are:
@ -619,6 +816,7 @@ Keyboard Options
show_indicators = yes show_indicators = yes
#+end_src #+end_src
*** Icons *** Icons
#+begin_src conf #+begin_src conf
# Align icons left/right/off # Align icons left/right/off
@ -630,6 +828,7 @@ Keyboard Options
# Paths to default icons. # Paths to default icons.
icon_path = /usr/share/icons/Arc/16x16/status/:/usr/share/icons/Arc/16x16/devices/ icon_path = /usr/share/icons/Arc/16x16/status/:/usr/share/icons/Arc/16x16/devices/
#+end_src #+end_src
*** History *** History
#+begin_src conf #+begin_src conf
# Should a notification popped up from history be sticky or timeout # Should a notification popped up from history be sticky or timeout
@ -639,6 +838,7 @@ Keyboard Options
# Maximum amount of notifications kept in history # Maximum amount of notifications kept in history
history_length = 20 history_length = 20
#+end_src #+end_src
*** Misc/Advanced *** Misc/Advanced
#+BEGIN_SRC conf #+BEGIN_SRC conf
# dmenu path. # dmenu path.
@ -673,7 +873,7 @@ Keyboard Options
close = mod1+space close = mod1+space
# Close all notifications. # Close all notifications.
close_all = mod1+shift+space # close_all = mod1+shift+space
# Redisplay last message(s). # Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left # On the US keyboard layout "grave" is normally above TAB and left
@ -688,22 +888,20 @@ Keyboard Options
** Urgency ** Urgency
#+BEGIN_SRC conf #+BEGIN_SRC conf
[urgency_low] [urgency_low]
background = "#2f343f" background = "#32302f"
foreground = "#f5f8f6" foreground = "#ebdbb2"
timeout = 2
[urgency_normal]
background = "#2f343f"
foreground = "#f5f8f6"
timeout = 4 timeout = 4
[urgency_normal]
background = "#32302f"
foreground = "#ebdbb2"
timeout = 6
[urgency_critical] [urgency_critical]
background = "#2f343f" background = "#32302f"
foreground = "#f5f8f6" foreground = "#cc241d"
frame_color = "#e3788f"
timeout = 0 timeout = 0
#+END_SRC #+END_SRC
* feh * feh
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/feh/config :header-args: :tangle ~/.config/feh/config
@ -723,6 +921,30 @@ Keyboard Options
save_filelist F save_filelist F
#+END_SRC #+END_SRC
* SXIV
:PROPERTIES:
:header-args: :tangle ~/.config/sxiv/exec/key-handler
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
Press =C-x= to activate to key handler.
#+begin_src conf
while read file
do
case "$1" in
"C-d")
mv "$file" ~/.trash ;;
"C-r")
convert -rotate 90 "$file" "$file" ;;
"C-c")
echo -n "$file" | xclip -selection clipboard ;;
"C-w")
nitrogen --save --set-zoom-fill "$file" ;;
esac
done
#+end_src
* MPV * MPV
** Configuration ** Configuration
:PROPERTIES: :PROPERTIES:
@ -1034,7 +1256,6 @@ stop-screensaver = "yes"
#ESC {encode} quit 4 #ESC {encode} quit 4
# ============================================================= # =============================================================
#+END_SRC #+END_SRC
* Zathura * Zathura
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/zathura/zathurarc :header-args: :tangle ~/.config/zathura/zathurarc
@ -1250,9 +1471,13 @@ stop-screensaver = "yes"
#+BEGIN_SRC conf #+BEGIN_SRC conf
[Default Applications] [Default Applications]
image/jpeg=feh.desktop
image/png=feh.desktop;
text/plain=nvim.desktop 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 x-scheme-handler/mailto=neomutt.desktop
message/rfc822=neomutt.desktop message/rfc822=neomutt.desktop
application/x-bittorrent=deluge.desktop application/x-bittorrent=deluge.desktop
@ -1270,8 +1495,8 @@ stop-screensaver = "yes"
application/x-extension-xht=qutebrowser.desktop application/x-extension-xht=qutebrowser.desktop
[Added Associations] [Added Associations]
image/jpeg=viewnior.desktop;gpicview.desktop; image/jpeg=viewnior.desktop;gpicview.desktop;feh.desktop;
image/png=viewnior.desktop;gpicview.desktop; image/png=viewnior.desktop;gpicview.desktop;feh.desktop;
text/plain=mousepad.desktop; text/plain=mousepad.desktop;
application/x-bittorrent=deluge.desktop; application/x-bittorrent=deluge.desktop;
#+END_SRC #+END_SRC
@ -1353,7 +1578,7 @@ Colors
scrot_dir=$HOME/Pictures scrot_dir=$HOME/Pictures
#+END_SRC #+END_SRC
* TODO Nitrogen * TODO [#B] Nitrogen
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/nitrogen/nitrogen.cfg :header-args: :tangle ~/.config/nitrogen/nitrogen.cfg
:header-args+: :comments both :mkdirp yes :header-args+: :comments both :mkdirp yes
@ -1464,18 +1689,13 @@ Colors
png-compression=9 png-compression=9
desktop=9 desktop=9
#+END_SRC #+END_SRC
* Castnow
* TODO [#A] Binaries
* TODO [#A] Scripts
** Wallpapers
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/scripts/wallpapers.sh :header-args: :tangle ~/.castnowrc
:header-args+: :comments both :mkdirp yes :header-args+: :comments none :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END: :END:
#+begin_src bash
while true; do #+begin_src conf
nitrogen --set-zoom-fill --random ".wallpapers" --address=192.168.1.51
sleep 10m --volume-step=0.01
done
#+end_src #+end_src

View File

@ -1,7 +1,33 @@
#+TITLE: I3 Configuration #+TITLE: I3 Configuration
:DRAWER:
#+PROPERTY: header-args:conf+ :comments both #+PROPERTY: header-args:conf+ :comments both
#+PROPERTY: header-args:conf+ :mkdirp yes #+PROPERTY: header-args:conf+ :mkdirp yes
#+PROPERTY: header-args:conf+ :tangle ~/.config/i3/config #+PROPERTY: header-args:conf+ :tangle ~/.config/i3/config
:END:
* Colors
#+begin_src conf
set $bg #32302f
set $bg1 #3c3836
set $bg2 #504945
set $bg3 #665c54
set $bg4 #7c6f64
set $fg #ebdbb2
set $fg1 #ebdbb2
set $fg2 #d5c4a1
set $fg3 #bdae93
set $fg4 #a89984
set $gray #a89984
set $red #cc241d
set $green #98971a
set $yellow #d79921
set $blue #458588
set $purple #b16286
set $aqua #689d6a
set $orange #d65d0e
#+end_src
* Mod Key * Mod Key
Set mod key (Mod1=<Alt>, Mod4=<Super>) Set mod key (Mod1=<Alt>, Mod4=<Super>)
@ -12,10 +38,11 @@ Set mod key (Mod1=<Alt>, Mod4=<Super>)
* Border Style * Border Style
#+begin_src conf #+begin_src conf
# Configure border style <normal|1pixel|pixel xx|none|pixel> # Configure border style <normal|1pixel|pixel xx|none|pixel>
new_window pixel 2 new_window pixel 1
new_float normal new_float normal
# Hide borders # Hide borders
hide_edge_borders none hide_edge_borders smart
#+end_src #+end_src
* Font for window titles * Font for window titles
@ -23,28 +50,38 @@ Set mod key (Mod1=<Alt>, Mod4=<Super>)
font Hack Nerd Font 11 font Hack Nerd Font 11
#+end_src #+end_src
* TODO [#C] Multimedia keys * Multimedia keys
** Sound
#+begin_src conf #+begin_src conf
# Sound # Sound
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse sset Master toggle bindsym XF86AudioMute exec --no-startup-id amixer -D pulse sset Master toggle
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%-
#+end_src
#+begin_src conf
# Backlight # Backlight
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 # bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 # bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
#+end_src
# Tracks ** Change Tracks
#+begin_src conf
bindsym XF86AudioPlay exec --no-startup-id mpc toggle bindsym XF86AudioPlay exec --no-startup-id mpc toggle
bindsym XF86AudioNext exec --no-startup-id mpc next bindsym XF86AudioNext exec --no-startup-id mpc next
bindsym XF86AudioPrev exec --no-startup-id mpc prev bindsym XF86AudioPrev exec --no-startup-id mpc prev
#+end_src
# Screenshots ** Print Screen
bindsym $mod+XF86LaunchA --release exec --no-startup-id i3-scrot -w #+begin_src conf
bindsym $mod+Shift+XF86LaunchA --release exec --no-startup-id i3-scrot -s bindsym Print exec --no-startup-id ~/scripts/screenshot.sh
bindsym XF86Display exec --no-startup-id rofi -show window
#+end_src
# Other ** Other
bindsym XF86LaunchB fullscreen toggle #+begin_src conf
bindsym XF86Search exec --no-startup-id rofi -show run
bindsym XF86PowerOff exec --no-startup-id $HOME/scripts/quit.sh
#+end_src #+end_src
* Start Applications * Start Applications
@ -54,115 +91,192 @@ Set mod key (Mod1=<Alt>, Mod4=<Super>)
# Windows Switch # Windows Switch
bindsym $mod+w exec --no-startup-id rofi -show window bindsym $mod+w exec --no-startup-id rofi -show window
# Launch categorized menu # Launch categorized menu
bindsym $mod+z exec --no-startup-id rofimenu bindsym $mod+z exec --no-startup-id rofi -show drun
# Bookmarks # Bookmarks
bindsym $mod+Shift+F exec --no-startup-id $HOME/bin/buku_run bindsym $mod+Shift+F exec --no-startup-id $HOME/bin/bukurun
# Passwords # Passwords
bindsym $mod+Shift+P exec --no-startup-id pass clip bindsym $mod+Shift+P exec --no-startup-id rofi-pass
# Start Terminal # Start Terminal
bindsym $mod+Return exec termite bindsym $mod+Return exec termite
# Tmux Terminal # Tmux Terminal
bindsym $mod+Shift+Return exec termite -e 'tmux' bindsym $mod+Shift+Return exec termite -e 'tmux'
# Configuration application
bindsym $mod+Ctrl+B exec termite -e 'bmenu'
# Start Command line Calendar # Start Command line Calendar
bindsym $mod+c exec termite -e "khal interactive" bindsym $mod+c exec termite -e "khal interactive"
# Start GUI Calendar (Google calendar)
# bindsym $mod+Shift+c exec qutebrowser https://calendar.google.com/
# File Manager # File Manager
bindsym $mod+o exec urxvt -e "ranger" bindsym $mod+o exec urxvt -e "ranger"
# GUI File Manager
# bindsym $mod+Shift+o exec pcmanfm
# Mail: Neomutt
bindsym $mod+m exec termite -e "tmuxinator start neomutt"
# Music Manager: NCMPCPP
# bindsym $mod+Shift+p exec termite -e "ncmpcpp"
# Browser # Browser
bindsym $mod+i exec qutebrowser bindsym $mod+i exec qutebrowser
# Sound Manager # Sound Manager
bindsym $mod+Ctrl+m exec pavucontrol bindsym $mod+trl+m exec pavucontrol
# Kill one application
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
# Kill and restart Notification Manager
bindsym $mod+Shift+n --release exec "killall dunst; exec notify-send 'restart dunst'"
# Keyboard Deadkey
# TODO - Better keybindings
bindsym $mod+Ctrl+d exec --no-startup-id setxkbmap -layout us -variant intl -option caps:escape
bindsym $mod+Shift+d exec --no-startup-id setxkbmap -layout us -option caps:escape
# Toggle poylbar
bindsym $mod+t exec --no-startup-id ~/.config/polybar/scripts/toggle.sh bottom
bindsym $mod+Shift+t exec --no-startup-id ~/.config/polybar/scripts/toggle.sh top
#+end_src #+end_src
* TODO Vim Anywhere * Set shut down, restart and locking features
#+begin_src conf
bindsym $mod+0 exec --no-startup-id $HOME/scripts/quit.sh
#+end_src
* Command Mode
#+begin_src conf
bindsym $mod+space mode "command"
mode "command" {
# Command line Calendar Client (khal)
bindsym c exec termite -e "khal interactive"; mode "default"
# GUI Calendar (Google Calendar)
bindsym Shift+c exec qutebrowser https://calendar.google.com/; mode "default"
# Ranger
bindsym r exec urxvt -e "ranger"; mode "default"
# pcmanfm: GUI file manager
bindsym Shift+r exec pcmanfm; mode "default"
# Mails with neomutt
bindsym m exec termite -e "tmux -L neomutt attach"; mode "default"
# Weechat
bindsym w exec termite -e "tmux -L weechat attach"; mode "default"
# News with newsboat
bindsym n exec termite -e "tmux -L newsboat attach"; mode "default"
# Music with ncmpcpp
bindsym p exec termite -e "tmux -L ncmpcpp attach"; mode "default"
# Print Screen
bindsym Shift+p exec --no-startup-id ~/scripts/screenshot.sh
# Browser with qutebrowser
bindsym i exec qutebrowser; mode "default"
# Browser with firefox
bindsym Shift+i exec firefox; mode "default"
# Emacs Client
bindsym e exec emacsclient -create-frame --alternate-editor=""; mode "default"
# Full Emacs - Usefull when installing packages
bindsym Shift+e exec emacs; mode "default"
# exit command mode: Enter or Escape
bindsym Escape mode "default"
}
#+end_src
* Autostart Background Applications
#+begin_src conf
# Set custom wallpaper script
exec --no-startup-id $HOME/scripts/wallpapers.sh
# Run Compton
exec --no-startup-id compton -b
# Start Network Management Framework
exec --no-startup-id nm-applet
# Hide mouse cursor after x seconds
exec --no-startup-id unclutter --timeout 5
# Start Power Manager
exec --no-startup-id xfce4-power-manager
# Bluetooth Manager
exec --no-startup-id blueman-applet
# Autolock screen after x minutes
exec --no-startup-id xautolock -locker "~/scripts/lockscreen.sh" -detectsleep -time 30 -notify 60 -notifier "dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'"
# Lockscreen when using suspend or hibernate (when closing the lid for instance)
exec --no-startup-id xss-lock -- ~/scripts/lockscreen.sh
# Autostart udiskie that is used to automount devices
exec --no-startup-id udiskie
# Screen options
exec --no-startup-id xrandr --output eDP1 --mode 1920x1080 --dpi 192
# Redshift
exec --no-startup-id redshift
# Start mopidy
exec --no-startup-id mopidy
# PulseAudio Server
# exec --no-startup-id pulseaudio --daemon
# Emacs Daemon
# exec --no-startup-id /usr/bin/emacs --fg-daemon
# TODO - Start polybar
exec_always --no-startup-id $HOME/.config/polybar/scripts/launch.sh
# Megasync
exec --no-startup-id i3-msg 'exec megasync'
#+end_src
* Kill one application
#+begin_src conf
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
#+end_src
* Change Keyboard Layout
#+begin_src conf
bindsym $mod+Ctrl+d exec --no-startup-id setxkbmap -layout us -variant intl -option caps:escape
bindsym $mod+Shift+d exec --no-startup-id setxkbmap -layout us -option caps:escape
#+end_src
* TODO [#B] Vim Anywhere
#+begin_src conf #+begin_src conf
# bindsym $mod+t exec vim-anywhere nvim termite # bindsym $mod+t exec vim-anywhere nvim termite
#+end_src #+end_src
* TODO Screenshot - Change to simplier keys * TODO Windows Manager
#+begin_src conf :tangle no ** Change focus
bindsym Print exec --no-startup-id i3-scrot #+begin_src conf
bindsym $mod+Print --release exec --no-startup-id i3-scrot -w bindsym $mod+h focus left
bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
#+end_src #+end_src
* Change focus ** Move focused window
#+begin_src conf #+begin_src conf
bindsym $mod+h focus left bindsym $mod+Shift+h move left
bindsym $mod+j focus down bindsym $mod+Shift+j move down
bindsym $mod+k focus up bindsym $mod+Shift+k move up
bindsym $mod+l focus right bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left
bindsym $mod+Left focus left bindsym $mod+Shift+Down move down
bindsym $mod+Down focus down bindsym $mod+Shift+Up move up
bindsym $mod+Up focus up bindsym $mod+Shift+Right move right
bindsym $mod+Right focus right
#+end_src #+end_src
* Move focused window ** TODO [#A] Split orientation - Use just one key bindings that alternates?
#+begin_src conf #+begin_src conf
bindsym $mod+Shift+h move left bindsym $mod+semicolon split h
bindsym $mod+Shift+j move down bindsym $mod+v split v
bindsym $mod+Shift+k move up bindsym $mod+q split toggle
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#+end_src
* Windows Manager
** TODO Split orientation - Use just one key bindings that alternates?
#+begin_src conf
bindsym $mod+semicolon split h
bindsym $mod+v split v
bindsym $mod+q split toggle
#+end_src #+end_src
** Kill focused window ** Kill focused window
#+begin_src conf #+begin_src conf
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
#+end_src #+end_src
** Use Mouse+$mod to drag floating windows ** Use Mouse+$mod to drag floating windows
#+begin_src conf #+begin_src conf
floating_modifier $mod floating_modifier $mod
#+end_src #+end_src
** Toggle fullscreen mode for the focused container ** Toggle fullscreen mode for the focused container
#+begin_src conf #+begin_src conf
bindsym $mod+f fullscreen toggle bindsym $mod+f fullscreen toggle
#+end_src #+end_src
** TODO Change container layout (stacked, tabbed, toggle split) ** TODO [#A] Change container layout (stacked, tabbed, toggle split)
#+begin_src conf #+begin_src conf
# bindsym $mod+s layout stacking # bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed # bindsym $mod+w layout tabbed
# bindsym $mod+e layout toggle split # bindsym $mod+e layout toggle split
#+end_src #+end_src
** TODO Toggle tiling / floating ** TODO Toggle tiling / floating
@ -180,12 +294,16 @@ bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+s sticky toggle bindsym $mod+Shift+s sticky toggle
#+end_src #+end_src
** TODO Focus the parent container ** Resize Floating Window
#+begin_src conf #+begin_src conf
# bindsym $mod+a focus parent bindsym $mod+Shift+y resize shrink width 10 px or 10 ppt
bindsym $mod+Shift+u resize grow height 10 px or 10 ppt
bindsym $mod+Shift+i resize shrink height 10 px or 10 ppt
bindsym $mod+Shift+o resize grow width 10 px or 10 ppt
#+end_src #+end_src
* Scratchpad * TODO [#B] Scratchpad
** Move to Scratchpad
#+begin_src conf #+begin_src conf
# move the currently focused window to the scratchpad # move the currently focused window to the scratchpad
bindsym $mod+Shift+BackSpace move scratchpad bindsym $mod+Shift+BackSpace move scratchpad
@ -195,38 +313,18 @@ bindsym $mod+f fullscreen toggle
bindsym $mod+BackSpace scratchpad show bindsym $mod+BackSpace scratchpad show
#+end_src #+end_src
* Custom Cratchpad for Quick Access ** TODO Custom Cratchpad for Quick Access
** Weechat *** Music with ncmpcpp
#+begin_src conf
# for_window [instance="scratch-weechat"] scratchpad show;
# exec termite --name="scratch-weechat" --exec="weechat"
# for_window [instance="scratch-weechat"] floating enable;
# for_window [instance="scratch-weechat"] move position 240 px 125 px;
# for_window [instance="scratch-weechat"] resize set 1200 px 800 px;
# for_window [instance="scratch-weechat"] move scratchpad;
#+end_src
** Music with ncmpcpp
#+begin_src conf #+begin_src conf
for_window [instance="scratch-ncmpcpp"] scratchpad show; for_window [instance="scratch-ncmpcpp"] scratchpad show;
exec termite --name="scratch-ncmpcpp" --exec="ncmpcpp" exec termite --name="scratch-ncmpcpp" --exec="tmux -L ncmpcpp attach"
for_window [instance="scratch-ncmpcpp"] floating enable; for_window [instance="scratch-ncmpcpp"] floating enable;
for_window [instance="scratch-ncmpcpp"] move position 440 px 225 px; for_window [instance="scratch-ncmpcpp"] move position 440 px 225 px;
for_window [instance="scratch-ncmpcpp"] resize set 800 px 600 px; for_window [instance="scratch-ncmpcpp"] resize set 800 px 600 px;
for_window [instance="scratch-ncmpcpp"] move scratchpad; for_window [instance="scratch-ncmpcpp"] move scratchpad;
#+end_src #+end_src
** RSS Feed with NewsBoat *** Calculator with insect
#+begin_src conf
for_window [instance="scratch-newsboat"] scratchpad show;
exec termite --name="scratch-newsboat" --exec="tmuxinator start newsboat"
for_window [instance="scratch-newsboat"] floating enable;
for_window [instance="scratch-newsboat"] move position 240 px 125 px;
for_window [instance="scratch-newsboat"] resize set 1200 px 800 px;
for_window [instance="scratch-newsboat"] move scratchpad;
#+end_src
** Calculator with insect
#+begin_src conf #+begin_src conf
for_window [instance="scratch-insect"] scratchpad show; for_window [instance="scratch-insect"] scratchpad show;
exec termite --name="scratch-insect" --exec="insect" exec termite --name="scratch-insect" --exec="insect"
@ -236,17 +334,7 @@ bindsym $mod+f fullscreen toggle
for_window [instance="scratch-insect"] move scratchpad; for_window [instance="scratch-insect"] move scratchpad;
#+end_src #+end_src
** Mails with Neomutt *** Ranger
#+begin_src conf
for_window [instance="scratch-neomutt"] scratchpad show;
exec termite --name="scratch-neomutt" --exec="neomutt"
for_window [instance="scratch-neomutt"] floating enable;
for_window [instance="scratch-neomutt"] move position 240 px 125 px;
for_window [instance="scratch-neomutt"] resize set 1200 px 800 px;
for_window [instance="scratch-neomutt"] move scratchpad;
#+end_src
** Ranger
#+begin_src conf #+begin_src conf
for_window [instance="scratch-ranger"] scratchpad show; for_window [instance="scratch-ranger"] scratchpad show;
exec urxvt -name scratch-ranger -e ranger exec urxvt -name scratch-ranger -e ranger
@ -256,7 +344,7 @@ bindsym $mod+f fullscreen toggle
for_window [instance="scratch-ranger"] move scratchpad; for_window [instance="scratch-ranger"] move scratchpad;
#+end_src #+end_src
** Terminal *** Terminal
#+begin_src conf #+begin_src conf
for_window [instance="scratch-termite"] scratchpad show; for_window [instance="scratch-termite"] scratchpad show;
exec termite --name="scratch-termite" exec termite --name="scratch-termite"
@ -271,12 +359,9 @@ bindsym $mod+f fullscreen toggle
bindsym $mod+s mode "$mode_stratchpad" bindsym $mod+s mode "$mode_stratchpad"
set $mode_stratchpad (w)eechat (m)ails (p)layer (c)alc (s)hell (n)ews (r)anger set $mode_stratchpad (w)eechat (m)ails (p)layer (c)alc (s)hell (n)ews (r)anger
mode "$mode_stratchpad" { mode "$mode_stratchpad" {
bindsym w [instance="scratch-weechat"] scratchpad show; mode "default"
bindsym p [instance="scratch-ncmpcpp"] scratchpad show; mode "default" bindsym p [instance="scratch-ncmpcpp"] scratchpad show; mode "default"
bindsym n [instance="scratch-newsboat"] scratchpad show; mode "default"
bindsym s [instance="scratch-termite"] scratchpad show; mode "default" bindsym s [instance="scratch-termite"] scratchpad show; mode "default"
bindsym c [instance="scratch-insect"] scratchpad show; mode "default" bindsym c [instance="scratch-insect"] scratchpad show; mode "default"
bindsym m [instance="scratch-neomutt"] scratchpad show; mode "default"
bindsym r [instance="scratch-ranger"] scratchpad show; mode "default" bindsym r [instance="scratch-ranger"] scratchpad show; mode "default"
# exit system mode: "Enter" or "Escape" # exit system mode: "Enter" or "Escape"
@ -285,7 +370,8 @@ mode "$mode_stratchpad" {
} }
#+end_src #+end_src
* TODO [#A] Workspace names * Workspaces
** Workspace names
To display names or symbols instead of plain workspace numbers you can use something like: =set $ws1 1:mail= and =set $ws2 2:=. To display names or symbols instead of plain workspace numbers you can use something like: =set $ws1 1:mail= and =set $ws2 2:=.
#+begin_src conf #+begin_src conf
@ -299,7 +385,7 @@ To display names or symbols instead of plain workspace numbers you can use somet
set $ws8 8 set $ws8 8
#+end_src #+end_src
* Switch to workspace ** Switch to workspace
#+begin_src conf #+begin_src conf
bindsym $mod+1 workspace $ws1 bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2 bindsym $mod+2 workspace $ws2
@ -311,7 +397,7 @@ To display names or symbols instead of plain workspace numbers you can use somet
bindsym $mod+8 workspace $ws8 bindsym $mod+8 workspace $ws8
#+end_src #+end_src
* Navigate Workspace ** Navigate Workspace
** Workspace back and forth (with/without active container) ** Workspace back and forth (with/without active container)
#+begin_src conf #+begin_src conf
workspace_auto_back_and_forth yes workspace_auto_back_and_forth yes
@ -325,7 +411,7 @@ To display names or symbols instead of plain workspace numbers you can use somet
bindsym $mod+p workspace prev bindsym $mod+p workspace prev
#+end_src #+end_src
* Move focused container to workspace ** Move focused container to workspace
#+begin_src conf #+begin_src conf
bindsym $mod+Ctrl+1 move container to workspace $ws1 bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2 bindsym $mod+Ctrl+2 move container to workspace $ws2
@ -337,7 +423,7 @@ To display names or symbols instead of plain workspace numbers you can use somet
bindsym $mod+Ctrl+8 move container to workspace $ws8 bindsym $mod+Ctrl+8 move container to workspace $ws8
#+end_src #+end_src
* Move to workspace with focused container ** Move to workspace with focused container
#+begin_src conf #+begin_src conf
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
@ -349,7 +435,7 @@ To display names or symbols instead of plain workspace numbers you can use somet
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
#+end_src #+end_src
* Open applications on specific workspaces ** Open applications on specific workspaces
#+begin_src conf #+begin_src conf
# Matlab Figures # Matlab Figures
assign[title="^Fig"] $ws6 assign[title="^Fig"] $ws6
@ -388,121 +474,7 @@ To display names or symbols instead of plain workspace numbers you can use somet
* Restart i3 inplace (preserves your layout/session, can be used to upgrade i3) * Restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
#+begin_src conf #+begin_src conf
bindsym $mod+Shift+r restart bindsym $mod+Shift+r restart
#+end_src bindsym $mod+r exec $HOME/.config/polybar/scripts/launch.sh
* Set shut down, restart and locking features
#+begin_src conf
bindsym $mod+0 mode "$mode_system"
# TODO - Power Key, if "ignored" in /etc/systemd/logind.conf
bindcode 124 mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
#+end_src
* Command Mode
#+begin_src conf
bindsym $mod+space mode "command"
mode "command" {
# Command line Calendar Client (khal)
bindsym c exec termite -e "khal interactive"; mode "default"
# GUI Calendar (Google Calendar)
bindsym Shift+c exec qutebrowser https://calendar.google.com/; mode "default"
# Ranger
bindsym r exec urxvt -e "ranger"; mode "default"
# pcmanfm: GUI file manager
bindsym Shift+r exec pcmanfm; mode "default"
# Mails with neomutt
bindsym m exec termite -e "tmuxinator start neomutt"; mode "default"
# Weechat inside Tmux
bindsym w exec termite -e "tmux -L weechat attach"; mode "default"
# Music with ncmpcpp
bindsym p exec termite --exec="ncmpcpp"; mode "default"
# Browser with qutebrowser
bindsym i exec qutebrowser; mode "default"
# Browser with firefox
bindsym Shift+i exec firefox; mode "default"
# Emacs Client
bindsym e exec emacsclient -create-frame --alternate-editor=""; mode "default"
# Full Emacs - Usefull when installing packages
bindsym Shift+e exec emacs; mode "default"
# exit resize mode: Enter or Escape
bindsym Escape mode "default"
}
#+end_src
* Resize
#+begin_src conf
bindsym $mod+Shift+y resize shrink width 10 px or 10 ppt
bindsym $mod+Shift+u resize grow height 10 px or 10 ppt
bindsym $mod+Shift+i resize shrink height 10 px or 10 ppt
bindsym $mod+Shift+o resize grow width 10 px or 10 ppt
#+end_src
* Autostart Background Applications
#+begin_src conf
# Authentication agent
# exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Set custom wallpaper script
exec --no-startup-id $HOME/scripts/wallpapers.sh
# Run Compton
exec --no-startup-id compton -b
# Start Network Management Framework
exec --no-startup-id nm-applet
# Start Power Manager
exec --no-startup-id xfce4-power-manager
# Bluetooth Manager
exec --no-startup-id blueman-applet
# Autolock screen after x minutes
# exec --no-startup-id xautolock -time 30 -locker blurlock
exec --no-startup-id xautolock -detectsleep -time 30 -locker blurlock -notify 60 -notifier "notify-send -u critical -t 10000 -- 'LOCKING screen in 60 seconds'"
# Autostart udiskie that is used to automount devices
exec --no-startup-id udiskie
# Screen options
exec --no-startup-id xrandr --output eDP1 --mode 1920x1080 --dpi 192
# Redshift
exec --no-startup-id redshift
# Start mopidy
exec --no-startup-id mopidy
# PulseAudio Server
# exec --no-startup-id pulseaudio --daemon
# Emacs Daemon
exec --no-startup-id /usr/bin/emacs --fg-daemon
# TODO - Start polybar
exec_always --no-startup-id $HOME/.config/polybar/scripts/launch.sh
#+end_src
* Start Foreground Applications
#+begin_src conf
# Megasync
exec --no-startup-id i3-msg 'exec megasync'
#+end_src #+end_src
* Color palette used for the terminal ( ~/.Xresources file ) * Color palette used for the terminal ( ~/.Xresources file )
@ -552,13 +524,13 @@ Colors are gathered based on the documentation https://i3wm.org/docs/userguide.h
* TODO Theme colors * TODO Theme colors
#+begin_src conf #+begin_src conf
# class border backgr. text indic. child_border # class border backgr. text indic. child_border
client.focused #2F3D44 #2F3D44 #1ABC9C #454948 client.focused $blue $blue $fg $blue
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948 client.focused_inactive $bg $bg $fg $bg
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 client.urgent $bg $bg $fg $bg
client.unfocused #556064 #556064 #80FFF9 #FDF6E3 client.unfocused $bg $bg $fg $bg
client.placeholder #000000 #0c0c0c #ffffff #000000 client.placeholder $bg $bg $fg $bg
client.background #2B2C2B client.background #32302F
#+end_src #+end_src
* Settings for i3-gaps * Settings for i3-gaps
@ -577,7 +549,7 @@ Colors are gathered based on the documentation https://i3wm.org/docs/userguide.h
# Smart borders (draw borders around container only if it is not the only container on this workspace) # Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0) # on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on # smart_borders on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces. # Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner set $mode_gaps Gaps: (o) outer, (i) inner

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,6 @@
#+TITLE: Newsboat Configuration #+TITLE: Newsboat Configuration
https://wiki.archlinux.org/index.php/Newsboat
https://newsboat.org/releases/2.12/docs/newsboat.html
* Config * Config
:PROPERTIES: :PROPERTIES:
@ -6,131 +8,137 @@
:header-args+: :comments both :mkdirp yes :header-args+: :comments both :mkdirp yes
:END: :END:
** Reload configuration
#+BEGIN_SRC conf #+BEGIN_SRC conf
# ============================================================= # All feeds will be automatically reloaded after a certain time has passed
# Basic configuration auto-reload yes
# =============================================================
# All feeds will be automatically reloaded after a certain time has passed
# auto-reload yes
auto-reload no
# reload-time 60
# suppress-first-reload yes
confirm-exit yes # The number of minutes between automatic reloads.
reload-time 180
external-url-viewer "urlscan -dc -r 'linkhandler {}'" # The number of parallel reload threads that shall be started when all feeds are reloaded.
reload-threads 3
goto-first-unread no # If set to yes, then the first automatic reload will be suppressed if auto-reload is set to yes.
goto-next-feed no suppress-first-reload yes
#+END_SRC
save-path "~/Saved Articles" ** Basic configuration
download-path "~/Downloads" #+BEGIN_SRC conf
confirm-exit no
# If set to no, then the keymap hints on the bottom of screen will not be displayed. external-url-viewer "urlscan -dc -r 'linkhandler {}'"
show-keymap-hint no
feed-sort-order none goto-first-unread no
# ============================================================= goto-next-feed no
save-path "~/Saved Articles"
download-path "~/Downloads"
# ============================================================= # If set to no, then the keymap hints on the bottom of screen will not be displayed.
# Notifications show-keymap-hint no
# =============================================================
notify-format "newsbeuter: %n unread articles within %f unread feeds"
notify-program notify-send
# =============================================================
feed-sort-order none
#+END_SRC
# ============================================================= ** Notifications
# Bindings #+BEGIN_SRC conf
# ============================================================= notify-format "%n unread articles"
bind-key j down notify-program ~/scripts/newsboat-notify.sh
bind-key k up notify-always no
bind-key j next articlelist #+END_SRC
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 l open *** Notification Script
bind-key h quit :PROPERTIES:
:header-args: :tangle ~/scripts/newsboat-notify.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
bind-key a toggle-article-read #+begin_src bash
dunstify -replace=38492 "Newsbeuter " "$1"
#+end_src
bind-key n next-unread ** Bindings
bind-key N prev-unread #+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 D pb-download bind-key l open
bind-key h quit
bind-key U show-urls bind-key a toggle-article-read
# bind-key x pb-delete bind-key n next-unread
bind-key N prev-unread
bind-key t set-tag bind-key D pb-download
bind-key T clear-tag
bind-key r reload # Reload the currently selected feed bind-key U show-urls
bind-key R reload-all # Reload all feeds
# =============================================================
# bind-key x pb-delete
# ============================================================= bind-key t set-tag
# Macros - Starts with , key bind-key T clear-tag
# =============================================================
# Default Browser
browser "qutebrowser %u"
# Open in Browser bind-key r reload # Reload the currently selected feed
macro , open-in-browser bind-key R reload-all # Reload all feeds
#+END_SRC
# Download Video with Youtube-DL ** Macros - Starts with , key
# TODO - Should write a script for that? Maybe open a tmux script if newsboat is in tmux pane? #+BEGIN_SRC conf
macro t set browser "~/scripts/download-video.sh %u" ; open-in-browser ; set browser "qutebrowser %u" # Default Browser
browser "qutebrowser %u"
# Download Audio with Youtube-DL # Open in Browser
macro a set browser "~/scripts/download-audio.sh %u" ; open-in-browser ; set browser "qutebrowser %u" macro , open-in-browser
# Open Video with MPV # Download Video with Youtube-DL
macro v set browser "setsid nohup mpv %u &> /dev/null &" ; open-in-browser ; set browser "qutebrowser %u" # TODO - Should write a script for that? Maybe open a tmux script if newsboat is in tmux pane?
macro t set browser "~/scripts/download-video.sh %u" ; open-in-browser ; set browser "qutebrowser %u"
# Open With W3M # Download Audio with Youtube-DL
macro w set browser "w3m %u" ; open-in-browser ; set browser "qutebrowser %u" macro a set browser "~/scripts/download-audio.sh %u" ; open-in-browser ; set browser "qutebrowser %u"
# Copy Address to clipboard # Open Video with MPV
macro c set browser "xsel -b <<<" ; open-in-browser ; set browser "qutebrowser %u" macro v set browser "setsid nohup mpv %u &> /dev/null &" ; open-in-browser ; set browser "qutebrowser %u"
# =============================================================
# Open With W3M
macro w set browser "w3m %u" ; open-in-browser ; set browser "qutebrowser %u"
# ============================================================= # Copy Address to clipboard
# hide articles matching macro c set browser "xsel -b <<<" ; open-in-browser ; set browser "qutebrowser %u"
# ============================================================= #+END_SRC
ignore-article "*" "title =~ \"Sponsor\""
ignore-article "*" "title =~ \"Advertisement\""
ignore-mode "display"
# =============================================================
** hide articles matching
#+BEGIN_SRC conf
ignore-article "*" "title =~ \"Sponsor\""
ignore-article "*" "title =~ \"Advertisement\""
ignore-mode "display"
#+END_SRC
# ============================================================= ** Feedlist and Article Format
# Feedlist and Article Format #+BEGIN_SRC conf
# ============================================================= feedlist-format "%4i %n %11u %t"
feedlist-format "%4i %n %11u %t" feedlist-title-format "N %V - Your feeds (%u unread, %t total)%?T? - tag `%T'&?"
feedlist-title-format "N %V - Your feeds (%u unread, %t total)%?T? - tag `%T'&?"
articlelist-format "%3i %f %D %?T?|%-17T| ?%t" articlelist-format "%3i %f %D %?T?|%-17T| ?%t"
articlelist-title-format "%N %V - Articles in feed '%T' (%u unread, %t total) - %U" articlelist-title-format "%N %V - Articles in feed '%T' (%u unread, %t total) - %U"
itemview-title-format "Article '%T'" itemview-title-format "Article '%T'"
# ============================================================= #+END_SRC
** Color Scheme
# ============================================================= #+BEGIN_SRC conf
# Color Scheme include "~/.config/newsboat/colors"
# =============================================================
include "~/.config/newsboat/colors"
# =============================================================
#+END_SRC #+END_SRC
* Colors * Colors
@ -140,86 +148,91 @@ include "~/.config/newsboat/colors"
:END: :END:
#+BEGIN_SRC conf #+BEGIN_SRC conf
# ============================================================= highlight feedlist "^ *[0-9]+ *N " cyan cyan
# Color Scheme highlight articlelist "^ *[0-9]+ *N " cyan cyan
# =============================================================
highlight feedlist "^ *[0-9]+ *N " cyan cyan
highlight articlelist "^ *[0-9]+ *N " cyan cyan
highlight article "(^Feed:.*|^Title:.*|^Author:.*)" red default highlight article "(^Feed:.*|^Title:.*|^Author:.*)" red default
highlight article "(^Link:.*|^Date:.*)" white default highlight article "(^Link:.*|^Date:.*)" white default
highlight article "^Podcast Download URL:.*" cyan default highlight article "^Podcast Download URL:.*" cyan default
highlight article "^Links:" magenta black underline highlight article "^Links:" magenta black underline
highlight article "https?://[^ ]+" green default highlight article "https?://[^ ]+" green default
highlight article "^(Title):.*$" blue default highlight article "^(Title):.*$" blue default
highlight article "\\[[0-9][0-9]*\\]" magenta default bold highlight article "\\[[0-9][0-9]*\\]" magenta default bold
highlight article "\\[image\\ [0-9]+\\]" green default bold highlight article "\\[image\\ [0-9]+\\]" green default bold
highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold
highlight article ":.*\\(link\\)$" cyan default highlight article ":.*\\(link\\)$" cyan default
highlight article ":.*\\(image\\)$" blue default highlight article ":.*\\(image\\)$" blue default
highlight article ":.*\\(embedded flash\\)$" magenta default highlight article ":.*\\(embedded flash\\)$" magenta default
color background default default color background default default
color listnormal default default color listnormal default default
color listnormal_unread white default color listnormal_unread white default
color listfocus color255 cyan bold color listfocus color255 cyan bold
color listfocus_unread color255 cyan bold color listfocus_unread color255 cyan bold
color info cyan black color info cyan black
color article default default color article default default
# =============================================================
#+END_SRC #+END_SRC
* Config * URLS
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/newsboat/urls :header-args: :tangle ~/.config/newsboat/urls
:header-args+: :comments both :mkdirp yes :header-args+: :comments both :mkdirp yes
:END: :END:
** NEWSFEEDS
*** Linux
#+begin_src conf
https://itsfoss.com/feed/ "~NEWSFEED: It's Foss" linux
https://lukesmith.xyz/rss.xml "~NEWSFEED: Lukesmith" linux
https://lord.re/index.xml "~NEWSFEED: /home/lord" linux
http://feeds.cyberciti.biz/Nixcraft-LinuxFreebsdSolarisTipsTricks "~NEWSFEED: nixCraft" linux
http://frederic.bezies.free.fr/blog/?feed=rss2 "~NEWSFEED: Le Weblog de Frederic Bezies" linux
https://addy-dclxvi.github.io/index.xml "~NEWSFEED: Addy's Blog" linux
http://feeds.feedburner.com/linoxideblog "~NEWSFEED: LinOxide" linux
#+end_src
*** Emacs
#+begin_src conf #+begin_src conf
------------------------
-------NEWSFEEDS--------
------------------------
https://itsfoss.com/feed/ "~NEWSFEED: It's Foss" unix
https://lukesmith.xyz/rss.xml "~NEWSFEED: Lukesmith" unix
http://www.planet.emacsen.org/atom.xml "~NEWSFEED: Planet Emacs" emacs http://www.planet.emacsen.org/atom.xml "~NEWSFEED: Planet Emacs" emacs
http://sachachua.com/blog/feed/ "~NEWSFEED: Sacha Chua" emacs http://sachachua.com/blog/feed/ "~NEWSFEED: Sacha Chua" emacs
https://scripter.co/categories/org/index.xml "~NEWSFEED: Scripter" emacs
http://kitchingroup.cheme.cmu.edu/blog/feed "~NEWSFEED: The Kitchin Research Group" emacs
http://irreal.org/blog/?feed=rss2 "~NEWSFEED: Irreal" emacs
https://emacs.cafe/feed.xml "~NEWSFEED: Emacs café" emacs
http://pragmaticemacs.com/feed/ "~NEWSFEED: Pragmatic Emacs" emacs
https://pinecast.com/feed/emacscast "~NEWSFEED: EmacsCast" emacs
http://feeds.feedburner.com/CestLaZ "~newsfeed: c'est la Z" emacs
https://joshrollinswrites.com/index.xml "The Art of Not Asking Why" emacs
#+end_src
*** Other
#+begin_src conf
http://xkcd.com/rss.xml "~NEWSFEED: XKCD" fun http://xkcd.com/rss.xml "~NEWSFEED: XKCD" fun
https://scripter.co/categories/org/index.xml "~NEWSFEED: Scripter" orgmode #+end_src
-------------------------
-------YOUTUBE----------- ** Youtube
------------------------- #+begin_src conf
https://www.youtube.com/feeds/videos.xml?channel_id=UCkK9UDm_ZNrq_rIXCz3xCGA "~YOUTUBE: Bryan Lunduke" youtube unix https://www.youtube.com/feeds/videos.xml?channel_id=UCkK9UDm_ZNrq_rIXCz3xCGA "~YOUTUBE: Bryan Lunduke" youtube unix
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~YOUTUBE: Luke Smith" youtube unix https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~YOUTUBE: Luke Smith" youtube unix
https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "~YOUTUBE: Greg Hurrell" youtube unix
https://www.youtube.com/feeds/videos.xml?channel_id=UCUR1pFG_3XoZn3JNKjulqZg "~YOUTUBE: Thoughtbot" youtube unix
https://www.youtube.com/feeds/videos.xml?channel_id=UCOuIgj0CYCXCvjWywjDbauw "~YOUTUBE: Chat sceptique" youtube science https://www.youtube.com/feeds/videos.xml?channel_id=UCOuIgj0CYCXCvjWywjDbauw "~YOUTUBE: Chat sceptique" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCMFcMhePnH4onVHt2-ItPZw "~YOUTUBE: Hygiène Mentale" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCxqAWLTk1CmBvZFPzeZMd9A "~YOUTUBE: Domain of Science" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UC2LZO6swZ9SLUEOks3WnsfA "~YOUTUBE: 2veritasium" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCaNlbnghtwlsGF-KzAFThqA "~YOUTUBE: ScienceEtonnante" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~YOUTUBE: Veritasium" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCEfFUaIkjbI06PhALdcXNVA "~YOUTUBE: EmacsCast" youtube emacs https://www.youtube.com/feeds/videos.xml?channel_id=UCEfFUaIkjbI06PhALdcXNVA "~YOUTUBE: EmacsCast" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCkRmQ_G_NbdbCQMpALg6UPg "~YOUTUBE: Emacsrocks" youtube emacs https://www.youtube.com/feeds/videos.xml?channel_id=UCkRmQ_G_NbdbCQMpALg6UPg "~YOUTUBE: Emacsrocks" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCQp2VLAOlvq142YN3JO3y8w "~YOUTUBE: John Kitchin" youtube emacs https://www.youtube.com/feeds/videos.xml?channel_id=UCQp2VLAOlvq142YN3JO3y8w "~YOUTUBE: John Kitchin" youtube emacs
https://www.youtube.com/feeds/videos.xml?channel_id=UCq0imsn84ShAe9PBOFnoIrg "~YOUTUBE: Brian Douglas" youtube control https://www.youtube.com/feeds/videos.xml?channel_id=UCq0imsn84ShAe9PBOFnoIrg "~YOUTUBE: Brian Douglas" youtube control
https://www.youtube.com/feeds/videos.xml?channel_id=UCm5mt-A4w61lknZ9lCsZtBw "~YOUTUBE: Steve Brunton" youtube control https://www.youtube.com/feeds/videos.xml?channel_id=UCm5mt-A4w61lknZ9lCsZtBw "~YOUTUBE: Steve Brunton" youtube control
https://www.youtube.com/feeds/videos.xml?channel_id=UCMFcMhePnH4onVHt2-ItPZw "~YOUTUBE: Hygiène Mentale" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCxqAWLTk1CmBvZFPzeZMd9A "~YOUTUBE: Domain of Science" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UC7vVhkEfw4nOGp8TyDk7RcQ "~YOUTUBE: BostonDynamics" youtube control https://www.youtube.com/feeds/videos.xml?channel_id=UC7vVhkEfw4nOGp8TyDk7RcQ "~YOUTUBE: BostonDynamics" youtube control
https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "~YOUTUBE: Greg Hurrell" youtube vim unix
https://www.youtube.com/feeds/videos.xml?channel_id=UCUR1pFG_3XoZn3JNKjulqZg "~YOUTUBE: Thoughtbot" youtube unix
https://www.youtube.com/feeds/videos.xml?channel_id=UCmkP178NasnhR3TWQyyP4Gw "~YOUTUBE: How To Mechatronics" youtube control https://www.youtube.com/feeds/videos.xml?channel_id=UCmkP178NasnhR3TWQyyP4Gw "~YOUTUBE: How To Mechatronics" youtube control
https://www.youtube.com/feeds/videos.xml?channel_id=UC2LZO6swZ9SLUEOks3WnsfA "~YOUTUBE: 2veritasium" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCaNlbnghtwlsGF-KzAFThqA "~YOUTUBE: ScienceEtonnante" youtube science
https://www.youtube.com/feeds/videos.xml?channel_id=UCSqyMHDUsc1gs6wz4sUy91w "~YOUTUBE: Jipihorn" youtube acoustic https://www.youtube.com/feeds/videos.xml?channel_id=UCSqyMHDUsc1gs6wz4sUy91w "~YOUTUBE: Jipihorn" youtube acoustic
https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~YOUTUBE: Veritasium" youtube science
-------------------------
-------REDDIT------------
-------------------------
https://www.reddit.com/r/linux/.rss "~REDDIT: r/linux" reddit linux
https://www.reddit.com/r/emacs/.rss "~REDDIT: r/emacs" reddit emacs
-------------------------
-------GIT_REPOS---------
-------------------------
https://github.com/LukeSmithxyz.atom "~GITHUB: LukeSmithxyz" github unix
-------------------------
-------ARCHLINUX---------
-------------------------
https://www.archlinux.org/feeds/packages/added/ "~ARCH: Packages Added"
https://www.archlinux.org/feeds/packages/removed/ "~ARCH: Packages Removed"
https://aur.archlinux.org/rss/ "~ARCH: Packages Added (AUR)"
https://wiki.archlinux.org/api.php?hidebots=1&urlversion=1&days=7&limit=50&action=feedrecentchanges&feedformat=rss "~ARCH: Arch Wiki"
#+end_src #+end_src

View File

@ -1,7 +1,9 @@
#+TITLE: Polybar Configuration #+TITLE: Polybar Configuration
:DRAWER:
#+PROPERTY: header-args+ :comments both #+PROPERTY: header-args+ :comments both
#+PROPERTY: header-args+ :mkdirp yes #+PROPERTY: header-args+ :mkdirp yes
#+PROPERTY: header-args+ :tangle ~/.config/polybar/config #+PROPERTY: header-args+ :tangle ~/.config/polybar/config
:END:
* Colors * Colors
#+begin_src conf #+begin_src conf
@ -56,7 +58,7 @@
enable-ipc = true enable-ipc = true
override-redirect = false override-redirect = false
bottom = false bottom = false
fixed-center = true fixed-center = false
width = 100% width = 100%
height = 27 height = 27
@ -65,7 +67,7 @@
background = ${colors.background} background = ${colors.background}
foreground = ${colors.foreground} foreground = ${colors.foreground}
line-size = 3 line-size = 2
border-size = 0 border-size = 0
@ -79,60 +81,13 @@
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = Weather Icons:size=10;1 font-2 = Weather Icons:size=10;1
modules-left = i3 modules-left = i3 xwindow
modules-center = mpd pulseaudio modules-center =
modules-right = dunst unread_mail cpu battery temperature date modules-right = pulseaudio wired-network wireless-network xbacklight nordvpn dunst unread_mail cpu battery temperature date
tray-position = right tray-position = right
tray-padding = 2 tray-padding = 0
#tray-transparent = true tray-background = ${colors.background}
#tray-background = #0063ff
#cursor-click = pointer
#cursor-scroll = ns-resize
#+END_SRC
* Bottom Bar
#+BEGIN_SRC conf
[bar/bottom]
enable-ipc = true
override-redirect = false
bottom = true
fixed-center = true
width = 100%
height = 27
radius = 0.0
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
border-size = 0
padding-left = 2
padding-right = 2
module-margin-left = 1
module-margin-right = 1
font-0 = Hack Nerd Font:style=Medium,Regular:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = Weather Icons:size=10;1
# font-3 = siji:pixelsize=10;1
modules-left = mpd pulseaudio
# modules-center = xwindow
modules-right = filesystem nordvpn chromecast screenshot weather emacs caffeine redshift
# tray-position = right
# tray-padding = 2
#tray-transparent = true
#tray-background = #0063ff
#cursor-click = pointer
#cursor-scroll = ns-resize
#+END_SRC #+END_SRC
* Show Windows Title * Show Windows Title
@ -142,38 +97,6 @@
label = %title:0:30:...% label = %title:0:30:...%
#+END_SRC #+END_SRC
* Current Layout of the Keyboard
#+BEGIN_SRC conf
[module/xkeyboard]
type = internal/xkeyboard
# List of indicators to ignore
blacklist-0 = num lock
format = <label-layout>
format-prefix = " "
format-prefix-foreground = ${colors.foreground}
format-prefix-underline = ${colors.background}
label-layout = %layout%
label-layout-underline = ${colors.background}
#+END_SRC
* Mount filesystem and show available space
#+BEGIN_SRC conf
[module/filesystem]
type = internal/fs
interval = 25
# List of mountpoints to display
mount-0 = /
label-mounted = %{Fcolors.blue}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint%
label-unmounted-foreground = ${colors.comments}
#+END_SRC
* I3 - Information about workspaces and active one * I3 - Information about workspaces and active one
#+BEGIN_SRC conf #+BEGIN_SRC conf
[module/i3] [module/i3]
@ -288,21 +211,6 @@
label = %{A1:termite -e "htop" &:} ﬙ %percentage:2%% %{A} label = %{A1:termite -e "htop" &:} ﬙ %percentage:2%% %{A}
#+END_SRC #+END_SRC
* Available Memory
#+BEGIN_SRC conf
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-dark}
format-underline = #4bffdc
label = %percentage_used%%
#+END_SRC
* Date * Date
#+BEGIN_SRC conf #+BEGIN_SRC conf
[module/date] [module/date]
@ -310,8 +218,8 @@
interval = 1 interval = 1
# Open google calendar on left right # Open google calendar on left right
date = %{A1:$BROWSER https\://calendar.google.com/ &:} %d-%m%{A} date = %{A1:termite -e "ikhal" &:} %d-%m%{A}
date-alt = "%{A1:$BROWSER https\://calendar.google.com/ &:} %d-%m-%Y%{A}" date-alt = "%{A1:termite -e \"ikhal\" &:} %d-%m-%Y%{A}"
time =  %H:%M time =  %H:%M
time-alt =  %H:%M:%S time-alt =  %H:%M:%S
@ -430,7 +338,7 @@
label-font = 2 label-font = 2
format-underline = ${colors.background} format-underline = ${colors.background}
click-left = termite -e "tmuxinator start neomutt" & click-left = termite -e "tmux -L neomutt attach" &
format = <label> format = <label>
exec = ~/.config/polybar/scripts/unread_mails.sh exec = ~/.config/polybar/scripts/unread_mails.sh
interval = 1 interval = 1
@ -487,72 +395,16 @@
fi fi
#+end_src #+end_src
* Emacs
#+begin_src conf
[module/emacs]
type = custom/script
label-font = 2
format-underline = ${colors.background}
click-left = ~/.config/polybar/scripts/emacsclient.sh &
click-right = emacs &
format = <label>
exec = ~/.config/polybar/scripts/emacsserver.sh
interval = 5
#+end_src
** Emacs Server Scripts
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/emacsserver.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+BEGIN_SRC bash
if test -e "/tmp/emacs1000/server" || test -e "~/.emacs.d/server"; then
echo "%{F#859900}%{F-}";
else
echo "";
fi
#+END_SRC
** Emacs Client Script
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/emacsclient.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+BEGIN_SRC bash
emacsclient -create-frame --alternate-editor=""
#+END_SRC
* NordVPN * NordVPN
#+BEGIN_SRC conf #+BEGIN_SRC conf
[module/nordvpn] [module/nordvpn]
type = custom/script type = custom/script
format-underline = ${colors.background} format-underline = ${colors.background}
click-left = ~/.config/polybar/scripts/nordvpn-toggle.sh click-left = ~/bin/vpntoggle
format = <label> format = <label>
exec = ~/.config/polybar/scripts/nordvpn.sh exec = ~/.config/polybar/scripts/nordvpn.sh
interval = 5 interval = 2
#+END_SRC
** Nordvpn Toggle script
:PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/nordvpn-toggle.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+BEGIN_SRC bash
vpnstatus=`nordvpn status`;
if [[ ${vpnstatus} == *"Disconnected"* ]]; then
nordvpn connect
else
nordvpn disconnect
fi
#+END_SRC #+END_SRC
** Nordvpn Status script ** Nordvpn Status script
@ -564,11 +416,12 @@
#+BEGIN_SRC bash #+BEGIN_SRC bash
vpnstatus=`nordvpn status`; vpnstatus=`nordvpn status`;
if [[ ${vpnstatus} == *"Disconnected"* ]]; then if [[ ${vpnstatus} == *"Connected"* ]]; then
echo ""; # country=`nordvpn status | sed '/Country/!d ; s/Country: //'`
# echo "%{F#859900}%{F-} $country";
echo "%{F#859900}%{F-}";
else else
country=`echo -e $vpnstatus | sed 's/^.*Country: \(\w*\) .*$/\1/'` echo "";
echo "%{F#859900}%{F-} $country";
fi fi
#+END_SRC #+END_SRC
@ -579,8 +432,8 @@
label-font = 2 label-font = 2
format-underline = ${colors.background} format-underline = ${colors.background}
click-left = xautolock -disable && notify-send "Lock Disabled" click-left = xautolock -disable && dunstify --replace=87901 "Lock Disabled"
click-right = xautolock -enable && notify-send "Lock Enabled" click-right = xautolock -enable && dunstify --replace=87901 "Lock Enabled"
format = <label> format = <label>
exec = echo -e "\uf0f4" exec = echo -e "\uf0f4"
interval = 1 interval = 1
@ -591,8 +444,8 @@
[module/dunst] [module/dunst]
type = custom/text type = custom/text
content = "" content = ""
click-left = notify-send "Notifications Disabled" && sleep 2 && notify-send "DUNST_COMMAND_PAUSE" click-left = dunstify --replace=10524 "Notifications Disabled" && sleep 2 && dunstify "DUNST_COMMAND_PAUSE"
click-right = notify-send "DUNST_COMMAND_RESUME" && notify-send "Notifications Resumed" click-right = dunstify "DUNST_COMMAND_RESUME" && dunstify --replace=10524 "Notifications Resumed"
#+END_SRC #+END_SRC
* Weather * Weather
@ -609,7 +462,7 @@ click-left = ~/.config/polybar/scripts/weatheropen.sh
label-font = 3 label-font = 3
#+end_src #+end_src
** Emacs Server Scripts ** Script to retrieve the weather
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/polybar/scripts/weather.sh :header-args: :tangle ~/.config/polybar/scripts/weather.sh
:header-args+: :comments both :mkdirp yes :header-args+: :comments both :mkdirp yes
@ -733,149 +586,46 @@ click-left = ~/.config/polybar/scripts/weatheropen.sh
$BROWSER https://www.yahoo.com/news/weather/france/grenoble/grenoble-593720 $BROWSER https://www.yahoo.com/news/weather/france/grenoble/grenoble-593720
#+END_SRC #+END_SRC
* TODO [#A] Network * Network
#+begin_src conf #+begin_src conf
[module/network] [module/wired-network]
type = internal/network type = internal/network
interface = wlp3s0 interface = enp0s20f0u9u4
; Seconds to sleep between updates label-connected = %local_ip%
; Default: 1 label-connected-foreground = ${colors.foreground}
interval = 3.0
; ; Test connectivity every Nth update format-connected-prefix = " "
; ; A value of 0 disables the feature
; ; NOTE: Experimental (needs more testing)
; ; Default: 0
; ;ping-interval = 3
; ; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%)
; ; Minimum output width of upload/download rate
; ; Default: 3
; udspeed-minwidth = 5
; ; Accumulate values from all interfaces
; ; when querying for up/downspeed rate
; ; Default: false
; accumulate-stats = true
; ; Consider an `UNKNOWN` interface state as up.
; ; Some devices have an unknown state, even when they're running
; ; Default: false
; unknown-as-up = true
; ; Available tags:
; ; <label-connected> (default)
; ; <ramp-signal>
format-connected-prefix = "  "
format-connected = <label-connected> format-connected = <label-connected>
; ; Available tags: label-disconnected = ""
; ; <label-disconnected> (default) label-disconnected-foreground = ${colors.comments}
; format-disconnected = <label-disconnected>
; ; Available tags: format-disconnected = <label-disconnected>
; ; <label-connected> (default)
; ; <label-packetloss> [module/wireless-network]
; ; <animation-packetloss> type = internal/network
; format-packetloss = <animation-packetloss> <label-connected> interface = wlp2s0
; ; Available tokens:
; ; %ifname% [wireless+wired]
; ; %local_ip% [wireless+wired]
; ; %local_ip6% [wireless+wired]
; ; %essid% [wireless]
; ; %signal% [wireless]
; ; %upspeed% [wireless+wired]
; ; %downspeed% [wireless+wired]
; ; %linkspeed% [wired]
; ; Default: %ifname% %local_ip%
label-connected = %essid% label-connected = %essid%
; label-connected-foreground = #eefafafa label-connected-foreground = ${colors.foreground}
; ; Available tokens: format-connected-prefix = " "
; ; %ifname% [wireless+wired] format-connected = <label-connected>
; ; Default: (none)
; label-disconnected = not connected
; label-disconnected-foreground = #66ffffff
; ; Available tokens: label-disconnected = ""
; ; %ifname% [wireless+wired] label-disconnected-foreground = ${colors.comments}
; ; %local_ip% [wireless+wired]
; ; %local_ip6% [wireless+wired]
; ; %essid% [wireless]
; ; %signal% [wireless]
; ; %linkspeed% [wired]
; ; Default: (none)
; ;label-packetloss = %essid%
; ;label-packetloss-foreground = #eefafafa
; ; Only applies if <ramp-signal> is used format-disconnected = <label-disconnected>
; ramp-signal-0 = 😱
; ramp-signal-1 = 😠
; ramp-signal-2 = 😒
; ramp-signal-3 = 😊
; ramp-signal-4 = 😃
; ramp-signal-5 = 😈
; ; Only applies if <animation-packetloss> is used
; animation-packetloss-0 = ⚠
; animation-packetloss-0-foreground = #ffa64c
; animation-packetloss-1 = 📶
; animation-packetloss-1-foreground = #000000
; ; Framerate in milliseconds
; animation-packetloss-framerate = 500
#+end_src #+end_src
* Logout * Screenshot
#+BEGIN_SRC conf
[module/logout]
type = custom/text
content = ""
click-left = i3exit switch_user
#+END_SRC
* Hibernate
#+BEGIN_SRC conf
[module/hibernate]
type = custom/text
content = ""
click-left = i3exit hibernate
#+END_SRC
* Shutdown
#+BEGIN_SRC conf
[module/shutdown]
type = custom/text
content = ""
click-left = i3exit shutdown
#+END_SRC
* Reboot
#+BEGIN_SRC conf
[module/reboot]
type = custom/text
content = ""
click-left = i3exit logout
#+END_SRC
* Lock
#+BEGIN_SRC conf
[module/lock]
type = custom/text
content = ""
click-left = blurlock
#+END_SRC
* TODO [#B] Screenshot
- [ ] the right click is not working
#+BEGIN_SRC conf #+BEGIN_SRC conf
[module/screenshot] [module/screenshot]
type = custom/text type = custom/text
content = "" content = ""
click-left = scrot -e 'feh $f -x' --delay 1 click-left = ~/scripts/screenshot.sh
click-right = scrot -s -e 'feh $f -x'
#+END_SRC #+END_SRC
* Scripts * Scripts

View File

@ -1,7 +1,17 @@
#+TITLE: Qutebrowser Configuration #+TITLE: Qutebrowser Configuration
:DRAWER:
#+PROPERTY: header-args+ :comments none #+PROPERTY: header-args+ :comments none
#+PROPERTY: header-args+ :mkdirp yes #+PROPERTY: header-args+ :mkdirp yes
#+PROPERTY: header-args+ :tangle ~/.config/qutebrowser/config.py #+PROPERTY: header-args+ :tangle ~/.config/qutebrowser/config.py
:END:
* Import
#+begin_src conf
from qutebrowser.config.configfiles import ConfigAPI
from qutebrowser.config.config import ConfigContainer
import sys, os
#+end_src
* General config * General config
#+BEGIN_SRC conf #+BEGIN_SRC conf
@ -527,14 +537,18 @@ c.tabs.wrap = False
c.url.searchengines = { c.url.searchengines = {
'DEFAULT': 'https://www.duckduckgo.org/?q={}', 'DEFAULT': 'https://www.duckduckgo.org/?q={}',
'aw': 'https://wiki.archlinux.org/?search={}', 'aw': 'https://wiki.archlinux.org/?search={}',
'w': 'https://en.wikipedia.org/wiki/Special:Search?search={}', 'wi': 'https://en.wikipedia.org/wiki/Special:Search?search={}',
'g': 'https://www.google.com/search?q={}', 'go': 'https://www.google.com/search?q={}',
'gc': 'https://scholar.google.fr/scholar?hl=fr&as_sdt=0%2C5&q={}&btnG=',
'gm': 'https://www.google.com/maps/search/{}/',
'yt': 'https://www.youtube.com/results?search_query={}', 'yt': 'https://www.youtube.com/results?search_query={}',
'gh': 'https://github.com/search?utf8={}&q=test&type=', 'gh': 'https://github.com/search?q={}',
'r': 'https://www.reddit.com/search?q={}', 're': 'https://www.reddit.com/search?q={}',
'lb': 'http://gen.lib.rus.ec/search.php?req={}', 'lb': 'http://gen.lib.rus.ec/search.php?req={}',
'la': 'http://gen.lib.rus.ec/scimag/index.php?s={}', 'la': 'http://gen.lib.rus.ec/scimag/index.php?s={}',
'sm': 'https://www.openstreetmap.org/search?query={}', 'sm': 'https://www.openstreetmap.org/search?query={}',
'am': 'https://www.amazon.fr/s?k={}',
} }
# Page(s) to open at the start. # Page(s) to open at the start.
@ -877,38 +891,50 @@ c.url.start_pages = ['https://start.duckduckgo.com']
#+END_SRC #+END_SRC
** Custom Bindings ** Custom Bindings
Use Pass to fill password and username (configuration is done in =~/.config/qutebrowser/password_fill_rc=). *** Use Pass to fill password and username (configuration is done in =~/.config/qutebrowser/password_fill_rc=).
#+BEGIN_SRC conf #+BEGIN_SRC conf
config.bind(',p', 'spawn --userscript password_fill') config.bind(',p', 'spawn --userscript password_fill')
#+END_SRC #+END_SRC
Open Youtube video using MPV *** Open Youtube video using MPV
#+BEGIN_SRC conf #+BEGIN_SRC conf
config.bind(',m', 'spawn mpv {url}') config.bind(',m', 'spawn --detach mpv --force-window yes {url}')
config.bind(',M', ':hint links spawn mpv {hint-url}') config.bind(',M', 'hint links spawn --detach mpv --force-window yes {hint-url}')
#+END_SRC #+END_SRC
Cast to Chromecast *** Cast Youtube to Chromecast
#+BEGIN_SRC conf #+BEGIN_SRC conf
config.bind(',c', ':hint links spawn catt cast {hint-url}') config.bind(',c', 'spawn --userscript ~/.config/qutebrowser/userscripts/cast.sh {url}')
config.bind(',C', 'hint links spawn --userscript ~/.config/qutebrowser/userscripts/cast.sh {hint-url}')
#+END_SRC #+END_SRC
Add url to refile.org *** Add url to refile.org
#+BEGIN_SRC conf #+BEGIN_SRC conf
config.bind(',r', ':spawn --userscript ~/.config/qutebrowser/userscripts/add-to-orgmode-refile.sh') config.bind(',r', 'spawn --userscript ~/.config/qutebrowser/userscripts/add-to-orgmode-refile.sh')
#+END_SRC #+END_SRC
Add page to Bookmarks *** Add page to Bookmarks
#+begin_src conf #+begin_src conf
config.bind(',b', 'spawn buku -a {url}') config.bind(',b', 'spawn buku -a {url}')
#+end_src #+end_src
Open bookmark using buku *** Open bookmark using buku
#+begin_src conf #+begin_src conf
config.bind(',o', 'spawn ~/bin/buku_run') config.bind(',o', 'spawn ~/bin/bukurun')
#+end_src #+end_src
* Userscripts * Userscripts
** Cast Youtube to Chromecast
:PROPERTIES:
:header-args: :tangle ~/.config/qutebrowser/userscripts/cast.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
youtube-dl -o - $1 | castnow --quiet -
#+end_src
** Add url to refile.org ** Add url to refile.org
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/qutebrowser/userscripts/add-to-orgmode-refile.sh :header-args: :tangle ~/.config/qutebrowser/userscripts/add-to-orgmode-refile.sh
@ -918,10 +944,11 @@ Open bookmark using buku
Add the date and time of add to properties. Add the date and time of add to properties.
#+begin_src bash #+begin_src bash
echo "* TODO $QUTE_TITLE" >> ~/Dropbox/org/refile.org echo "* TODO $QUTE_TITLE" >> ~/Dropbox/org/refile.org
echo "$QUTE_URL" >> ~/Dropbox/org/refile.org echo "$QUTE_URL" >> ~/Dropbox/org/refile.org
echo "message-info 'Added to refile.org'" >> "$QUTE_FIFO" echo "message-info 'Added to refile.org'" >> "$QUTE_FIFO"
#+end_src #+end_src
** Password_fill_rc ** Password_fill_rc
:PROPERTIES: :PROPERTIES:
:header-args+: :tangle ~/.config/qutebrowser/password_fill_rc :header-args+: :tangle ~/.config/qutebrowser/password_fill_rc

View File

@ -71,7 +71,7 @@ set show_hidden_bookmarks true
# Which colorscheme to use? These colorschemes are available by default: # Which colorscheme to use? These colorschemes are available by default:
# default, jungle, snow, solarized # default, jungle, snow, solarized
set colorscheme solarized set colorscheme gruvbox
# Preview files on the rightmost column? # Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview? # And collapse (shrink) the last column if there is nothing to preview?
@ -208,7 +208,7 @@ alias travel scout -aefiklst
** Some Custom Keybindings ** Some Custom Keybindings
*** Extract *** Extract
#+BEGIN_SRC conf #+BEGIN_SRC conf
map ,x shell ex %f map ,x shell atool -x %f
#+END_SRC #+END_SRC
*** TODO Compress *** TODO Compress
@ -231,128 +231,126 @@ map ,z shell tar -cvzf %f.tar.gz %f
map ,t shell curl --progress-bar --upload-file %f https://transfer.sh/$(basename $1) | xclip -in -selection clipboard; map ,t shell curl --progress-bar --upload-file %f https://transfer.sh/$(basename $1) | xclip -in -selection clipboard;
#+END_SRC #+END_SRC
*** Open current folder with PCManFM
#+begin_src conf
map O shell nohup pcmanfm %d &
#+end_src
** Define keys for the browser ** Define keys for the browser
*** Basic *** Basic
#+BEGIN_SRC conf #+BEGIN_SRC conf
map Q quit! map Q quit!
map q quit map q quit
copymap q ZZ ZQ copymap q ZZ ZQ
map R reload_cwd map R reload_cwd
map <C-r> reset map <C-r> reset
map <C-l> redraw_window map <C-l> redraw_window
map <C-c> abort map <C-c> abort
map <esc> change_mode normal map <esc> change_mode normal
map ~ set viewmode! map ~ set viewmode!
map i display_file map i display_file
map ? help map ? help
map W display_log map W display_log
map w taskview_open map w taskview_open
map : console map : console
map ; console map ; console
map ! console shell%space map ! console shell%space
map @ console -p6 shell %%s map @ console -p6 shell %%s
map # console shell -p%space map # console shell -p%space
#+END_SRC #+END_SRC
*** Open Shell in current directory *** Open Shell in current directory
#+BEGIN_SRC conf #+BEGIN_SRC conf
map s shell $SHELL map s shell $SHELL
# Open External Shell in current directory # Open External Shell in current directory
map S shell nohup termite & map S shell nohup termite &
map r chain draw_possible_programs; console open_with%%space map r chain draw_possible_programs; console open_with%%space
#+END_SRC #+END_SRC
*** Filter *** Filter
#+BEGIN_SRC conf #+BEGIN_SRC conf
map f console filter%space map f console filter%space
# Reset filter # Reset filter
map F filter map F filter
map cd console cd%space
#+END_SRC #+END_SRC
*** Change the line mode *** Change the line mode
#+BEGIN_SRC conf #+BEGIN_SRC conf
map Mf linemode filename map Mf linemode filename
map Mi linemode fileinfo map Mi linemode fileinfo
map Mm linemode mtime map Mm linemode mtime
map Mp linemode permissions map Mp linemode permissions
map Ms linemode sizemtime map Ms linemode sizemtime
map Mt linemode metatitle map Mt linemode metatitle
#+END_SRC #+END_SRC
*** Tagging / Marking *** Tagging / Marking
#+BEGIN_SRC conf #+BEGIN_SRC conf
map t tag_toggle map t tag_toggle
map ut tag_remove map ut tag_remove
map <Space> mark_files toggle=True map <Space> mark_files toggle=True
map v mark_files all=True toggle=True map v mark_files all=True toggle=True
map uv mark_files all=True val=False map uv mark_files all=True val=False
map V toggle_visual_mode map V toggle_visual_mode
map uV toggle_visual_mode reverse=True map uV toggle_visual_mode reverse=True
#+END_SRC #+END_SRC
*** VIM-like *** VIM-like
#+BEGIN_SRC conf #+BEGIN_SRC conf
copymap <UP> k copymap <UP> k
copymap <DOWN> j copymap <DOWN> j
copymap <LEFT> h copymap <LEFT> h
copymap <RIGHT> l copymap <RIGHT> l
copymap <HOME> gg copymap <HOME> gg
copymap <END> G copymap <END> G
copymap <PAGEDOWN> <C-F> copymap <PAGEDOWN> <C-F>
copymap <PAGEUP> <C-B> copymap <PAGEUP> <C-B>
#+END_SRC
*** TODO - Is that usefull?
#+BEGIN_SRC conf
map J move down=0.5 pages=True
map K move up=0.5 pages=True
copymap J <C-D>
copymap K <C-U>
#+END_SRC #+END_SRC
*** Jumping around *** Jumping around
#+BEGIN_SRC conf #+BEGIN_SRC conf
map H history_go -1 map H history_go -1
map L history_go 1 map L history_go 1
map ] move_parent 1 map ] move_parent 1
map [ move_parent -1 map [ move_parent -1
map } traverse map } traverse
#+END_SRC #+END_SRC
*** TODO Go to special folders *** TODO [#A] Go to special folders
#+BEGIN_SRC conf #+BEGIN_SRC conf
map gh cd ~ map cd console cd%space
map gd cd ~/gdrive/These
map gD cd ~/Downloads map gh cd ~
map gm cd ~/MEGA/These
map gd cd ~/Downloads
map gc cd ~/.config/literate-dotfiles/
#+END_SRC #+END_SRC
*** External Programs *** External Programs
#+BEGIN_SRC conf #+BEGIN_SRC conf
map E edit map E edit
#+END_SRC #+END_SRC
*** Get size of folders *** Get size of folders
#+BEGIN_SRC conf #+BEGIN_SRC conf
# Get size of all folders # Get size of all folders
map du shell -p du --max-depth=1 -h --apparent-size map du shell -p du --max-depth=1 -h --apparent-size
# Get size of all folders and sort them # Get size of all folders and sort them
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
#+END_SRC #+END_SRC
*** Yank path of directory/file *** Yank path of directory/file
#+BEGIN_SRC conf #+BEGIN_SRC conf
# Yank path of current directory/file # Yank path of current directory/file
map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
# Yank path of directory # Yank path of directory
map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
# Yank filename # Yank filename
map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
#+END_SRC #+END_SRC
*** Filesystem Operations *** Filesystem Operations
@ -362,168 +360,168 @@ map = chmod
*** TODO Rename *** TODO Rename
#+BEGIN_SRC conf #+BEGIN_SRC conf
#map cw console rename%space #map cw console rename%space
map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ") map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
#+END_SRC #+END_SRC
*** Rename files - like vim bindings *** Rename files - like vim bindings
#+BEGIN_SRC conf #+BEGIN_SRC conf
map a rename_append map a rename_append
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
#+END_SRC #+END_SRC
*** Paste files *** Paste files
#+BEGIN_SRC conf #+BEGIN_SRC conf
map pp paste map pp paste
map po paste overwrite=True map po paste overwrite=True
map pP paste append=True map pP paste append=True
map pO paste overwrite=True append=True map pO paste overwrite=True append=True
map pl paste_symlink relative=False map pl paste_symlink relative=False
map pL paste_symlink relative=True map pL paste_symlink relative=True
map phl paste_hardlink map phl paste_hardlink
map pht paste_hardlinked_subtree map pht paste_hardlinked_subtree
#+END_SRC #+END_SRC
*** Delete and move files *** Delete and move files
#+BEGIN_SRC conf #+BEGIN_SRC conf
map dD console delete map dD console delete
map dd cut map dd cut
map ud uncut map ud uncut
map da cut mode=add map da cut mode=add
map dr cut mode=remove map dr cut mode=remove
map dt cut mode=toggle map dt cut mode=toggle
#+END_SRC #+END_SRC
*** Copy files *** Copy files
#+BEGIN_SRC conf #+BEGIN_SRC conf
map yy copy map yy copy
map uy uncut map uy uncut
map ya copy mode=add map ya copy mode=add
map yr copy mode=remove map yr copy mode=remove
map yt copy mode=toggle map yt copy mode=toggle
#+END_SRC #+END_SRC
*** Temporary workarounds *** Temporary workarounds
#+BEGIN_SRC conf #+BEGIN_SRC conf
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
#+END_SRC #+END_SRC
*** Searching *** Searching
#+BEGIN_SRC conf #+BEGIN_SRC conf
map / console search%space map / console search%space
map n search_next map n search_next
map N search_next forward=False map N search_next forward=False
map ct search_next order=tag map ct search_next order=tag
map cs search_next order=size map cs search_next order=size
map ci search_next order=mimetype map ci search_next order=mimetype
map cc search_next order=ctime map cc search_next order=ctime
map cm search_next order=mtime map cm search_next order=mtime
map ca search_next order=atime map ca search_next order=atime
#+END_SRC #+END_SRC
*** Tabs *** Tabs
#+BEGIN_SRC conf #+BEGIN_SRC conf
map <C-n> tab_new ~ map <C-n> tab_new ~
map <C-w> tab_close map <C-w> tab_close
map <TAB> tab_move 1 map <TAB> tab_move 1
map <S-TAB> tab_move -1 map <S-TAB> tab_move -1
map <A-Right> tab_move 1 map <A-Right> tab_move 1
map <A-Left> tab_move -1 map <A-Left> tab_move -1
map gt tab_move 1 map gt tab_move 1
map gT tab_move -1 map gT tab_move -1
map gn tab_new ~ map gn tab_new ~
map gc tab_close map gc tab_close
map uq tab_restore map uq tab_restore
map <a-1> tab_open 1 map <a-1> tab_open 1
map <a-2> tab_open 2 map <a-2> tab_open 2
map <a-3> tab_open 3 map <a-3> tab_open 3
map <a-4> tab_open 4 map <a-4> tab_open 4
map <a-5> tab_open 5 map <a-5> tab_open 5
map <a-6> tab_open 6 map <a-6> tab_open 6
map <a-7> tab_open 7 map <a-7> tab_open 7
map <a-8> tab_open 8 map <a-8> tab_open 8
map <a-9> tab_open 9 map <a-9> tab_open 9
#+END_SRC #+END_SRC
*** Sorting *** Sorting
#+BEGIN_SRC conf #+BEGIN_SRC conf
map or set sort_reverse! map or set sort_reverse!
map oz set sort=random map oz set sort=random
map os chain set sort=size; set sort_reverse=False map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False map on chain set sort=natural; set sort_reverse=False
map om chain set sort=mtime; set sort_reverse=False map om chain set sort=mtime; set sort_reverse=False
map oc chain set sort=ctime; set sort_reverse=False map oc chain set sort=ctime; set sort_reverse=False
map oa chain set sort=atime; set sort_reverse=False map oa chain set sort=atime; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False map ot chain set sort=type; set sort_reverse=False
map oe chain set sort=extension; set sort_reverse=False map oe chain set sort=extension; set sort_reverse=False
map oS chain set sort=size; set sort_reverse=True map oS chain set sort=size; set sort_reverse=True
map oB chain set sort=basename; set sort_reverse=True map oB chain set sort=basename; set sort_reverse=True
map oN chain set sort=natural; set sort_reverse=True map oN chain set sort=natural; set sort_reverse=True
map oM chain set sort=mtime; set sort_reverse=True map oM chain set sort=mtime; set sort_reverse=True
map oC chain set sort=ctime; set sort_reverse=True map oC chain set sort=ctime; set sort_reverse=True
map oA chain set sort=atime; set sort_reverse=True map oA chain set sort=atime; set sort_reverse=True
map oT chain set sort=type; set sort_reverse=True map oT chain set sort=type; set sort_reverse=True
map oE chain set sort=extension; set sort_reverse=True map oE chain set sort=extension; set sort_reverse=True
map dc get_cumulative_size map dc get_cumulative_size
#+END_SRC #+END_SRC
*** Settings *** Settings
#+BEGIN_SRC conf #+BEGIN_SRC conf
map zc set collapse_preview! map zc set collapse_preview!
map zd set sort_directories_first! map zd set sort_directories_first!
map zh set show_hidden! map zh set show_hidden!
map <C-h> set show_hidden! map <C-h> set show_hidden!
map zI set flushinput! map zI set flushinput!
map zi set preview_images! map zi set preview_images!
map zm set mouse_enabled! map zm set mouse_enabled!
map zp set preview_files! map zp set preview_files!
map zP set preview_directories! map zP set preview_directories!
map zs set sort_case_insensitive! map zs set sort_case_insensitive!
map zu set autoupdate_cumulative_size! map zu set autoupdate_cumulative_size!
map zv set use_preview_script! map zv set use_preview_script!
map zf console filter%space map zf console filter%space
#+END_SRC #+END_SRC
*** Bookmarks *** Bookmarks
#+BEGIN_SRC conf #+BEGIN_SRC conf
map `<any> enter_bookmark %any map `<any> enter_bookmark %any
map '<any> enter_bookmark %any map '<any> enter_bookmark %any
map m<any> set_bookmark %any map m<any> set_bookmark %any
map um<any> unset_bookmark %any map um<any> unset_bookmark %any
map m<bg> draw_bookmarks map m<bg> draw_bookmarks
copymap m<bg> um<bg> `<bg> '<bg> copymap m<bg> um<bg> `<bg> '<bg>
#+END_SRC #+END_SRC
*** Custom Mapping *** Custom Mapping
#+BEGIN_SRC conf #+BEGIN_SRC conf
map <C-f> fzf_select map <C-f> fzf_select
#+END_SRC #+END_SRC
*** Generate all the chmod bindings with some python help: *** Generate all the chmod bindings with some python help:
#+BEGIN_SRC conf #+BEGIN_SRC conf
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
#+END_SRC #+END_SRC
** Define keys for the console ** Define keys for the console

View File

@ -151,250 +151,6 @@
} }
#+END_SRC #+END_SRC
* Rofi Menu Config
:PROPERTIES:
:header-args: :tangle ~/.config/rofimenu/rofimenu.config
:header-args+: :comments none :mkdirp yes
:END:
#+BEGIN_SRC conf
#!/bin/bash
# =============================================================
# Configuration file for rofimenu script
#
# Top level menu consists of modi names from modilist.
# Modilist is a comma separated list of default modi (drun,run...) and/or custom modi.
# Names of default modi can be set as rofi options (e.g. -display-drun Applications).
# Custom modi format: "modi_name:modi_script".
# Menu functions from this script can be used as modi like this "<menu_name>:$thisscript -menu <menu_function>"
# =============================================================
# pause needed for smooth transition when menu command refers to other modi
DELAY=0.06
delay() {
sleep $DELAY
}
# define modi labels for menu
FAV=" Favourites"
DRUN=" Applications"
CAT=" Categories"
RUN=" Run"
MENU=" Edit Menu"
EXIT=" Exit"
modilist="\
$FAV:$thisscript -menu ${FAV#* },\
drun,\
$CAT:$thisscript -menu ${CAT#* },\
run,\
$MENU:$thisscript -menu Menu_settings,\
$EXIT:$thisscript -menu ${EXIT#* }"
# Menu functions print lines in format "label:command".
Menu_settings() {
echo " Edit config:$GUI_EDITOR $ROFIMENU_CONFIG && $thisscript -show \'$MENU\'"
echo " Reset config:rm $ROFIMENU_CONFIG && delay; $thisscript -show \'$MENU\'"
echo "──────────────:true"
echo " Edit theme:$GUI_EDITOR $ROFIMENU_THEME && $thisscript -show \'$MENU\'"
echo " Reset theme:rm $ROFIMENU_THEME && delay; $thisscript -show \'$MENU\'"
}
Favourites() {
echo " Terminal:default-terminal"
echo " File Manager:xdg-open ~"
echo " Browser:default-browser"
echo " Settings:default-terminal -e bmenu"
echo " Search:rofi-finder.sh"
# echo "$EXIT: delay; delay; $thisscript -show \'$EXIT\'" # This refers to modi from the same script; needs delay
}
Exit() {
echo " lock:screenlock"
echo " suspend:systemctl suspend"
echo " hibernate:systemctl hibernate"
echo " logout:xdotool key --clearmodifiers super+shift+q"
echo " reboot:systemctl reboot"
echo " poweroff:systemctl poweroff"
}
Categories() {
SUBMENU_MARK=""
IFS='
'
# Newline separated list, each line has format "[symbol ][alias:]category"
# Category with alias will be shown in menu under that alias
# The first entry below is an alias for " " so it shows all applications
desired="\
 Applications:
 Favorites
 Accessories:Utility
 Development
 Documentation
 Education
 Graphics
 Internet:Network
 Multimedia:AudioVideo
 Office
 Settings
 System"
# determine max line length and set tab position for subcategory mark
maxlength=0
for line in $desired ; do
label="${line%:*}"
if [ ${#label} -gt $maxlength ] ; then
maxlength=${#label}
fi
done
submenu_tab=$(($maxlength+3))
present="$(grep Categories /usr/share/applications/*.desktop \
| cut -d'=' -f2 \
| sed 's/;/\n/g' \
| LC_COLLATE=POSIX sort --ignore-case --unique)"
linenumber=0
for line in $desired ; do
category="${line##*[ :]}"
label="$(echo -e ${line%:*}\\t${SUBMENU_MARK} | expand -t $submenu_tab)" ## add submenu mark
if [ $(echo "$present"|grep -w -c "$category") -gt 0 ] ; then
echo "$label:activate_category \"$label\" \"$category\" $linenumber"
linenumber=$(($linenumber+1))
fi
done
}
# Desktop menu parameters
DT_MODI="Desktop:$thisscript -menu Desktop"
Desktop() {
echo " Terminal:default-terminal"
echo " File Manager:xdg-open ~"
echo " Browser:default-browser"
#TODO determine number of lines before categories
addlinenumber=3
eval $(xdotool search --class rofi getwindowgeometry --shell)
Categories|sed "s/\$/ $addlinenumber $X $Y/" # pass additional lines number, X, Y
echo " Search:rofi-finder.sh"
}
DT_WIDTH=200 # pixels
##TODO determine desktop menu line height according to theme
DT_LINE_HEIGHT=23 # pixels
DT_THEME="
*{
lines: 20;
scrollbar: false;
dynamic: true;
}
#window {
width: ${DT_WIDTH}px;
children: [ dt-mainbox ];
}
#sidebar {
enabled: false;
}
#button {
width: ${DT_WIDTH}px;
padding: 2px 1ch;
}
#inputbar {
enabled: false;
}"
activate_category() { # shows drun modi filtered with category. If no command selected, returns to categories modi
label="${1% *}" # remove submenu mark
category="$2"
linenumber="$3"
theme=""
goback="$thisscript -show \"$CAT\""
if [ $# -gt 3 ] ; then # that means categories for desktop menu, number of lines before categories, X, Y
addlinenumber=$4
X=$5
Y=$6
linenumber=$(($linenumber+$addlinenumber))
if [ $linenumber -gt 0 ] ; then
i=$linenumber
dummy="true"
dummyline="textboxdummy"
while [ $i -gt 1 ] ; do
dummyline="textboxdummy,$dummyline"
i=$(($i-1))
done
else
dummy="false"
fi
# adjust X if too close to the right side of the screen
MAX_X=$(wattr w $(lsw -r) )
anchor="north"
if [ $X -gt $((${MAX_X}-${DT_WIDTH}*2)) ] ; then
anchor="${anchor}east"
X=$MAX_X
else
anchor="${anchor}west"
fi
theme="$DT_THEME
* {
x-offset: $X;
y-offset: $Y;
anchor: $anchor;
}
#window {
width: $((${DT_WIDTH}*2));
}
#sidebar {
enabled: true;
}
#boxdummy {
enabled: $dummy;
children: [ $dummyline ];
}"
goback="$thisscript -desktop $X $Y"
fi
command=$(delay; $thisscript \
-only drun \
-drun-match-fields categories,name \
-display-drun "$label" \
-filter "$category " \
-run-command "echo {cmd}" \
-run-shell-command "echo {terminal} -e {cmd}" \
-theme-str "$theme")
if [ -n "$command" ] ; then
eval "$command" &
exit
fi
# return to categories modi. No delay needed
eval $goback &
if [ $linenumber -eq 0 ] ; then # if the category is on the top line
exit
fi
# move rofi selection down by linenumber
keys=""
while [ $linenumber -gt 0 ] ; do
keys="$keys Tab"
linenumber=$(($linenumber-1))
done
##TODO wait until rofi can take input
delay
delay
xdotool search --class rofi key --delay 0 $keys
}
## rofi theme file can be set here
# ROFIMENU_THEME="$HOME/.config/rofimenu/rofimenu.rasi"
#+END_SRC
* Theme * Theme
:PROPERTIES: :PROPERTIES:
:header-args: :tangle ~/.config/rofimenu/rofimenu.rasi :header-args: :tangle ~/.config/rofimenu/rofimenu.rasi

285
dotfiles/scripts.org Normal file
View File

@ -0,0 +1,285 @@
#+TITLE: Scripts
* Wallpapers
:PROPERTIES:
:header-args: :tangle ~/scripts/wallpapers.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
while true; do
nitrogen --set-zoom-fill --random ".wallpapers"
sleep 10m
done
#+end_src
* TODO [#A] LockScreen
:PROPERTIES:
:header-args: :tangle ~/scripts/lockscreen.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
- [ ] Does not work well with multiple screen
#+begin_src bash
revert() {
xset dpms 0 0 0
}
trap revert HUP INT TERM
# turn off screen after 5 seconds
xset +dpms dpms 5 5 5
# Parameters
temp_file="/tmp/screen.png"
icon="$HOME/Pictures/Evil_Rick_Sprite.png"
width=1920
height=1080
blur_factor=6
lock_blur_factor=0
# Take the screen shot, blur the image and add the icon
ffmpeg -f x11grab -video_size "${width}x${height}" -y -i $DISPLAY -i $icon -filter_complex "boxblur=$blur_factor:$blur_factor,overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,boxblur=$lock_blur_factor:$lock_blur_factor" -vframes 1 $temp_file
# Alternative
# scrot -d 1 $temp_file
# convert -blur 0x8 $temp_file $temp_file
# convert -composite $temp_file $icon -gravity South -geometry -20x1200 $temp_file
# Lock the screen with the image
i3lock --no-unlock-indicator --ignore-empty-password --show-failed-attempts --nofork --image=$temp_file
# Remove the screenshot
rm $temp_file
# Don't turn off screen when back from lock
revert
#+end_src
* Delete first page of PDF
:PROPERTIES:
:header-args: :tangle ~/scripts/pdf-delete-first-page.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
The requirement is to have =pdftk= installed.
#+begin_src bash
if [[ -f $1 && $1 == *.pdf ]]; then
# Argument if a file
pdftk "$1" cat 2-end output /tmp/pdftk_out.pdf && mv /tmp/pdftk_out.pdf "$1"
fi
#+end_src
* Take Screenshot
:PROPERTIES:
:header-args: :tangle ~/scripts/screenshot.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
status=$(echo -e "All\nSelection\nCopy\nShadow\nActive" | rofi -i -dmenu)
name=$(echo -e "screenshot-$(date +"%m-%d-%y_%H-%M-%S")" | rofi -i -dmenu)
case "$status" in
"All")
maim ~/Pictures/$name.png ;;
"Selection")
maim -s ~/Pictures/$name.png ;;
"Copy")
maim -s | xclip -selection clipboard -t image/png ;;
"Shadow")
maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage ~/Pictures/$name.png ;;
"Active")
maim -i $(xdotool getactivewindow) ~/Pictures/$name.png ;;
esac
#+end_src
#+RESULTS:
* Lock / Exit / Suspend / ...
:PROPERTIES:
:header-args: :tangle ~/scripts/quit.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
option=$(echo -e "Lock\nExit\nLogout\nSuspend\nHibernate\nReboot\nShutdown" | rofi -i -dmenu)
case "$option" in
"Lock")
i3exit lock ;;
"Exit")
i3exit switch_user ;;
"Logout")
i3exit logout ;;
"Suspend")
i3exit suspend ;;
"Hibernate")
i3exit hibernate ;;
"Reboot")
i3exit reboot ;;
"Shutdown")
i3exit shutdown ;;
esac
#+end_src
#+RESULTS:
* TODO [#C] Copy Figures
:PROPERTIES:
:header-args: :tangle ~/scripts/cp-figs.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
Things to do:
- [ ] Display all the figures at once and ask for confirmation to copy them all
- [ ] Display the not found figures
#+begin_src bash :results output
latexpath="$HOME/MEGA/These/LaTeX/ressources/Figures";
figures=`awk 'match($0, /(fig.*\.(png|svg|pdf))/, a) {print a[1];}' $1 \
| awk '{ print gensub(/\s*\]\]\s*\|\s*\[\[\s*\.?\/?/, "\n", "g") }'`;
for figure in $figures
do
figurename=`echo $figure | awk 'match($0, /(fig.*\/)(.*\.(png|svg|pdf))/, a) {print a[2];}'`;
if [ -f $latexpath/$figurename ]
then
figurepath=`echo $figure | awk 'match($0, /(fig.*)\/(.*\.(png|svg|pdf))/, a) {print a[1];}'`;
# echo $latexpath/$figurename
# echo $figurepath/$figurename
cp $latexpath/$figurename $figurepath/$figurename
# read -r -p "Are You Sure? [Y/n] " input
# case $input in
# [yY][eE][sS]|[yY])
# cp $latexpath/$figurename $figurepath/$figurename
# ;;
# [nN][oO]|[nN])
# exit 1
# ;;
# *)
# echo "Invalid input..."
# exit 1
# ;;
# esac
fi
done
#+end_src
#+RESULTS:
#+begin_example
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/classical_feedback_alt.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/classical_feedback_2dof_alt.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/classical_feedback_sep.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/classical_feedback_bis.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/general_control_names.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/general_plant_weights.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/general_control_Mdelta.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/classical_feedback_stability.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/classical_feedback_meas.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/input_output_uncertainty.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/input_uncertainty_set.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/input_uncertainty_set_feedback.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/inverse_uncertainty_set.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/general_control_delta.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/general_control_Ndelta.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/general_control_Mdelta.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/additive_uncertainty.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/input_uncertainty.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/output_uncertainty.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/inv_additive_uncertainty.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/inv_input_uncertainty.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/inv_output_uncertainty.pdf
/home/tdehaeze/MEGA/These/LaTeX/ressources/Figures/input_uncertainty_set_feedback_weight.pdf
#+end_example
* NAS
** Mount
:PROPERTIES:
:header-args: :tangle ~/scripts/nas.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
if [ $1 == "mount" ]; then
if sudo -A mount 192.168.1.2:/volume1/Downloads/ /mnt/NAS/; then
dunstify --replace=58249 'NAS' 'Successfully mounted'
else
dunstify --replace=58249 'NAS' 'Error while mounted'
fi
elif [ $1 == "umount" ]; then
if sudo -A umount /mnt/NAS/; then
dunstify --replace=58249 'NAS' 'Successfully unmounted'
else
dunstify --replace=58249 'NAS' 'Error while unmounted'
fi
fi
#+end_src
* Buku Git Push
:PROPERTIES:
:header-args: :tangle ~/scripts/buku_git_push.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
cd ~/.local/share/buku/
if [[ ! -z $(git status -s bookmarks.db) ]]
then
git add bookmarks.db
git commit -m "Changed bookmarks - $(date +%F)"
git push
dunstify --replace=79248 "Buku Git" "Updated"
exit
fi
#+end_src
* Icons Unicode
:PROPERTIES:
:header-args: :tangle ~/scripts/icons.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
command -v xclip >/dev/null 2>&1 || { echo >&2 "I require xclip but it's not installed. Aborting."; exit 1; }
chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20)
[ "$chosen" != "" ] || exit
c=$(echo "$chosen" | sed "s/ .*//")
echo "$c" | tr -d '\n' | xclip -selection clipboard
dunstify --replace=05896 "'$c' copied to clipboard." &
#+end_src
* Make GIF
:PROPERTIES:
:header-args: :tangle ~/scripts/gifenc.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
#+begin_src bash
palette="/tmp/palette.png"
filters="fps=15,scale=320:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
#+end_src
* Org-Capture
:PROPERTIES:
:header-args: :tangle ~/scripts/org-capture-selection.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
xclip -o -selection primary | xclip -o -selection clipboard -i
emacsclient -ne '(org-capture "" "Q")' && dunstify "Emacs" "Text Successfully Captured"
#+end_src

View File

@ -146,7 +146,7 @@
# ============================================================= # =============================================================
# Notification # Notification
if [ "$new" -gt 0 ]; then if [ "$new" -gt 0 ]; then
notify-send 'New mail' " $esrf_new  $gmail_new  $ulg_new" dunstify --replace=98465 'New mail' " $esrf_new  $gmail_new  $ulg_new"
fi fi
# ============================================================= # =============================================================
@ -155,9 +155,9 @@
# notmuch new # notmuch new
# mu index --maildir=~/.mail --quiet # mu index --maildir=~/.mail --quiet
# Update on Emacs # Update on Emacs
if [ "$(($new-$old))" -gt 0 ]; then # if [ "$(($new-$old))" -gt 0 ]; then
emacsclient --eval '(mu4e-update-index)'; # emacsclient --eval '(mu4e-update-index)';
fi # fi
# ============================================================= # =============================================================
#+end_src #+end_src
@ -218,8 +218,8 @@
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
[Service] [Service]
Type=simple Type=forking
ExecStart=/usr/bin/emacs --fg-daemon ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)" ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Environment=SSH_AUTH_SOCK=%t/keyring/ssh Environment=SSH_AUTH_SOCK=%t/keyring/ssh
Restart=on-failure Restart=on-failure
@ -263,6 +263,7 @@
[Install] [Install]
WantedBy=timers.target WantedBy=timers.target
#+end_src #+end_src
* Weechat * Weechat
** Service ** Service
:PROPERTIES: :PROPERTIES:
@ -322,3 +323,44 @@
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
#+end_src #+end_src
* NCMPCPP
** Service
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/ncmpcpp.service
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Unit]
Description=Ncmpcpp - Music Player
[Service]
Type=forking
ExecStart=/usr/bin/tmux -L ncmpcpp new -d -s ncmpcpp ncmpcpp
ExecStop=/usr/bin/tmux -L ncmpcpp kill-session -t ncmpcpp
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
#+end_src
* Newsboat
** Service - tmux
:PROPERTIES:
:header-args: :tangle ~/.config/systemd/user/newsboat.service
:header-args+: :comments both :mkdirp yes
:END:
#+begin_src conf
[Unit]
Description=Newsboat - RSS reader
[Service]
Type=forking
ExecStart=/usr/bin/tmux -L newsboat new -d -s newsboat newsboat
ExecStop=/usr/bin/tmux -L newsboat kill-session -t newsboat
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
#+end_src

View File

@ -57,18 +57,24 @@
# Base16 Gruvbox dark, soft # Base16 Gruvbox dark, soft
# Author: Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) # Author: Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
# fg2
foreground = #d5c4a1 foreground = #d5c4a1
# fg1
foreground_bold = #ebdbb2 foreground_bold = #ebdbb2
cursor = #ebdbb2 cursor = #ebdbb2
# bg0_s
cursor_foreground = #32302f cursor_foreground = #32302f
background = rgba(50, 48, 47) background = #32302f
# 16 color space # 16 color space
# Black, Gray, Silver, White # bg0_s
color0 = #32302f color0 = #32302f
# bg3
color8 = #665c54 color8 = #665c54
# fb2
color7 = #d5c4a1 color7 = #d5c4a1
# fg0
color15 = #fbf1c7 color15 = #fbf1c7
# Red # Red
@ -96,10 +102,16 @@
color14 = #8ec07c color14 = #8ec07c
# Extra colors # Extra colors
# orange
color16 = #fe8019 color16 = #fe8019
# orange
color17 = #d65d0e color17 = #d65d0e
# bg1
color18 = #3c3836 color18 = #3c3836
# bg2
color19 = #504945 color19 = #504945
# fg3
color20 = #bdae93 color20 = #bdae93
# fg
color21 = #ebdbb2 color21 = #ebdbb2
#+END_SRC #+END_SRC

View File

@ -3,116 +3,56 @@
#+PROPERTY: header-args+ :comments both :mkdirp yes #+PROPERTY: header-args+ :comments both :mkdirp yes
* Line * Line
** Define colors #+begin_src conf
#+BEGIN_SRC conf # Activate the status bar
t_red="#ef5253" # red set -g status "on"
t_red_light="#eb9798" # light red
t_red_dark="#c22627" # dark red
t_blue="#579cde" # blue # default statusbar color
set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
t_orange="#de9a57" # default window title colors
t_green="#57de9a" set-window-option -g window-status-style bg=colour214,fg=colour237 # bg=yellow, fg=bg1
t_grey_dark="#393939" # dark grey # default window with an activity alert
t_grey_light="#d9d9d9" # light grey set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3
t_grey="#ababab" # grey
t_1l_bg="#ef5253" # red # active window title colors
t_1l_fg="#393939" # dark grey set-window-option -g window-status-current-style bg=red,fg=colour237 # fg=bg1
t_2l_bg="#4e4e4e" # dark grey
t_2l_fg="#e8e8e8" # grey
t_3l_bg="#ababab" # grey
t_3l_fg="#393939" # dark grey
t_4l_bg="#579cde" # blue
t_4l_fg="#393939" # dark grey
t_1r_bg="#909090" # pane border
t_1r_fg="#393939" set-option -g pane-active-border-style fg=colour250 #fg2
t_2r_bg="#4e4e4e" set-option -g pane-border-style fg=colour237 #bg1
t_2r_fg="#a0a0a0"
t_3r_bg="#ababab" # grey
t_3r_fg="#393939" # dark grey
t_line_bg="#18262f" # dark blue # message infos
t_line_fg="#393939" # dark grey set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
t_win_bg="#18262f" # dark blue # writing commands inactive
t_win_fg="#d9d9d9" # light grey set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
t_win_bg_active="#ef5253" # red # pane number display
t_win_fg_active="#393939" # dark grey set-option -g display-panes-active-colour colour250 #fg2
set-option -g display-panes-colour colour237 #bg1
t_text_fg="#d9d9d9" # light grey # clock
t_text_bg="#393939" # dark grey set-window-option -g clock-mode-colour colour109 #blue
#+END_SRC
** General config # bell
#+BEGIN_SRC conf set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
set -g status "on" # Activate the status bar
set -g status-attr "none"
set -g status-interval "2" # update status every x seconds
set -g status-justify "centre" # center the list of windows ## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
set-option -g status-justify "left"
set-option -g status-left-style none
set-option -g status-left-length "80"
set-option -g status-right-style none
set-option -g status-right-length "80"
set-window-option -g window-status-separator ""
set -g status-bg "$t_line_bg" set-option -g status-left "#[fg=colour248, bg=colour241] #S #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]"
set -g status-fg "$t_line_fg" set-option -g status-right "#[fg=colour239, bg=colour237, nobold, nounderscore, noitalics]#[fg=colour246,bg=colour239] %Y-%m-%d  %H:%M #[fg=colour248, bg=colour239, nobold, noitalics, nounderscore]#{?client_prefix,#[fg=colour214],}#[fg=colour237, bg=colour248]#{?client_prefix,#[bg=colour214],} #h "
#+END_SRC
** Contents of right and light status
#+BEGIN_SRC conf
t_1_l="#S"
t_2_l="%H:%M"
# t_3_l="#($HOME/.config/.tmux/bin/tmux_left_status)"
t_4_l="C"
t_1_r="%d/%m"
# t_2_r="#($HOME/.config/.tmux/bin/tmux_right_status)"
# t_3_r=""
#+END_SRC
** Status left and right
#+BEGIN_SRC conf
set -g status-left "#[fg=$t_1l_fg,bg=$t_1l_bg] $t_1_l #[fg=$t_1l_bg,bg=$t_2l_bg]#[fg=$t_2l_fg,bg=$t_2l_bg] $t_2_l #{?client_prefix,#[fg=$t_2l_bg]#[bg=$t_4l_bg]#[fg=$t_4l_fg]#[bg=$t_4l_bg] $t_4_l #[fg=$t_4l_bg]#[bg=$t_line_bg],#[fg=$t_2l_bg]#[bg=$t_line_bg]}"
# set -g status-left "#[fg=$t_1l_fg,bg=$t_1l_bg] $t_1_l #[fg=$t_1l_bg,bg=$t_2l_bg]#[fg=$t_2l_fg,bg=$t_2l_bg] $t_2_l #[fg=$t_2l_bg,bg=$t_3l_bg]#[fg=$t_2l_bg, bg=$t_3l_bg]$t_3_l#{?client_prefix,#[fg=$t_3l_bg]#[bg=$t_4l_bg]#[fg=$t_4l_fg]#[bg=$t_4l_bg] $t_4_l #[fg=$t_4l_bg]#[bg=$t_line_bg],#[fg=$t_3l_bg]#[bg=$t_line_bg]}"
set -g status-left-length "90"
set -g status-left-attr "none"
set -g status-right "#[fg=$t_1r_bg]#[fg=$t_1r_fg,bg=$t_1r_bg] $t_1_r "
# set -g status-right "#[fg=$t_3r_bg,bg=$t_line_bg]#[fg=$t_3r_fg, bg=$t_3r_bg] $t_3_r #[fg=$t_2r_bg,bg=$t_3r_bg]#[fg=$t_2r_fg,bg=$t_2r_bg] $t_2_r #[fg=$t_1r_bg,bg=$t_2r_bg]#[fg=$t_1r_fg,bg=$t_1r_bg] $t_1_r "
set -g status-right-length "90"
set -g status-right-attr "none"
#+END_SRC
** Message and commands
#+BEGIN_SRC conf
set -g message-fg "$t_text_fg"
set -g message-bg "$t_text_bg"
set -g message-command-fg "$t_text_fg"
set -g message-command-bg "$t_text_bg"
#+END_SRC
** Panes
#+BEGIN_SRC conf
set -g pane-border-fg "$t_grey_dark" # Color of the separation between panes
set -g pane-active-border-fg "$t_red_light" # Color of the active separation
#+END_SRC
** Windows
#+BEGIN_SRC conf
setw -g window-status-fg "$t_red"
setw -g window-status-bg "$t_grey_light"
setw -g window-status-attr "none"
setw -g window-status-activity-fg "$t_grey_dark"
setw -g window-status-activity-bg "$t_red"
setw -g window-status-activity-attr "bold"
setw -g window-status-separator " "
setw -g window-status-format "#[fg=$t_win_fg,bg=$t_win_bg] #I | #W "
setw -g window-status-current-format "#[fg=$t_win_bg_active,bg=$t_line_bg]#[fg=$t_win_fg_active,bg=$t_win_bg_active] #I | #W #[fg=$t_win_bg_active,bg=$t_line_bg]"
#+END_SRC
set-window-option -g window-status-current-format "#[fg=colour237, bg=colour214, nobold, noitalics, nounderscore]#[fg=colour239, bg=colour214] #I #[fg=colour239, bg=colour214, bold] #W #[fg=colour214, bg=colour237, nobold, noitalics, nounderscore]"
set-window-option -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour223,bg=colour239] #I #[fg=colour223, bg=colour239] #W #[fg=colour239, bg=colour237, noitalics]"
#+end_src
* Bindings * Bindings
#+BEGIN_SRC conf #+BEGIN_SRC conf
# Set prefix to 'C-Space' # Set prefix to 'C-Space'
@ -256,6 +196,9 @@
# Show bells in window titles # Show bells in window titles
set -g window-status-bell-style fg=yellow,bold,underscore set -g window-status-bell-style fg=yellow,bold,underscore
# Causes tmux to resize a window based on the smallest client actually viewing it, not on the smallest one attached to the entire session
set-window-option -g aggressive-resize
#+END_SRC #+END_SRC
* Plugins * Plugins

View File

@ -1,7 +1,9 @@
#+TITLE: Vim Config #+TITLE: Vim Config
:DRAWER:
#+PROPERTY: header-args+ :comments none #+PROPERTY: header-args+ :comments none
#+PROPERTY: header-args+ :mkdirp yes #+PROPERTY: header-args+ :mkdirp yes
#+PROPERTY: header-args+ :tangle ~/.vimrc #+PROPERTY: header-args+ :tangle ~/.vimrc
:END:
* Plugins Install * Plugins Install
** Plug start ** Plug start
@ -27,7 +29,7 @@
** Git ** Git
#+BEGIN_SRC conf #+BEGIN_SRC conf
" Plug 'jreybert/vimagit' Plug 'jreybert/vimagit'
Plug 'tpope/vim-fugitive' " A Git wrapper so awesome, it should be illegal Plug 'tpope/vim-fugitive' " A Git wrapper so awesome, it should be illegal
Plug 'junegunn/gv.vim' " A git commit browser Plug 'junegunn/gv.vim' " A git commit browser
Plug 'mhinz/vim-signify' " Show a diff using Vim its sign column Plug 'mhinz/vim-signify' " Show a diff using Vim its sign column
@ -260,6 +262,9 @@ set relativenumber
" Smarter J and K navigation " Smarter J and K navigation
nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
set splitbelow splitright
#+END_SRC #+END_SRC
** Foldings ** Foldings
@ -275,13 +280,14 @@ endif
** Colors and Fonts ** Colors and Fonts
#+BEGIN_SRC conf #+BEGIN_SRC conf
" Theme
syntax enable syntax enable
set background=dark set background=dark
let base16colorspace=256 let base16colorspace=256
let g:gruvbox_contrast_dark = 'soft'
try try
colorscheme gruvbox colorscheme gruvbox
catch catch
@ -444,23 +450,23 @@ endtry
* Mappings * Mappings
** Normal mode related ** Normal mode related
#+BEGIN_SRC conf #+BEGIN_SRC conf
" Smart way to move between windows " Smart way to move between windows
noremap <C-j> <C-W>j noremap <C-j> <C-W>j
noremap <C-k> <C-W>k noremap <C-k> <C-W>k
noremap <C-h> <C-W>h noremap <C-h> <C-W>h
noremap <C-l> <C-W>l noremap <C-l> <C-W>l
#+END_SRC #+END_SRC
** Insert mode related ** Insert mode related
#+BEGIN_SRC conf #+BEGIN_SRC conf
" Paste while in insert mode " Paste while in insert mode
inoremap <C-v> <C-r>* inoremap <C-v> <C-r>*
" Go to the end of line " Go to the end of line
inoremap <C-e> <Esc>A inoremap <C-e> <Esc>A
" Go to the beginning of line " Go to the beginning of line
inoremap <C-a> <Esc>I inoremap <C-a> <Esc>I
#+END_SRC #+END_SRC
** Visual mode related ** Visual mode related
@ -508,6 +514,18 @@ tnoremap <C-w>k <C-\><C-n><C-w>k
tnoremap <C-w>l <C-\><C-n><C-w>l tnoremap <C-w>l <C-\><C-n><C-w>l
#+END_SRC #+END_SRC
** Correct misspelled works
Taken from: https://vi.stackexchange.com/questions/68/autocorrect-spelling-mistakes
#+BEGIN_SRC conf
" Go back to last misspelled word and pick first suggestion.
inoremap <C-L> <C-G>u<Esc>[s1z=`]a<C-G>u
" Select last misspelled word (typing will edit).
nnoremap <C-K> <Esc>[sve<C-G>
inoremap <C-K> <Esc>[sve<C-G>
snoremap <C-K> <Esc>b[sviw<C-G>
#+END_SRC
* Filetypes * Filetypes
** Vim Which Key ** Vim Which Key
#+BEGIN_SRC conf #+BEGIN_SRC conf
@ -516,6 +534,10 @@ nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
let g:which_key_map_local = {} let g:which_key_map_local = {}
#+END_SRC #+END_SRC
** Mails
#+begin_src conf
autocmd FileType mail set spell spelllang=en_us,fr
#+end_src
** MarkDown ** MarkDown
#+BEGIN_SRC conf #+BEGIN_SRC conf
" Automatically turn on spell-checking for Markdown files " Automatically turn on spell-checking for Markdown files
@ -777,7 +799,7 @@ let g:indentLine_color_term = 239
let g:webdevicons_enable_ctrlp = 1 let g:webdevicons_enable_ctrlp = 1
#+END_SRC #+END_SRC
** TODO [#B] junegunn/goyo.vim ** junegunn/goyo.vim
#+BEGIN_SRC conf #+BEGIN_SRC conf
let g:goyo_width=100 let g:goyo_width=100
let g:goyo_margin_top = 2 let g:goyo_margin_top = 2
@ -834,9 +856,9 @@ let g:tex_conceal = ""
** Neomake ** Neomake
#+BEGIN_SRC conf #+BEGIN_SRC conf
" Latex " Latex
autocmd! BufWritePost *.tex Neomake autocmd! BufWritePost *.tex Neomake
let g:neomake_tex_chktex_maker = { let g:neomake_tex_chktex_maker = {
\ 'exe': 'chktex', \ 'exe': 'chktex',
\ 'args': ['--inputfiles'], \ 'args': ['--inputfiles'],
\ 'errorformat': \ 'errorformat':
@ -847,52 +869,52 @@ let g:neomake_tex_chktex_maker = {
\ '%-G%.%#' \ '%-G%.%#'
\ } \ }
let g:neomake_tex_enabled_makers = ['chktex'] let g:neomake_tex_enabled_makers = ['chktex']
" Matlab " Matlab
autocmd! BufWritePost *.m Neomake autocmd! BufWritePost *.m Neomake
let g:neomake_matlab_mlint_maker = { let g:neomake_matlab_mlint_maker = {
\ 'exe': 'mlint', \ 'exe': 'mlint',
\ 'mapexpr': "neomake_bufname.':'.v:val", \ 'mapexpr': "neomake_bufname.':'.v:val",
\ 'errorformat': \ 'errorformat':
\ '%f:L %l (C %c): %m,' . \ '%f:L %l (C %c): %m,' .
\ '%f:L %l (C %c-%*[0-9]): %m,', \ '%f:L %l (C %c-%*[0-9]): %m,',
\ } \ }
let g:neomake_matlab_enabled_makers = ['mlint'] let g:neomake_matlab_enabled_makers = ['mlint']
#+END_SRC #+END_SRC
** lervag/vimtex ** lervag/vimtex
#+BEGIN_SRC conf #+BEGIN_SRC conf
" let g:tex_conceal="" " let g:tex_conceal=""
" autocmd FileType tex let b:vimtex_main = 'main.tex' " autocmd FileType tex let b:vimtex_main = 'main.tex'
" let g:vimtex_mappings_enabled=0 " let g:vimtex_mappings_enabled=0
#+END_SRC #+END_SRC
** jpalardy/vim-slime ** jpalardy/vim-slime
#+BEGIN_SRC conf #+BEGIN_SRC conf
if exists('$TMUX') if exists('$TMUX')
let g:slime_target = "tmux" let g:slime_target = "tmux"
let g:slime_default_config = {"socket_name": split($TMUX, ",")[0], "target_pane": ":.2"} let g:slime_default_config = {"socket_name": split($TMUX, ",")[0], "target_pane": ":.2"}
let g:slime_dont_ask_default = 1 let g:slime_dont_ask_default = 1
endif endif
#+END_SRC #+END_SRC
** mhinz/vim-grepper ** mhinz/vim-grepper
#+BEGIN_SRC conf #+BEGIN_SRC conf
" nnoremap <leader>G :Grepper -tool ag<cr> " nnoremap <leader>G :Grepper -tool ag<cr>
" nmap gs <plug>(GrepperOperator) " nmap gs <plug>(GrepperOperator)
" xmap gs <plug>(GrepperOperator) " xmap gs <plug>(GrepperOperator)
#+END_SRC #+END_SRC
** Editor config ** Editor config
#+BEGIN_SRC conf #+BEGIN_SRC conf
" To ensure that this plugin works well with Tim Pope's fugitive, use the following patterns array: " To ensure that this plugin works well with Tim Pope's fugitive, use the following patterns array:
let g:EditorConfig_exclude_patterns = ['fugitive://.*'] let g:EditorConfig_exclude_patterns = ['fugitive://.*']
#+END_SRC #+END_SRC
** Polyglot ** Polyglot
#+BEGIN_SRC conf #+BEGIN_SRC conf
let g:polyglot_disabled = ['latex'] let g:polyglot_disabled = ['latex']
#+END_SRC #+END_SRC
* Bindings * Bindings

28
dotfiles/zsh.org Normal file
View File

@ -0,0 +1,28 @@
#+TITLE: ZSH Config
:DRAWER:
#+PROPERTY: header-args:conf+ :comments both
#+PROPERTY: header-args:conf+ :mkdirp yes
#+PROPERTY: header-args:conf+ :tangle ~/.zshrc
:END:
https://github.com/unixorn/awesome-zsh-plugins
* Zplug
https://github.com/zplug/zplug
#+begin_src conf
source ~/.zplug/init.zsh
zplug mafredri/zsh-async, from:github
zplug sindresorhus/pure, use:pure.zsh, from:github, as:theme
# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# Then, source plugins and add commands to $PATH
zplug load --verbose
#+end_src

View File

@ -15,6 +15,7 @@
- https://github.com/wincent/wincent - https://github.com/wincent/wincent
- https://github.com/korolr/dotfiles - https://github.com/korolr/dotfiles
- https://github.com/Shougo/shougo-s-github - https://github.com/Shougo/shougo-s-github
- https://github.com/addy-dclxvi/almighty-dotfiles
** Linux Softwares ** Linux Softwares
- [[https://github.com/k4m4/terminals-are-sexy][terminalare.sexy]] - [[https://github.com/k4m4/terminals-are-sexy][terminalare.sexy]]
@ -208,6 +209,11 @@ Maybe use:
|-----------+--------------------------| |-----------+--------------------------|
| =fc-list= | List all fonts available | | =fc-list= | List all fonts available |
** Select font
#+begin_src bash
yay -S gtk2fontsel
#+end_src
* Text Editors * Text Editors
** Neovim ** Neovim
https://github.com/neovim/neovim https://github.com/neovim/neovim
@ -657,6 +663,18 @@ The configuration is set in =/.config/mpv/input.conf=.
| Command | Usage | | Command | Usage |
|---------+-------| |---------+-------|
** Chromecast with castnow
*** Installation
#+begin_src bash
yay -Ss castnow-git
#+end_src
The configuration is =~/.castnowrc=.
*** TODO Configuration with Tmux/i3/polybar
Make nice shortcuts or polybar element for that
** TODO Chromecast with CATT ** TODO Chromecast with CATT
https://github.com/skorokithakis/catt https://github.com/skorokithakis/catt
@ -892,6 +910,8 @@ If you don't want to store your API token in plaintext you can use the secure fe
/set plugins.var.python.slack.slack_api_token ${sec.data.slack_token} /set plugins.var.python.slack.slack_api_token ${sec.data.slack_token}
#+end_src #+end_src
*** Aspell
https://blog.qoba.lt/using_aspell_in_weechat.html
*** Notifications *** Notifications
https://github.com/s3rvac/weechat-notify-send https://github.com/s3rvac/weechat-notify-send
@ -1046,7 +1066,7 @@ https://gist.github.com/guiniol/5109c5bd953af950e0530b720507d704
A script (=~/scripts/checkmail.sh=) is used to retreive new mails and use =notify=send= is there are new received mails. A script (=~/scripts/checkmail.sh=) is used to retreive new mails and use =notify=send= is there are new received mails.
* TODO [#A] File Manager * TODO [#A] File Manager
** TODO [#A] Ranger ** TODO [#B] Ranger
https://github.com/ranger/ranger https://github.com/ranger/ranger
*** Installation *** Installation
#+BEGIN_SRC bash #+BEGIN_SRC bash
@ -1069,7 +1089,7 @@ It works better with Urxvt.
| =X= | Extract archive | | =X= | Extract archive |
| =Z= | Compress file or folder | | =Z= | Compress file or folder |
** TODO nnn ** TODO [#A] nnn
https://github.com/jarun/nnn https://github.com/jarun/nnn
https://www.youtube.com/watch?v=U2n5aGqou9E https://www.youtube.com/watch?v=U2n5aGqou9E
@ -1103,26 +1123,30 @@ yay -S feh
| =bspc= | previous image | | =bspc= | previous image |
| =w= | Fit image | | =w= | Fit image |
** TODO Vimiv ** sxiv
https://github.com/karlch/vimiv
*** Installation
#+BEGIN_SRC bash
yay -S vimiv
#+END_SRC
*** TODO Cheatsheet
http://karlch.github.io/vimiv/docs/keybindings_commands#keybinding-cheatsheet
| Command | Usage |
|---------+-------|
** TODO sxiv
https://github.com/muennich/sxiv https://github.com/muennich/sxiv
https://www.youtube.com/watch?v=GYW9i_u5PYs https://www.youtube.com/watch?v=GYW9i_u5PYs
*** Installation *** Installation
#+BEGIN_SRC bash #+BEGIN_SRC bash
yay -S sxiv yay -S sxiv
#+END_SRC #+END_SRC
*** Open Gif
#+begin_src bash
sxiv -a file.gif
#+end_src
*** Cheatsheet
| Command | Usage |
|--------------+--------------------------|
| =-t= | Start in Thumbmail mode |
| =f= | Toggle fullscreen |
| =Return= | Switch to thumbmail mode |
| =<=, =>= | Rotate the image |
| =\vert=, =_= | Flip the image |
| =n=, =p= | Next, Previous image |
* TODO [#B] Windows Manager - i3 * TODO [#B] Windows Manager - i3
** TODO Installation ** TODO Installation
#+BEGIN_SRC bash #+BEGIN_SRC bash
@ -1209,11 +1233,17 @@ yay -S dunst
- [ ] New messages on slack - [ ] New messages on slack
** TODO [#C] How to merge similar notifications like new mails? ** TODO [#C] How to merge similar notifications like new mails?
* Office Suite - LibreOffice * Office Suite
** LibreOffice
#+begin_src bash #+begin_src bash
yay -S libreoffice-fresh yay -S libreoffice-fresh
#+end_src #+end_src
** WPS Office
#+begin_src bash
yay -S wps-office wps-office-extension-french-dictionary ttf-wps-fonts
#+end_src
* SpreadSheet - SC-IM * SpreadSheet - SC-IM
https://github.com/andmarti1424/sc-im https://github.com/andmarti1424/sc-im
https://www.youtube.com/watch?v=K_8_gazN7h0 https://www.youtube.com/watch?v=K_8_gazN7h0
@ -1258,19 +1288,35 @@ https://wiki.archlinux.org/index.php/CUPS
Web based administration: http://localhost:631/ Web based administration: http://localhost:631/
=system-config-printer= =system-config-printer=
*** Check and Clear the Queue
Check the queue Check the queue
#+begin_src bash #+begin_src bash
lpq lpq
lpq -a # on all queues lpq -a # on all queues
#+end_src #+end_src
Clear the queue Clear the queue
#+begin_src bash #+begin_src bash
lprm # remove last entry only lprm # remove last entry only
lprm - # remove all entries lprm - # remove all entries
#+end_src #+end_src
Print a file
#+begin_src bash
lpr -P printer_name filename.pdf
#+end_src
List available printers
#+begin_src bash
lpstat -a
#+end_src
Stats about the printer
#+begin_src bash
lpstat -p printer_name
#+end_src
*** TODO CheatSheet *** TODO CheatSheet
| Command | Usage | | Command | Usage |
|---------+-------| |---------+-------|
@ -1313,21 +1359,20 @@ https://gparted.org/
** TODO [#B] Bluetooth ** TODO [#B] Bluetooth
Bluetooth: Gui: https://github.com/blueman-project/blueman Bluetooth: Gui: https://github.com/blueman-project/blueman
** TODO [#B] Temperature and Fan control ** TODO [#A] Temperature and Fan control
https://github.com/dgraziotin/mbpfan
Fan are controlled by mbpfan. The config file is =/etc/mbpfan.conf=
#+BEGIN_SRC bash #+BEGIN_SRC bash
# Enable Automated Power Regulation # Enable Automated Power Regulation
sudo pacman -S tlp yay -S tlp
sudo systemctl enable tlp sudo systemctl enable tlp
sudo systemctl enable tlp-sleep sudo systemctl start tlp
sudo tlp start sudo systemctl enable tlp-sleep
sudo systemctl start tlp-sleep
sudo tlp start
# Enable thermald (overheat shutoff) # Enable thermald (overheat shutoff)
yaourt -S thermald yay -S thermald
sudo systemctl enable thermald sudo systemctl enable thermald
sudo systemctl start thermald sudo systemctl start thermald
#+END_SRC #+END_SRC
** TODO [#B] Lock Screen ** TODO [#B] Lock Screen
@ -1457,7 +1502,9 @@ yay -S rclone
*** Progress bar for long synchronizations *** Progress bar for long synchronizations
Use =--progress --stats-one-line=. Use =--progress --stats-one-line=.
* Download Manager * TODO Download Manager
** TODO [#B] Torrent - Transmission
https://www.youtube.com/watch?v=fpYbJCqpPS4&list=WL&index=14&t=0s
** TODO CLI Download Manager - Aria2 ** TODO CLI Download Manager - Aria2
*** Installation *** Installation
#+BEGIN_SRC bash #+BEGIN_SRC bash
@ -1486,10 +1533,6 @@ Then run the CLI client using =deluge-console=.
*** GUI Client *** GUI Client
=deluge= =deluge=
*** Alternatives
https://github.com/rakshasa/rtorrent
https://webtorrent.io/
** TODO CLI Torrent Client - btpd ** TODO CLI Torrent Client - btpd
https://github.com/btpd/btpd https://github.com/btpd/btpd
@ -1580,6 +1623,7 @@ https://github.com/pimutils/khal
** Org Mode ** Org Mode
https://orgmode.org/worg/exporters/beamer/tutorial.html https://orgmode.org/worg/exporters/beamer/tutorial.html
** WPS
** Presentation setup on computer ** Presentation setup on computer
** PowerPoint Viewer ** PowerPoint Viewer
** Multi-monitor pdf presentation - pdfpc ** Multi-monitor pdf presentation - pdfpc
@ -1650,7 +1694,22 @@ http://wayneashleyberry.github.io/wunderline/
**** Cheatsheet **** Cheatsheet
=wunderline list= =wunderline list=
#+begin_src bash :results raw
wunderline inbox
#+end_src
#+RESULTS:
INBOX (5)
Appeler les impôts ☆
Regarder les impôt Today ☆
Remboursement abonnement tram ? ☆
Prendre le Exploding Kittens / Seven Wonders Today ☆
Appeler Maman Today ☆
*** TODO Org-Wunderlist
https://github.com/myuhe/org-wunderlist.el?state=RANDOM&code=f03a4873e4fd70950641
* Background manager: nitrogen * Background manager: nitrogen
https://github.com/l3ib/nitrogen/ https://github.com/l3ib/nitrogen/
@ -1764,6 +1823,7 @@ This help changes many applications colors at once.
- https://inkscape.org/ - https://inkscape.org/
- https://krita.org/en/features/highlights/ - https://krita.org/en/features/highlights/
- Tikz - Tikz
* TODO [#B] System monitor: conky * TODO [#B] System monitor: conky
https://github.com/brndnmtthws/conky https://github.com/brndnmtthws/conky
https://wiki.archlinux.org/index.php/Conky https://wiki.archlinux.org/index.php/Conky
@ -1771,11 +1831,14 @@ https://wiki.archlinux.org/index.php/Conky
Integration with polybar: Integration with polybar:
- https://www.reddit.com/r/unixporn/comments/92guq6/i3polybar_animated_polybar_drop_down_menus/ - https://www.reddit.com/r/unixporn/comments/92guq6/i3polybar_animated_polybar_drop_down_menus/
- https://github.com/ntcarlson/dotfiles - https://github.com/ntcarlson/dotfiles
* TODO Bugs * TODO Bugs
** TODO Why the cursor is turning when on the background image? ** TODO Why the cursor is turning when on the background image?
Because something is executing without the --no-startup-id option
* TODO Games on Linux * TODO Games on Linux
https://www.protondb.com/ https://www.protondb.com/
https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561 https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561
* TODO VPN Setup * TODO VPN Setup
** NordVPN ** NordVPN
https://aur.archlinux.org/packages/nordvpn-bin/ https://aur.archlinux.org/packages/nordvpn-bin/
@ -1812,6 +1875,20 @@ https://nordvpn.com/fr/tutorials/linux/openvpn/
yay -S rtv yay -S rtv
#+END_SRC #+END_SRC
** Interact with API
- GUI: https://github.com/getinsomnia/insomnia
- CLI: https://github.com/jakubroztocil/httpie
** Take Screenshot
https://github.com/naelstrof/maim
#+begin_src bash
yay -S maim
#+end_src
#+begin_src bash
man maim
#+end_src
* TODO Usefull commands * TODO Usefull commands
** Find files or directories ** Find files or directories
- https://github.com/sharkdp/fd - https://github.com/sharkdp/fd
@ -1887,35 +1964,35 @@ https://wiki.archlinux.org/index.php/Keyboard_shortcuts
#+end_src #+end_src
** Others ** Others
- [[https://github.com/tldr-pages/tldr][tldr]] - Community-driven man pages | [[https://github.com/tldr-pages/tldr][tldr]] | Community-driven man pages |
- [[https://github.com/dutchcoders/transfer.sh][transfer.sh]] - upload and share files from the command line | [[https://github.com/dutchcoders/transfer.sh][transfer.sh]] | upload and share files from the command line |
- [[https://github.com/timvisee/ffsend][ffsend]] - share files from the command line | [[https://github.com/timvisee/ffsend][ffsend]] | share files from the command line |
- https://github.com/chubin/wttr.in - weather in terminal | [[https://github.com/chubin/wttr.in][wttr.in]] | weather in terminal |
- https://github.com/michael-lazar/rtv | [[https://github.com/michael-lazar/rtv][rtv]] | Reddit in terminal |
- trans =yay -S translate-shell= | awk | https://linuxhandbook.com/awk-command-tutorial/ |
- awk https://linuxhandbook.com/awk-command-tutorial/ | [[https://github.com/rupa/z][z]] | Jump around |
- install the software to convert image to latex code => create script to take screenshot and automatically export latex | [[https://github.com/nvbn/thefuck][thefuck]] | Magnificent app which corrects your previous console command |
- https://github.com/rupa/z | [[https://github.com/mrzool/bash-sensible][bash-sensible]] | An attempt at saner Bash defaults |
- https://github.com/nvbn/thefuck | [[https://github.com/greg-js/arch-wiki-man][awman]] | Arch Wiki man pages - Arch wiki offline |
- bash-sensible | [[https://github.com/amanusk/s-tui/][s-tui]] | Terminal based CPU stress and monitoring utility |
- Also check at the end of this readme | [[https://github.com/nicolargo/glances][glances]] | A top/htop alternative |
- awman - Arch Wiki man pages - Arch wiki offline | [[https://github.com/asciinema/asciinema][asciinema]] | Reccord you terminal |
- https://www.tecmint.com/linux-commands-cheat-sheet/ | [[https://dev.yorhel.nl/ncdu][ncdu]] | See what takes place on the disk |
| [[https://github.com/haikarainen/light][light]] | Program to easily change brightness on backlight-controllers |
| [[https://github.com/naelstrof/maim][maim]] | Take screenshots |
|-----------------------------------+-------------------------------------------| |-----------------------------------+-------------------------------------------|
| Command | Description | | Command | Description |
|-----------------------------------+-------------------------------------------| |-----------------------------------+-------------------------------------------|
| =glances= | Moniteur d'activité |
| =meteo= | Get the meteo | | =meteo= | Get the meteo |
| =sudo cputhrottle PID %PROC= | Limiter l'accès au proc pour un processus | | =sudo cputhrottle PID %PROC= | Limiter l'accès au proc pour un processus |
| =asciinema= | Reccord you terminal |
| =nmap -sP “192.168.1.*"= | Check all ip addresses on local netword | | =nmap -sP “192.168.1.*"= | Check all ip addresses on local netword |
| =ncdu= | See what takes place on the disk |
| =rsync -a --progress source dest= | Copy folders with stats | | =rsync -a --progress source dest= | Copy folders with stats |
| =du -sh folder= | Return the size of the folder | | =du -sh folder= | Return the size of the folder |
| =df -h= | Report disk usage | | =df -h= | Report disk usage |
|-----------------------------------+-------------------------------------------| |-----------------------------------+-------------------------------------------|
** Archive and Extract ** Archive and Extract
Use =apack= and =aunpack=: Use =apack= and =aunpack=:
| | | | | |
@ -1923,6 +2000,16 @@ Use =apack= and =aunpack=:
| =aunpack foobar.tar.gz= | extract all files from archive | | =aunpack foobar.tar.gz= | extract all files from archive |
| =apack myarchive.zip foo bar= | create a zip archive of two files | | =apack myarchive.zip foo bar= | create a zip archive of two files |
** Hardware
| =dmesg= | Detected hardware and boot messages |
| =lshw= | Display information on hardware |
| =lsusb -tv= | Show usb devices |
** Network
| =ip addr show= | Show all network interfaces and ip address |
| =ethtooo eth0= | Tool to show ethernet status |
| =netstat -tulp= | List all active listening ports |
* TODO Custom scripts * TODO Custom scripts
** TODO [#A] Password completion with fzf ** TODO [#A] Password completion with fzf
Make a script to use FZF for autocompletion of password (with pass program) and then send to current line or copy. Make a script to use FZF for autocompletion of password (with pass program) and then send to current line or copy.