From b718b8ef6eaacec84668c40f9ab52dda12df6669 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Wed, 3 Jul 2024 12:10:12 -0500 Subject: Alpine stuff --- Xresources | 6 ++++-- config/qutebrowser/autoconfig.yml | 6 +++++- cwmrc | 10 ++++++++-- kshrc | 10 +++++++--- profile | 13 +++++++++---- vim/pack/downloads/opt/snippets/snippets.vim | 14 ++++++++++++++ vimrc | 13 +++++++++++++ xsession | 8 +++----- 8 files changed, 63 insertions(+), 17 deletions(-) create mode 100644 vim/pack/downloads/opt/snippets/snippets.vim diff --git a/Xresources b/Xresources index 2fbfced..20cdfa8 100644 --- a/Xresources +++ b/Xresources @@ -1,5 +1,7 @@ Xcursor.theme: Adwaita Xcursor.size: 34 -XTerm*faceSize: 7 -XTerm*faceName: Envy Code R +XTerm*faceSize: 14 +XTerm*faceName: Iosevka SS13 Extended:style=light:antialias=true:hinting=false +xterm*scrollBar: true +xterm*rightScrollbar: true XTerm.termName: xterm-256color diff --git a/config/qutebrowser/autoconfig.yml b/config/qutebrowser/autoconfig.yml index a578568..caac3e5 100644 --- a/config/qutebrowser/autoconfig.yml +++ b/config/qutebrowser/autoconfig.yml @@ -113,7 +113,7 @@ settings: fonts.default_family: global: Iosevka Aile fonts.default_size: - global: 7pt + global: 14pt fonts.downloads: global: default_size default_family fonts.web.family.fantasy: @@ -132,8 +132,12 @@ settings: global: never tabs.show: global: switching + url.default_page: + global: https://kagi.com url.searchengines: global: DEFAULT: https://kagi.com/search?q={} + url.start_pages: + global: https://kagi.com zoom.default: global: 150% diff --git a/cwmrc b/cwmrc index 5140e1d..5e882c2 100644 --- a/cwmrc +++ b/cwmrc @@ -9,12 +9,18 @@ ignore xclock unbind-key all +bind-key 0-XF86MonBrightnessUp "doas brightnessctl s +5%" +bind-key 0-XF86MonBrightnessDown "doas brightnessctl s 5%-" +bind-key 0-XF86AudioLowerVolume "pamixer -d 5" +bind-key 0-XF86AudioRaiseVolume "pamixer -i 5" +bind-key 0-XF86AudioMute "pamixer -t" + color menufg "#FFFFFF" #black color font "#000000" #black color menubg "#F5E094" #white color selfont "#000000" #black -color activeborder "#559999" -color inactiveborder "#E8E8E8" +color activeborder "#777777" +color inactiveborder "#DDDDDD" bind-mouse 4-3 window-resize bind-mouse 4-1 window-move diff --git a/kshrc b/kshrc index da9c5a0..b44ea1a 100644 --- a/kshrc +++ b/kshrc @@ -1,8 +1,10 @@ export GPG_TTY=/dev/pts/0 export HISTFILE="$HOME/.history" -alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build" +#alias grep="ugrep --exclude-dir=node-modules --exclude-dir=_build" alias e="$EDITOR" alias g="git" +alias grep="ugrep" +alias tldr="NO_COLOR=1 tldr" #alias sdf="sshpass -p $(pass sdf) ssh mccd@tty.sdf.org" alias de='eval "$(direnv export bash)"' alias f-commit="fossil commit && fossil git export" @@ -15,5 +17,7 @@ if [ -x "$(command -v opam)" ]; then eval $(opam env) fi -date -apm +echo "BAT: $(cat /sys/class/power_supply/BAT0/capacity)%" + +eval "$(zoxide init posix --hook prompt)" + diff --git a/profile b/profile index 88af8f3..befa458 100644 --- a/profile +++ b/profile @@ -1,7 +1,3 @@ -# $OpenBSD: dot.profile,v 1.8 2022/08/10 07:40:37 tb Exp $ -# -# sh/ksh initialization - PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin export PATH HOME TERM @@ -9,6 +5,8 @@ export EDITOR="vim" export GDK_DPI_SCALE="1.5" export GDK_SCALE="1.5" export XCURSOR_SIZE="32" +# So when you hover the desktop, it still uses Adwaita +export XCURSOR_THEME="Adwaita" export PF_INFO="ascii title os editor shell wm" export PF_ALIGN="5" export PF_COLOR="0" @@ -22,3 +20,10 @@ export HISTSIZE=65535 export HISTFILE=$HOME/.history export STITCH_DIRECTORY=/home/mccd/notes export STITCH_GREP_CMD=ugrep + +if [ -e /home/mccd/.nix-profile/etc/profile.d/nix.sh ]; then . /home/mccd/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer + +if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]; then + exec startx +fi + diff --git a/vim/pack/downloads/opt/snippets/snippets.vim b/vim/pack/downloads/opt/snippets/snippets.vim new file mode 100644 index 0000000..d4c6e4e --- /dev/null +++ b/vim/pack/downloads/opt/snippets/snippets.vim @@ -0,0 +1,14 @@ + +autocmd FileType go + \ :iabbrev err@ if err != nil {} + +autocmd FileType go + \ :iabbrev hand@ ^ifunc A(c *gin.Context) { + +autocmd FileType go + \ :iabbrev fat@ log.Fatal(" %v", err)F%i + +:autocmd FileType php,html.twig,html,javascript,typescript,vue,go + \ :iabbrev if@ if() {}%i + + diff --git a/vimrc b/vimrc index 3a39621..2b59d72 100644 --- a/vimrc +++ b/vimrc @@ -1,5 +1,8 @@ packadd snippets +" General +set ignorecase + " Indentation set tabstop=8 set shiftround @@ -13,6 +16,8 @@ syntax on set background=light set rnu colorscheme quiet +set incsearch +set matchpairs+=<:> hi Normal ctermfg=black ctermbg=white "hi Keyword ctermfg=black cterm=bold hi SpellBad term=reverse cterm=underline ctermfg=124 ctermbg=white @@ -113,6 +118,8 @@ end autocmd Filetype go set makeprg=go\ build autocmd Filetype go autocmd BufWritePre :LspFormat +au BufRead,BufNewFile *.tmpl set filetype=tmpl +autocmd Filetype tmpl setlocal tabstop=2 " Nix if exists('g:loaded_lsp') @@ -137,11 +144,17 @@ if exists('g:loaded_lsp') end +autocmd Filetype markdown setlocal spell + + + " Keybindings let mapleader=" " noremap , : noremap e :e **/ noremap gd mB:LspGotoDefinition +noremap ]d :LspDiagNext +noremap [d :LspDiagPrev noremap gs mB:LspDocumentSymbol noremap gr mB:LspGotoImpl noremap ca :LspCodeAction diff --git a/xsession b/xsession index d388602..8247cd3 100755 --- a/xsession +++ b/xsession @@ -1,4 +1,3 @@ -. ~/.profile xrdb -load ~/.Xresources & xsetroot -solid '#282c34' & #xclock -digital -geometry +2250+1400 -face "Ttyp0:pixelsize=24:antialias=false:autohint=false" & @@ -6,9 +5,8 @@ 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 & -ulimit -Sc 0 & -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 & +#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:capslock" & dbus-run-session cwm -- cgit v1.2.3