From 3783cab095a9167256afcbfe987d11f35a7003b1 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Thu, 5 Sep 2024 12:15:30 -0500 Subject: changes --- Xresources | 18 ++++++++++++++++-- config/aerc/accounts.conf | 1 + config/aerc/aerc.conf | 2 +- config/aerc/binds.conf | 3 ++- cwmrc | 22 +++++++++++++--------- gitconfig | 2 ++ mbsyncrc | 6 +++--- profile | 8 +++++--- shrc | 40 +++++++++++++++++++++++++++++++++------- xinitrc | 13 +++++++++++++ xsession | 16 ---------------- 11 files changed, 89 insertions(+), 42 deletions(-) create mode 100755 xinitrc delete mode 100755 xsession diff --git a/Xresources b/Xresources index 461ec50..d3048a3 100644 --- a/Xresources +++ b/Xresources @@ -10,6 +10,20 @@ XTerm*Background: #FFFFFF XTerm*Foreground: #000000 XTerm*HiBackColor: #FFFFFF XTerm*scaleHeight: 1.2 -VT100.translations: #override \n\ - : exec-formatted("xdg-open '%t'", PRIMARY) +urxvt*selectToClipboard: true +urxvt*font: xft:Iosevka SS13 Extended :size=14:style=Regular:antialias=true:hinting=false +urxvt*scrollBar: false +urxvt*rightScrollbar: false +urxvt.termName: xterm-256color +urxvt*Background: #FFFFFF +urxvt*Foreground: #000000 +urxvt*HiBackColor: #FFFFFF +urxvt*scaleHeight: 1.2 +URxvt.perl-ext-common: default,matcher +URxvt.url-launcher: /usr/local/bin/xdg-open +URxvt.matcher.button: 1 + +! yellow +*.color3: #ffb319 +*.color11: #ffb319 diff --git a/config/aerc/accounts.conf b/config/aerc/accounts.conf index 7167eb6..f104d32 100644 --- a/config/aerc/accounts.conf +++ b/config/aerc/accounts.conf @@ -4,6 +4,7 @@ outgoing = smtps+plain://marcc%40fastmail.fr@smtp.fastmail.com:465 default = INBOX outgoing-cred-cmd = pass fastmail/marcc from = "Marc Coquand" +address-book-cmd = grep -F -i -- "%s" "/home/mccd/.local/share/maildir2addr/addrs.tsv" copy-to = Sent [Work] diff --git a/config/aerc/aerc.conf b/config/aerc/aerc.conf index 439bb4a..9729724 100644 --- a/config/aerc/aerc.conf +++ b/config/aerc/aerc.conf @@ -379,6 +379,7 @@ parse-http-links=true # Specifies the command to run the editor with. It will be shown in an embedded # terminal, though it may also launch a graphical window if the environment # supports it. Defaults to $EDITOR, or vi. +editor=vim # # Default header fields to display when composing a message. To display @@ -399,7 +400,6 @@ parse-http-links=true # ignored. # # This parameter can also be set per account in accounts.conf. -#address-book-cmd= # Specifies the command to be used to select attachments. Any occurence of '%s' # in the file-picker-cmd will be replaced the argument to :attach -m diff --git a/config/aerc/binds.conf b/config/aerc/binds.conf index db96bca..3296c29 100644 --- a/config/aerc/binds.conf +++ b/config/aerc/binds.conf @@ -68,6 +68,7 @@ S = :save | = :pipe D = :delete A = :archive flat +ga = :pipe -mb git am -3 = :open-link @@ -133,4 +134,4 @@ $ex = D = :mv Trash [messages:account=Work] -D = :mv [Gmail]/Bin +D = :mv [Gmail]/Trash diff --git a/cwmrc b/cwmrc index dcab746..4ba9fe2 100644 --- a/cwmrc +++ b/cwmrc @@ -1,29 +1,33 @@ sticky yes fontname "Iosevka Aile:pixelsize=18:Normal" -borderwidth 4 +borderwidth 6 autogroup 0 xclock,XClock autogroup 0 xarclock, XClock autogroup 0 clock, clock -autogroup 0 xclock, alacritty +autogroup 0 xclock, urxvt vtile 55 ignore xclock unbind-key all color menufg "#FFFFFF" #black color font "#000000" #black -color menubg "#DDDDDD" "#000000" -color selfont #white #white +#color menubg "#DDDDDD" "#000000" +#color selfont #white #white color activeborder "#68b0b3" color inactiveborder "#AAAAAA" -#bind-key 0-XF86MonBrightnessUp "backlight incr 10" -#bind-key 0-XF86MonBrightnessDown "backlight decr 10" +bind-key 0-XF86MonBrightnessUp "backlight incr 10" +bind-key 0-XF86MonBrightnessDown "backlight decr 10" + +bind-key 0-XF86AudioRaiseVolume "mixer vol=+5%" +bind-key 0-XF86AudioLowerVolume "mixer vol=-5%" +bind-key 0-XF86AudioMute "mixer vol.mute=toggle" bind-mouse 4-3 window-resize bind-mouse 4-1 window-move -bind-key 4-s menu-window -bind-key 4-Return alacritty -bind-key 4-e "alacritty -e aerc" +bind-key 4-s "urxvt -e aerc mailto:link@mccd.space" +bind-key 4-Return urxvt +bind-key 4-e "urxvt -e aerc" bind-key 4-q window-close bind-key 4-m window-fullscreen bind-key 4-l window-vtile diff --git a/gitconfig b/gitconfig index 13f29c4..99a675c 100644 --- a/gitconfig +++ b/gitconfig @@ -14,6 +14,8 @@ helper = !pass 'fastmail/git' [color] ui = false +[merge] + tool = meld [mergetool] layout = LOCAL,MERGED,REMOTE [sendemail] diff --git a/mbsyncrc b/mbsyncrc index ad26c2b..3c69edd 100644 --- a/mbsyncrc +++ b/mbsyncrc @@ -11,8 +11,8 @@ User marcc@fastmail.fr # For simplicity, this is how to read the password from another file. # For better security you should use GPG https://gnupg.org/ PassCmd "pass fastmail/marcc" -SSLType IMAPS -SSLVersions TLSv1.2 +TLSType IMAPS +TLSVersions +1.2 IMAPStore Home-remote Account Home @@ -40,7 +40,7 @@ IMAPAccount Work Host imap.gmail.com User marc.coquand@sustainably.app PassCmd "pass sustainably/gmail" -SSLType IMAPS +TLSType IMAPS Timeout 60 IMAPStore Work-remote diff --git a/profile b/profile index 121b0fc..96dfa43 100644 --- a/profile +++ b/profile @@ -1,9 +1,9 @@ test -r /home/mccd/.opam/opam-init/init.sh && . /home/mccd/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true -PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/home/mccd/go/bin:/home/mccd/.cargo/bin:/home/mccd/.local/bin +PATH=${PATH}:/home/mccd/go/bin:/home/mccd/.cargo/bin:/home/mccd/.local/bin export PATH HOME TERM -export EDITOR="vim" +export EDITOR="kak" export GDK_DPI_SCALE="1.5" export GDK_SCALE="1.5" export XCURSOR_SIZE="32" @@ -14,8 +14,10 @@ export PF_ALIGN="5" export PF_COLOR="0" export MOZ_ACCELERATED=1 -export ENV=$HOME/.kshrc +export ENV=$HOME/.shrc export HISTSIZE=65535 export HISTFILE=$HOME/.history export STITCH_DIRECTORY=/home/mccd/notes export STITCH_GREP_CMD=ugrep + + diff --git a/shrc b/shrc index 2632b06..876f8d4 100644 --- a/shrc +++ b/shrc @@ -1,4 +1,4 @@ -# # be paranoid + # be paranoid alias rm='rm -i' alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build" @@ -6,19 +6,30 @@ alias e="$EDITOR" alias g="git" alias grep="ugrep" alias tldr="NO_COLOR=1 tldr" -alias fd="find . -name $1*" alias dedoc="dedoc --color off" alias doc="dedoc --color off search" alias kill-sessions="tmux kill-session -a" +alias restart-wifi="doas /usr/sbin/service netif restart" +alias de='. ./.envrc' -kill-unattached() { +optimizeimg() { + convert -strip -quality 85% $1 $2 +} + + +killunattached() { tmux list-sessions -F '#{session_attached} #{session_id}' | \ awk '/^0/{print $2}' | \ xargs -n 1 tmux kill-session -t } refs() { - recsel -q $1 ~/refs.rec + recsel -q $1 ~/personal-db/refs.rec +} + +# Remove trailing newlines +cleartrail() { + cat $1 | tr -d '\n' } addref() { @@ -26,16 +37,31 @@ addref() { cat /tmp/description | xargs -I {} recins refs.rec -f Title -v $1 -f Tags -v $2 -f Text -v {} } +isrootprompt() { + CURR="$(id -u)" + case "$CURR" in + "0") echo "#" + ;; + *) echo "$" + ;; + esac +} + notes() { grep -i "$1" --format='%f%~' ~/notes/ | xargs -I {} cat {} } -#eval "$(opam env)" echo "BAT: $(apm -l), $(apm -b)" set -o vi -export PS1='\W \$ ' +eval "$(direnv hook bash)" + +PS1='${PWD##*/} $(isrootprompt) ' eval "$(zoxide init posix --hook prompt)" -#[[ $TERM != "tmux-256color" ]] && exec tmux + + + + +[ $(tty) == "/dev/ttyv0" ] && exec startx diff --git a/xinitrc b/xinitrc new file mode 100755 index 0000000..f061e46 --- /dev/null +++ b/xinitrc @@ -0,0 +1,13 @@ +. ~/.profile +export LC_ALL=en_US.UTF-8 +xrdb -load ~/.Xresources & +autocutsel & +xsetroot -solid '#282C34' & +ulimit -c 0 & +xclock -digital -geometry +7+1400 -face "Iosevka Aile:pixelsize=18:style=regular" -bg \#282C34 -fg \#B8BCC4 -strftime "FreeBSD/amd64 (mccd) %H:%M" & +gsettings set org.gnome.desktop.interface document-font-name 'Iosevka Aile' & +gsettings set org.gnome.desktop.interface font-name 'Iosevka Aile' & +gsettings set org.gnome.desktop.interface cursor-size 32 & +gsettings set org.gnome.desktop.interface cursor-theme Adwaita & +setxkbmap -layout us -variant colemak -option "caps:capslock" & +dbus-run-session cwm diff --git a/xsession b/xsession deleted file mode 100755 index 2b0636d..0000000 --- a/xsession +++ /dev/null @@ -1,16 +0,0 @@ -. ~/.profile -export LC_ALL=en_US.UTF-8 -xrdb -load ~/.Xresources & -autocutsel & -xsetroot -solid '#282C34' & -ulimit -Sc 0 & -#xclock -digital -geometry +7+1400 -face "Iosevka Aile:pixelsize=18:style=Semibold Italic" -bg \#EEEEEE -fg \#444444 -strftime "%a %d %b %H:%M [Unix Machine]" & -gsettings set org.gnome.desktop.interface document-font-name 'Iosevka Aile' & -gsettings set org.gnome.desktop.interface font-name 'Iosevka Aile' & -gsettings set org.gnome.desktop.interface cursor-size 32 & -gsettings set org.gnome.desktop.interface cursor-theme Adwaita & -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 & -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 & -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 & -setxkbmap -layout us -variant colemak -option "caps:swapescape" & -dbus-run-session cwm -- cgit v1.2.3