From: Mart Lubbers Date: Wed, 18 Sep 2024 07:25:13 +0000 (+0200) Subject: many small updates X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;ds=sidebyside;p=dotfiles.git many small updates --- diff --git a/cal/.config/vdirsyncer/config b/cal/.config/vdirsyncer/config index 01919df..00b4d51 100644 --- a/cal/.config/vdirsyncer/config +++ b/cal/.config/vdirsyncer/config @@ -50,7 +50,7 @@ collections = null [storage vuilnis_web] type = "http" -url = "https://wasteapi.ximmio.com/api/CallIcal?cn=Gemeente%20Almere&x=53d8db94-7945-42fd-9742-9bbc71dbe4c1&ty=null&ua=11219&sd=2020-12-21&ed=2024-01-09&path=https://wasteapi.ximmio.com&ln=nl&nt=1130" +url = "https://afvalkalender.dar.nl/ical/0296200000014963" [storage vuilnis_remote] type = "caldav" diff --git a/config.h/dwm/config.h b/config.h/dwm/config.h index c319253..0c7f007 100644 --- a/config.h/dwm/config.h +++ b/config.h/dwm/config.h @@ -78,10 +78,11 @@ static const char *scr_sel[] = { "scr", "selection", NULL }; static const char *lock[] = { "xautolock", "-locknow", NULL }; static const char *brightup[] = { "xbacklight", "-inc", "5", NULL }; static const char *brightdown[] = { "xbacklight", "-dec", "5", NULL }; -static const char *volume_mute[] = {"pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL}; -static const char *volume_dec[] = {"pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL}; -static const char *volume_inc[] = {"pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL}; +static const char *volume_mute[] = {"volume_toggle", NULL}; +static const char *volume_dec[] = {"volume_down", NULL}; +static const char *volume_inc[] = {"volume_up", NULL}; static const char *toggle_music[] = {"music_toggle", NULL}; +static const char *toggle_screen[] = {"toggle_screen", NULL}; static const Key keys[] = { /* modifier key function argument */ @@ -93,8 +94,6 @@ static const Key keys[] = { { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, - { MODKEY, XK_d, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY, XK_Return, zoom, {0} }, @@ -129,6 +128,8 @@ static const Key keys[] = { { 0, XF86XK_AudioLowerVolume, spawn, {.v = volume_dec } }, { 0, XF86XK_AudioMute, spawn, {.v = volume_mute } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volume_inc } }, + { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volume_inc } }, + { 0, XF86XK_Display, spawn, {.v = toggle_screen } }, { 0, XK_Print, spawn, {.v = scr } }, { ShiftMask, XK_Print, spawn, {.v = scr_sel } }, { 0, XK_Pause, spawn, {.v = toggle_music } }, diff --git a/config.h/dwm/dwm b/config.h/dwm/dwm index 50ad171..5687f46 160000 --- a/config.h/dwm/dwm +++ b/config.h/dwm/dwm @@ -1 +1 @@ -Subproject commit 50ad171eea9db5ccb36fce2592e047c3282975ff +Subproject commit 5687f4696472ba6029bbba18e293e3e8b9e154ea diff --git a/email/.config/mutt/common.muttrc b/email/.config/mutt/common.muttrc index 4b40f4b..5d45978 100644 --- a/email/.config/mutt/common.muttrc +++ b/email/.config/mutt/common.muttrc @@ -1,2 +1 @@ set spoolfile=+/INBOX/ -set postponed=+/Drafts/ diff --git a/email/.config/mutt/muttrc b/email/.config/mutt/muttrc index b4c3d0c..55e66e4 100644 --- a/email/.config/mutt/muttrc +++ b/email/.config/mutt/muttrc @@ -2,7 +2,7 @@ source ~/.config/mutt/net.muttrc # Basic information -alternates "(mart@cs\.ru\.nl|m\.lubbers@cs\.ru\.nl|mart@martlubbers\.net|Mart\.Lubbers@ru\.nl)" +alternates "(mart@cs\.ru\.nl|m\.lubbers@cs\.ru\.nl|mart@martlubbers\.net|Mart\.Lubbers@ru\.nl|mart\.lubbers@cs\.ru\.nl)" set use_from=yes set reverse_name=yes set envelope_from=yes @@ -36,8 +36,8 @@ macro compose 1 "f^UMart Lubbers ps" macro compose 2 "f^UMart Lubbers ps" macro compose 3 "f^UMart Lubbers pc" -macro index,compose 1 "source ~/.config/mutt/net.muttrc=INBOX" -macro index,compose 2 "source ~/.config/mutt/ru.muttrc=INBOX" +macro index 1 "source ~/.config/mutt/net.muttrc=INBOX" +macro index 2 "source ~/.config/mutt/ru.muttrc=INBOX" folder-hook ~/.local/share/offlineimap/mail/net/* 'source ~/.config/mutt/net.muttrc' folder-hook ~/.local/share/offlineimap/mail/ru/* 'source ~/.config/mutt/ru.muttrc' diff --git a/email/.config/mutt/net.muttrc b/email/.config/mutt/net.muttrc index e6c7db5..c3f1372 100644 --- a/email/.config/mutt/net.muttrc +++ b/email/.config/mutt/net.muttrc @@ -1,6 +1,7 @@ set from="Mart Lubbers " set folder=~/.local/share/offlineimap/mail/net set record=+/Sent/ +set postponed=+/Drafts/ # reload common things that depend on $folder source ~/.config/mutt/common.muttrc diff --git a/email/.config/mutt/ru.muttrc b/email/.config/mutt/ru.muttrc index fdcb43d..2335aff 100644 --- a/email/.config/mutt/ru.muttrc +++ b/email/.config/mutt/ru.muttrc @@ -1,6 +1,7 @@ set from="Mart Lubbers " set folder=~/.local/share/offlineimap/mail/ru set record=+/INBOX.Sent/ +set postponed=+/INBOX.Drafts/ # reload common things that depend on $folder source ~/.config/mutt/common.muttrc diff --git a/email/.config/offlineimap/config b/email/.config/offlineimap/config index 47be912..0049e67 100644 --- a/email/.config/offlineimap/config +++ b/email/.config/offlineimap/config @@ -18,14 +18,14 @@ localrepository = netLocal remoterepository = netRemote autorefresh = 6 quick = 10 -postsynchook = newmail.sh +postsynchook = newmail.sh net [Account ru] localrepository = ruLocal remoterepository = ruRemote autorefresh = 6 quick = 10 -postsynchook = newmail.sh +postsynchook = newmail.sh ru [Repository netLocal] type = Maildir diff --git a/email/.local/bin/newmail.sh b/email/.local/bin/newmail.sh index 16c2888..15226b9 100755 --- a/email/.local/bin/newmail.sh +++ b/email/.local/bin/newmail.sh @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash notmuch new killall -s SIGUSR1 slstatus -if [ "$OFFLINEIMAPSYNCMODE" = full ] +if [[ $# -eq 2 && "$1" = "net" && "$OFFLINEIMAPSYNCMODE" = full ]] then - vdirsyncer sync --max-workers=1 + vdirsyncer sync fi diff --git a/pgp/.gnupg/gpg-agent.conf b/pgp/.gnupg/gpg-agent.conf index e83e18b..91b03a6 100644 --- a/pgp/.gnupg/gpg-agent.conf +++ b/pgp/.gnupg/gpg-agent.conf @@ -1,4 +1,4 @@ default-cache-ttl 3600 enable-ssh-support disable-scdaemon -pinentry-program /usr/bin/pinentry-gtk-2 +pinentry-program /usr/bin/pinentry diff --git a/pkgs.sh b/pkgs.sh index 2fceef4..4b2f423 100644 --- a/pkgs.sh +++ b/pkgs.sh @@ -33,6 +33,7 @@ sudo apt-get install \ pulseaudio\ pv\ pympress\ + pavucontrol\ samba \ stow \ strace \ @@ -45,6 +46,7 @@ sudo apt-get install \ vdirsyncer \ vim \ w3m \ + wget \ wakeonlan \ x11-xserver-utils \ xautolock \ diff --git a/shell/.bash_profile b/shell/.bash_profile index c165d61..882ae60 100644 --- a/shell/.bash_profile +++ b/shell/.bash_profile @@ -1,2 +1,22 @@ -[[ -f ~/.bashrc ]] && . ~/.bashrc -#[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx || true +# Paths +export PATH=~/.local/bin:~/.nitrile/bin:~/.cabal/bin:/opt/firefox:$PATH +export PATH=/opt/texlive/2024/bin/x86_64-linux:$PATH +export PATH=/opt/Zotero_linux-x86_64:$PATH +export PATH=/opt/arduino/arduino-1.8.19:$PATH +export MANPATH=~/.local/share/man:/opt/texlive/2024/texmf-dist/doc/man:/opt/arduino/java/man:$MANPATH +export INFOPATH=/opt/texlive/2024/texmf-dist/doc/info:$INFOPATH + +export TERMINAL=~/projects/st/st +export EDITOR="vim -p" +export TERM=screen +export BROWSER=firefox +export PAGER=less + +# XDG fixes +export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}"/notmuch/config +export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}"/pass +export TMUX_TMPDIR="$XDG_RUNTIME_DIR" + +if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" +fi diff --git a/shell/.bashrc b/shell/.bashrc index a2db357..bf76ff3 100644 --- a/shell/.bashrc +++ b/shell/.bashrc @@ -1,43 +1,16 @@ +# Shell options shopt -s checkwinsize histappend globstar - -export MESA_LOADER_DRIVER_OVERRIDE=i965 export HISTCONTROL=erasedups export HISTFILESIZE=NOTHING export HISTSIZE=NOTHING export PROMPT_COMMAND='history -a' -export TERMINAL=~/projects/st/st -export EDITOR="vim -p" -export TERM=screen -export BROWSER=firefox -export PAGER=less - -export SUDO_ASKPASS=/usr/lib/ssh/ssh-askpass - -# XDG fixes -alias svn="svn --config-dir \"${XDG_CONFIG_HOME:-$HOME/.config}\"/subversion" -alias tmux="tmux -f \"${XDG_CONFIG_HOME:-$HOME/.config}/tmux/config\"" -alias tudu="tudu -c \"${XDG_CONFIG_HOME:-$HOME/.config}/tudu/config\"" -export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}"/notmuch/config -export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}"/pass -export TMUX_TMPDIR="$XDG_RUNTIME_DIR" - -export PATH=~/.local/bin:~/.nitrile/bin:~/.cabal/bin:/opt/firefox:$PATH -export PATH=/opt/texlive/2024/bin/x86_64-linux:$PATH -export PATH=/opt/Zotero_linux-x86_64:$PATH -export PATH=/opt/arduino/arduino-1.8.19:$PATH - -export MANPATH=~/.local/share/man:/opt/texlive/2024/texmf-dist/doc/man:/opt/arduino/java/man:$MANPATH -export INFOPATH=/opt/texlive/2024/texmf-dist/doc/info:$INFOPATH - -#export GTK_IM_MODULE=xim -#export QT_IM_MODULE=xim -#export QT_QPA_PLATFORMTHEME=qt5ct - alias ls='ls --color=auto' alias grep='grep --color=auto' alias vi='vim' -alias kmfbmagp=tmuxmail +alias svn="svn --config-dir \"${XDG_CONFIG_HOME:-$HOME/.config}\"/subversion" +alias tmux="tmux -f \"${XDG_CONFIG_HOME:-$HOME/.config}/tmux/config\"" +alias tudu="tudu -c \"${XDG_CONFIG_HOME:-$HOME/.config}/tudu/config\"" if [ -f /etc/bash_completion ] then diff --git a/x/.config/mimeapps.list b/x/.config/mimeapps.list index a191f44..1dc0d73 100644 --- a/x/.config/mimeapps.list +++ b/x/.config/mimeapps.list @@ -12,6 +12,9 @@ application/x-extension-shtml=firefox-esr.desktop application/xhtml+xml=firefox-esr.desktop application/x-extension-xhtml=firefox-esr.desktop application/x-extension-xht=firefox-esr.desktop +inode/directory=nemo.desktop +application/x-gnome-saved-search=nemo.desktop +text/x-arduino=arduino-arduinoide.desktop [Added Associations] application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop; diff --git a/x/.local/bin/scr b/x/.local/bin/scr index c54bf98..9beb7d4 100755 --- a/x/.local/bin/scr +++ b/x/.local/bin/scr @@ -1,5 +1,4 @@ #!/bin/sh -e [ "$#" -ne 1 ] && CROP="" || CROP="-window root" -URL="scr/$(date +%F_%H-%M-%S).png" -import $CROP png:- | ssh helheim2 cat \> /var/www/martlubbers.net/$URL -echo "http://martlubbers.net/$URL" | xclip -f | xargs -I{} notify-send {} +import $CROP png:- | xclip -sel clip -t image/png +notify-send "done" diff --git a/x/.local/bin/thunderbird.sh b/x/.local/bin/thunderbird.sh new file mode 100755 index 0000000..f82a847 --- /dev/null +++ b/x/.local/bin/thunderbird.sh @@ -0,0 +1,2 @@ +#!/bin/sh +thunderbird -calendar "$@" diff --git a/x/.local/bin/toggle_screen b/x/.local/bin/toggle_screen new file mode 100755 index 0000000..6ecd88a --- /dev/null +++ b/x/.local/bin/toggle_screen @@ -0,0 +1,85 @@ +#!/bin/bash +allmonitors="$(xrandr | grep "\( dis\| \)connected" | cut -d' ' -f1)" +connectedmonitors="$(xrandr | grep " connected" | cut -d' ' -f1)" +activemonitors="$(xrandr --listmonitors | awk '{print $4}' | grep .)" +msg="" + +# docked +if lsusb | grep -q '17ef:30b0\|03f0:0620' +then + # two monitors connected, go to only laptop + if [ "$(wc -l <<< $connectedmonitors)" -eq 2 ] + then + msg="${msg}docked" + if [[ "$(wc -l <<< "$activemonitors")" -eq 2 ]] + then + msg="${msg} laptop only" + xrandr --output eDP-1 --auto + for scr in $allmonitors + do + if [[ "$scr" != eDP-1 ]] + then + xrandr --output $scr --off + fi + done + elif [[ "$(wc -l <<< "$activemonitors")" -eq 1 ]] + then + if [[ "$activemonitors" == eDP-1 ]] + then + msg="${msg} external only" + xrandr --output eDP-1 --off + for scr in $connectedmonitors + do + if [[ "$scr" != eDP-1 ]] + then + xrandr --output $scr --auto + fi + done + else + msg="${msg} both" + xrandr --output eDP-1 --auto + for scr in $activemonitors + do + if [[ "$scr" != eDP-1 ]] + then + xrandr --output $scr --auto --right-of eDP-1 + fi + done + fi + elif [[ "$(wc -l <<< "$activemonitors")" -eq 0 ]] + then + msg="${msg} no monitor was active?" + xrandr --output eDP-1 --auto + fi + # one monitor connected, try to swap + else + msg="${msg}docked and only one monitor connected???" >&2 + exit 1 + fi +else + msg="${msg}not docked" + # two external monitor is connected + if [[ "$(wc -l <<< $connectedmonitors)" -eq 2 ]] + then + msg="${msg}external monitor is connected" + # only one monitor connected (laptop screen) + elif [[ "$(wc -l <<< $connectedmonitors)" -eq 1 ]] + then + msg="${msg}laptop only (no external available)" + xrandr --output eDP-1 --auto + for scr in $(xrandr | grep "\( dis\| \)connected" | cut -d' ' -f1) + do + if [ "$scr" == eDP-1 ] + then + xrandr --output $scr --off + fi + done + elif [[ "$(wc -l <<< $connectedmonitors)" -eq 0 ]] + then + msg="${msg} no monitor was active?" + xrandr --output eDP-1 --auto + msg="${msg}external monitor connected" + fi +fi +notify-send "$msg" +echo $msg diff --git a/x/.local/bin/volume_down b/x/.local/bin/volume_down new file mode 100755 index 0000000..4bc35cb --- /dev/null +++ b/x/.local/bin/volume_down @@ -0,0 +1,2 @@ +#!/bin/sh +pactl set-sink-volume @DEFAULT_SINK@ -5% diff --git a/x/.local/bin/volume_toggle b/x/.local/bin/volume_toggle new file mode 100755 index 0000000..86d8477 --- /dev/null +++ b/x/.local/bin/volume_toggle @@ -0,0 +1,2 @@ +#!/bin/sh +pactl set-sink-mute @DEFAULT_SINK@ toggle diff --git a/x/.local/bin/volume_up b/x/.local/bin/volume_up new file mode 100755 index 0000000..7ae2021 --- /dev/null +++ b/x/.local/bin/volume_up @@ -0,0 +1,2 @@ +#!/bin/sh +pactl set-sink-volume @DEFAULT_SINK@ +5% diff --git a/x/.xinitrc b/x/.xinitrc index a4b5ea8..77b1cd8 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -13,9 +13,6 @@ fi # status bar slstatus & -# compositor -xcompmgr -a -c -l0 -t0 -r0 -o.00 & - # network manager applet nm-applet & @@ -24,7 +21,11 @@ export BROWSER=firefox slack -u -s & # signal....................... -signal --use-tray-icon --start-in-tray +signal-desktop --use-tray-icon --start-in-tray & + +# discord...................... +discord --start-minimized & + # Other system wide xinit files if [ -f /etc/X11/xinit/xinitrc ]; then