From d23b28eb8f84884ce5d1e2acde0b9774166b8ce6 Mon Sep 17 00:00:00 2001 From: sev Date: Thu, 10 Mar 2022 23:48:11 -0600 Subject: [PATCH] switch to sway/wayland, update zsh/mod, move files zsh: - update submodules - finalize development work on zprofile - complete refactor of most code - now much more stable and compatible wayland move: - rename i3 -> sway - update config for sway compat - remove xorg specific files - .xinitrc migrated to sway config - .Xmodmap replaced with sway input block - keep .Xresources but remove urxvt stuff, for Xwayland - remove dmenu/dpass shims, replaced with nwg - remove urxvt module - update GTK configs for proper theme support refactor: - rename xorg directory to gui since it holds wayland and xorg content now - rename xdg to etc - rename root to syslinux since that's all it contains install.sh: - complete refactor for better functionality and new dir name support bin: - made small change to ykman-oath-reload --- .gitignore | 6 +- .gitmodules | 7 +- base/.Xmodmap | 1 - base/.Xresources | 68 +----- base/.gtkrc-2.0 | 4 +- .../pack/commentary.vim/start/vim-commentary | 2 +- .../speeddating.vim/start/vim-speeddating | 2 +- .../.vim/pack/surround.vim/start/vim-surround | 2 +- base/.vim/pack/todo.txt/start/todo.txt-vim | 2 +- base/.xinitrc | 74 ------- base/.zprofile | 26 ++- base/.zshrc | 7 + bin/dmenu | 2 - bin/dmenu_runsmart | 18 -- bin/dpass | 8 - bin/ykman-oath-reload | 0 {xdg => etc}/cava/config | 0 {xdg => etc}/compton.conf | 0 {xdg => etc}/dunst/dunstrc | 1 - {xdg => etc}/fontconfig/fonts.conf | 0 {xdg => etc}/gtk-3.0/settings.ini | 5 +- {xdg => etc}/i3status/config | 0 {xdg => etc}/i3status/tint2-cpu-net | 0 {xdg/i3 => etc/sway}/config | 199 +++++++++--------- {xdg => etc}/tint2/tint2rc | 0 {xdg => etc}/user-dirs.dirs | 0 {xdg => etc}/volumeicon/volumeicon | 0 {gpg => gnupg}/gpg-agent.conf | 0 {gpg => gnupg}/gpg.conf | 0 {gpg => gnupg}/sshcontrol | 0 {fonts => gui/fonts}/Adobe/LICENSE.md | 0 .../SourceSansPro/SourceSansPro-Black.otf | Bin .../SourceSansPro/SourceSansPro-BlackIt.otf | Bin .../SourceSansPro/SourceSansPro-Bold.otf | Bin .../SourceSansPro/SourceSansPro-BoldIt.otf | Bin .../SourceSansPro-ExtraLight.otf | Bin .../SourceSansPro-ExtraLightIt.otf | Bin .../Adobe/SourceSansPro/SourceSansPro-It.otf | Bin .../SourceSansPro/SourceSansPro-Light.otf | Bin .../SourceSansPro/SourceSansPro-LightIt.otf | Bin .../SourceSansPro/SourceSansPro-Regular.otf | Bin .../SourceSansPro/SourceSansPro-Semibold.otf | Bin .../SourceSansPro-SemiboldIt.otf | Bin .../SourceSansVariable-Italic.otf | Bin .../SourceSansVariable-Roman.otf | Bin .../SourceSerifPro/SourceSerifPro-Black.otf | Bin .../SourceSerifPro/SourceSerifPro-BlackIt.otf | Bin .../SourceSerifPro/SourceSerifPro-Bold.otf | Bin .../SourceSerifPro/SourceSerifPro-BoldIt.otf | Bin .../SourceSerifPro-ExtraLight.otf | Bin .../SourceSerifPro-ExtraLightIt.otf | Bin .../SourceSerifPro/SourceSerifPro-It.otf | Bin .../SourceSerifPro/SourceSerifPro-Light.otf | Bin .../SourceSerifPro/SourceSerifPro-LightIt.otf | Bin .../SourceSerifPro/SourceSerifPro-Regular.otf | Bin .../SourceSerifPro-Semibold.otf | Bin .../SourceSerifPro-SemiboldIt.otf | Bin {fonts => gui/fonts}/Dina-ttf/Dina.ttf | Bin {fonts => gui/fonts}/Dina-ttf/LICENSE | 0 {fonts => gui/fonts}/Dina/Dina_i400-10.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_i400-8.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_i400-9.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_i700-10.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_i700-8.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_i700-9.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_r400-10.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_r400-6.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_r400-8.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_r400-9.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_r700-10.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_r700-8.pcf.gz | Bin {fonts => gui/fonts}/Dina/Dina_r700-9.pcf.gz | Bin {fonts => gui/fonts}/Dina/LICENSE | 0 {fonts => gui/fonts}/Dina/NEWS | 0 {xorg => gui}/icons/paper-icon-theme | 0 {xorg => gui}/themes/Blackbird | 0 install.sh | 136 ++++++------ {root => syslinux}/syslinux.cfg | 0 {root => syslinux}/update-extlinux.conf | 0 urxvt-ext/urxvt-font-size | 1 - 80 files changed, 213 insertions(+), 358 deletions(-) delete mode 100644 base/.Xmodmap delete mode 100644 base/.xinitrc delete mode 100755 bin/dmenu delete mode 100755 bin/dmenu_runsmart delete mode 100755 bin/dpass mode change 100644 => 100755 bin/ykman-oath-reload rename {xdg => etc}/cava/config (100%) rename {xdg => etc}/compton.conf (100%) rename {xdg => etc}/dunst/dunstrc (99%) rename {xdg => etc}/fontconfig/fonts.conf (100%) rename {xdg => etc}/gtk-3.0/settings.ini (85%) rename {xdg => etc}/i3status/config (100%) rename {xdg => etc}/i3status/tint2-cpu-net (100%) rename {xdg/i3 => etc/sway}/config (64%) rename {xdg => etc}/tint2/tint2rc (100%) rename {xdg => etc}/user-dirs.dirs (100%) rename {xdg => etc}/volumeicon/volumeicon (100%) rename {gpg => gnupg}/gpg-agent.conf (100%) rename {gpg => gnupg}/gpg.conf (100%) rename {gpg => gnupg}/sshcontrol (100%) rename {fonts => gui/fonts}/Adobe/LICENSE.md (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-Black.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-BlackIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-Bold.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-BoldIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-ExtraLight.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-ExtraLightIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-It.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-Light.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-LightIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-Regular.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-Semibold.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansPro-SemiboldIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansVariable-Italic.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSansPro/SourceSansVariable-Roman.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-Black.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-BlackIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-Bold.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-BoldIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-ExtraLight.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-ExtraLightIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-It.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-Light.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-LightIt.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-Regular.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-Semibold.otf (100%) rename {fonts => gui/fonts}/Adobe/SourceSerifPro/SourceSerifPro-SemiboldIt.otf (100%) rename {fonts => gui/fonts}/Dina-ttf/Dina.ttf (100%) rename {fonts => gui/fonts}/Dina-ttf/LICENSE (100%) rename {fonts => gui/fonts}/Dina/Dina_i400-10.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_i400-8.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_i400-9.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_i700-10.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_i700-8.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_i700-9.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_r400-10.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_r400-6.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_r400-8.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_r400-9.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_r700-10.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_r700-8.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/Dina_r700-9.pcf.gz (100%) rename {fonts => gui/fonts}/Dina/LICENSE (100%) rename {fonts => gui/fonts}/Dina/NEWS (100%) rename {xorg => gui}/icons/paper-icon-theme (100%) rename {xorg => gui}/themes/Blackbird (100%) rename {root => syslinux}/syslinux.cfg (100%) rename {root => syslinux}/update-extlinux.conf (100%) delete mode 160000 urxvt-ext/urxvt-font-size diff --git a/.gitignore b/.gitignore index 8b8426c..deae638 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,6 @@ base/.vim/.netrwhist *.swo # fontconfig -/fonts/**/.uuid -/fonts/**/fonts.dir -/fonts/**/fonts.scale +/gui/fonts/**/.uuid +/gui/fonts/**/fonts.dir +/gui/fonts/**/fonts.scale diff --git a/.gitmodules b/.gitmodules index 0861fc8..af0b418 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,12 +13,9 @@ [submodule "vim-repeat"] path = base/.vim/pack/repeat.vim/start/vim-repeat url = https://github.com/tpope/vim-repeat -[submodule "urxvt-font-size"] - path = urxvt-ext/urxvt-font-size - url = https://github.com/majutsushi/urxvt-font-size [submodule "paper-icon-theme"] - path = xorg/icons/paper-icon-theme + path = gui/icons/paper-icon-theme url = https://github.com/snwh/paper-icon-theme [submodule "Blackbird"] - path = xorg/themes/Blackbird + path = gui/themes/Blackbird url = https://github.com/shimmerproject/Blackbird diff --git a/base/.Xmodmap b/base/.Xmodmap deleted file mode 100644 index cf490f9..0000000 --- a/base/.Xmodmap +++ /dev/null @@ -1 +0,0 @@ -add mod3 = Scroll_Lock diff --git a/base/.Xresources b/base/.Xresources index f81b439..f3ed5f7 100644 --- a/base/.Xresources +++ b/base/.Xresources @@ -13,7 +13,7 @@ Xft.hinting: 1 Xft.hintstyle: hintslight ! theming -Xcursor.theme: Paper-Mono-Dark +Xcursor.theme: Paper ! colors *background: #010812 @@ -48,69 +48,3 @@ Xcursor.theme: Paper-Mono-Dark ! light grey/white *color7: #bcc2cc *color15: #e8ebee - -! URxvt -URxvt.termName: rxvt-unicode-256color -URxvt.perl-ext: -URxvt.perl-ext-common: searchable-scrollback,confirm-paste,matcher,font-size - -URxvt.depth: 32 -URxvt.background: rgba:0100/0800/1200/d000 -URxvt.internalBorder: 1 -URxvt.dynamicColors: true -URxvt.intensityStyles: false -URxvt.cursorBlink: on -URxvt.scrollstyle: plain -URxvt.scrollBar_right: true -URxvt.urgentOnBell: true -URxvt.visualBell: true - -URxvt.url-launcher: xdg-open -URxvt.matcher.button: 2 -URxvt.matcher.pattern.0: [a-zA-Z\d]+:/\/[\\w-](?:\\.?[\\w-]+)*(?::\\d{1,5})?(?:/(?:[\\w\\d\\.!#$&\\-;=?~[\\]/]|%[\\da-fA-F]{2})*)? -URxvt.matcher.rend.0: Uline Bold fg6 -!URxvt.matcher.pattern.1: \\s(/\\S+?):(\\d+)(?=:|$) -!URxvt.matcher.rend.1: Uline fg3 -!URxvt.matcher.launcher.1: urxvtc -e vim +$2 $1 -URxvt.keysym.M-o: matcher:last -URxvt.keysym.M-u: matcher:list -URxvt.keysym.M-plus: font-size:increase -URxvt.keysym.M-minus: font-size:decrease -URxvt.keysym.M-equal: font-size:reset -URxvt.keysym.M-slash: font-size:show - -URxvt.print-pipe: cat > "$HOME/urxvt-$(date +'%Y-%m-%d-%H%M%S')" - -! bg terminal 1 -TermBg1.termName: rxvt-unicode-256color -TermBg1.perl-ext: -TermBg1.perl-ext-common: - -TermBg1.scrollBar: false -TermBg1.cursorUnderline: true -TermBg1.visualBell: true - -TermBg1.depth: 32 -TermBg1.borderLess: true -TermBg1.transparent: true -TermBg1.shading: 80 -TermBg1.blurRadius: 2x4 - -! bg terminal 2 -TermBg2.termName: rxvt-unicode-256color -TermBg2.perl-ext: -TermBg2.perl-ext-common: - -TermBg2.scrollBar: false -TermBg2.cursorUnderline: true -TermBg2.visualBell: true - -TermBg2.depth: 32 -TermBg2.borderLess: true -TermBg2.transparent: true - -! xvkbd -xvkbd.Alt_R.width: 1 -xvkbd.Meta_R.width: 1 -xvkbd.Multi_key.width: 1 -xvkbd.Shift_R.width: 75 diff --git a/base/.gtkrc-2.0 b/base/.gtkrc-2.0 index a701f5f..6612551 100644 --- a/base/.gtkrc-2.0 +++ b/base/.gtkrc-2.0 @@ -1,4 +1,4 @@ +gtk-font-name="monospace-10" gtk-theme-name="Blackbird" gtk-icon-theme-name="Paper-Mono-Dark" -gtk-font-name="monospace-10" -gtk-cursor-theme-name="Paper-Mono-Dark" +gtk-cursor-theme-name="Paper" diff --git a/base/.vim/pack/commentary.vim/start/vim-commentary b/base/.vim/pack/commentary.vim/start/vim-commentary index f8238d7..627308e 160000 --- a/base/.vim/pack/commentary.vim/start/vim-commentary +++ b/base/.vim/pack/commentary.vim/start/vim-commentary @@ -1 +1 @@ -Subproject commit f8238d70f873969fb41bf6a6b07ca63a4c0b82b1 +Subproject commit 627308e30639be3e2d5402808ce18690557e8292 diff --git a/base/.vim/pack/speeddating.vim/start/vim-speeddating b/base/.vim/pack/speeddating.vim/start/vim-speeddating index fe98cfa..95da3d7 160000 --- a/base/.vim/pack/speeddating.vim/start/vim-speeddating +++ b/base/.vim/pack/speeddating.vim/start/vim-speeddating @@ -1 +1 @@ -Subproject commit fe98cfaa7ea9c4b838d42a6830437c919eb55b4e +Subproject commit 95da3d72efc91a5131acf388eafa4b1ad6512a9b diff --git a/base/.vim/pack/surround.vim/start/vim-surround b/base/.vim/pack/surround.vim/start/vim-surround index f51a26d..baf89ad 160000 --- a/base/.vim/pack/surround.vim/start/vim-surround +++ b/base/.vim/pack/surround.vim/start/vim-surround @@ -1 +1 @@ -Subproject commit f51a26d3710629d031806305b6c8727189cd1935 +Subproject commit baf89ad26488f6a7665d51b986f5c7ad2d22b30b diff --git a/base/.vim/pack/todo.txt/start/todo.txt-vim b/base/.vim/pack/todo.txt/start/todo.txt-vim index 6845221..ed9d639 160000 --- a/base/.vim/pack/todo.txt/start/todo.txt-vim +++ b/base/.vim/pack/todo.txt/start/todo.txt-vim @@ -1 +1 @@ -Subproject commit 6845221d45bd62e604c2024bc511a56e79d1118b +Subproject commit ed9d639de2e34eafb82f2682010ab361966ee40f diff --git a/base/.xinitrc b/base/.xinitrc deleted file mode 100644 index 30db18b..0000000 --- a/base/.xinitrc +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/zsh -# using zsh to load .zshenv (eg. for PATH) but file is sh-compatible - -# Xorg settings -# TODO: create shim for cpp -xrdb -merge ~/.Xresources -xmodmap ~/.Xmodmap -xset r rate 290 26 & -xset m 1/1 0 & -xset s off -xset dpms 0 0 600 -find -L "${XDG_DATA_HOME:-~/share}/fonts" -mindepth 1 -maxdepth 2 -type d | while read -r x; do - [ -f "$x/fonts.dir" ] && xset +fp $x -done -xset fp rehash - -# redshift, root image -redon & -wall & - -# root terminal -urxvt -name TermBg1 -override-redirect -geometry x5+0--1 \ - -e tail -F /var/log/messages & -xdotool search --limit 1 --sync --classname TermBg1 windowsize --usehints 100% 6 - -# tray icons -#"$HOME/src/phwmon/phwmon.py" --mem --mem_percent --net --io --bg \#0000 & -volumeicon & - -# daemons -dunst & -mpc-notify -d & -xautolock -time 10 -locker "$HOME/bin/lck" & -xbanish & - -if [ -z "$TERMINAL" -a \( -x $(which -a urxvtd | head -1) \) ]; then - for i in 1 2; do - # try to start client twice, once before checking for daemon - # and another after trying to start it - urxvtc -e exit >/dev/null 2>&1 - if [ $? -eq 2 ]; then - # daemon not started, attempt to start once - if [ $i -eq 1 ]; then - urxvtd -q -o -f - else - TERMINAL=urxvt - export TERMINAL - fi - else - TERMINAL=urxvtc - export TERMINAL - break - fi - done - unset i -fi - -# taskbar -# sleep to wait for session to start fully -(sleep 0.1 && tint2) & - -# x220t -# TODO: check hostname to load auxillary things -# TODO: reformat for linux -#(sleep 0.1 "$HOME/bin/acpi_ac" "0x0`sysctl -n hw.acpi.acline`") & - -# start session -if [ -z "$1" ]; then - session=i3 -else - session=$1 - shift -fi -exec $session "$@" diff --git a/base/.zprofile b/base/.zprofile index 1131a98..1abd5b5 100644 --- a/base/.zprofile +++ b/base/.zprofile @@ -32,8 +32,9 @@ if [[ ! -v _sev_setup_path || -o login ]] { # add as many generic paths as possible to keep the order we want # NOTE: /usr/{local,pkg,games} are unix/bsdisms syspath=("$path[@]") - path=({~/,/,/usr/}sbin /opt/{s,}bin /usr/local/{s,}bin /usr/pkg/{s,}bin - /usr/X11R{7,6}/bin /usr/games {~/,/,/usr/}bin) + path=({~,~/.local,,/usr,/opt,/usr/local,/usr/pkg}/sbin + {~,~/.local,,/usr,/opt,/usr/local,/usr/pkg}/bin + /usr/X11R{7,6}/bin /usr/games) ((len=$#path)) path=("$path[@]" "$syspath[@]") # remove nonexistent and duplicate paths @@ -97,17 +98,24 @@ if [[ ! -v _sev_setup_xdg ]] { # NOTE: include and then remove CONFIG_HOME and DATA_HOME to ensure they # are not present in the array if it was added before we got to it typeset -UT XDG_CONFIG_DIRS xdg_config_dirs - typeset -UT XDG_DATA_DIRS xdg_data_dirs - export XDG_CONFIG_HOME=$HOME/etc - xdg_config_dirs=($XDG_CONFIG_HOME $HOME/.config + export XDG_CONFIG_HOME=~/etc + mkdir -p $XDG_CONFIG_HOME + xdg_config_dirs=($XDG_CONFIG_HOME ~/.config {/opt,/usr/local,/usr/pkg,}/etc/xdg "${XDG_CONFIG_DIRS:+${xdg_config_dirs[@]}}") export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS#$XDG_CONFIG_HOME} - export XDG_DATA_HOME=$HOME/share - xdg_data_dirs=($XDG_DATA_HOME $HOME/.local/share + + typeset -UT XDG_DATA_DIRS xdg_data_dirs + export XDG_DATA_HOME=~/share + mkdir -p $XDG_DATA_HOME + xdg_data_dirs=($XDG_DATA_HOME ~/.local/share /{opt,usr/local,usr/pkg,usr}/share "${XDG_DATA_DIRS:+${xdg_data_dirs[@]}}") export XDG_DATA_DIRS=${XDG_DATA_DIRS#$XDG_DATA_HOME} + + export XDG_STATE_HOME=~/var/lib + mkdir -p $XDG_STATE_HOME + # use our custom tmp for cache and runtime export XDG_CACHE_HOME=$_sev_tmp/.xdg.cache export XDG_RUNTIME_DIR=$_sev_tmp/.xdg.runtime @@ -119,8 +127,10 @@ if [[ ! -v _sev_setup_xdg ]] { elif [[ -e $x ]]; then rm -rf $x 2>/dev/null fi + # XXX: cache does not have to be 700 according to spec mkdir -m700 $x 2>/dev/null done + # source user dirs after other vars [[ -e $XDG_CONFIG_HOME/user-dirs.dirs ]] && emulate sh -c "source $XDG_CONFIG_HOME/user-dirs.dirs" @@ -155,6 +165,8 @@ if [[ ! -v _sev_setup_xdg ]] { # would open up too many edge cases where it wouldn't work or be clunky # (e.g. asking for password twice) to make it worth it. if [[ ! -v _sev_setup_agents ]] { + export GNUPGHOME=~/etc/gnupg + function _socketpath { # dirs are percent-encoded: https://stackoverflow.com/a/64312099 echo ${1//(#b)%([[:xdigit:]](#c2))/${(#):-0x$match[1]}} diff --git a/base/.zshrc b/base/.zshrc index 488abbd..9ce0d1e 100644 --- a/base/.zshrc +++ b/base/.zshrc @@ -28,6 +28,13 @@ export HISTSIZE=1000 export SAVEHIST=1000 ## python export PYTHONSTARTUP=~/.pythonrc +## wayland/sway +# XXX: only do this if we're actually in wayland, but without a start script +export XDG_SESSION_TYPE=wayland +export QT_QPA_PLATFORM=wayland-egl +export QT_WAYLAND_DISABLE_WINDOWDECORATION=-1 +export SDL_VIDEODRIVER=wayland +export TERMINAL=footclient ### keys bindkey -v diff --git a/bin/dmenu b/bin/dmenu deleted file mode 100755 index 0784cdf..0000000 --- a/bin/dmenu +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec $(which -a dmenu | grep -v "$HOME" | head -1) -b -f -fn 'monospace-10' -nb \#110800 -nf \#93a1a1 -sb \#aa5500 -sf \#eee8d5 "$@" diff --git a/bin/dmenu_runsmart b/bin/dmenu_runsmart deleted file mode 100755 index c62e9ce..0000000 --- a/bin/dmenu_runsmart +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -cmd=$(dmenu_path | ~/bin/dmenu "$@") -if [ -n "$cmd" ]; then - # NOTE: only tested with zsh and sh, and has issues with expansion; zsh - # SH_WORD_SPLIT is unset by default, `=' flag is required to expand it. - # XXX: probably has issues with single quotes - # XXX: does not perform any(!) shell expansion - echo "alias sudo='sudo -Ak' -cmd='$(echo "$cmd" | sed "s/'/'\\\\''/g")'" ' -if [ -n "$ZSH_VERSION" ]; then - out="$(${=cmd} 2>&1)" -else - out="$($cmd 2>&1)" -fi -code=$? -out="$(echo "$out" | tail -n 3)" -notify-send -t 10000 -u $([ $code != 0 ] && echo normal || echo low) -a ' "'$(basename $0)'" ' "${cmd}$([ $code != 0 ] && echo \: $code)" "$out"' | SUDO_ASKPASS=~/bin/dpass ${SHELL:-"/bin/sh"} -fi diff --git a/bin/dpass b/bin/dpass deleted file mode 100755 index c37942b..0000000 --- a/bin/dpass +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -. ~/bin/.check-busybox -p="$1" -if [ -z "$p" ] && ! check-busybox ps; then - p="[$(ps -o comm= -p $(ps -o ppid= -p $$))]"; -fi -~/bin/dmenu -p "$p" -fn Dina-10 -nb \#110800 -nf \#110800 -sb \#264bd2 -sf \#fdf6e3 <&- -unset check-busybox diff --git a/bin/ykman-oath-reload b/bin/ykman-oath-reload old mode 100644 new mode 100755 diff --git a/xdg/cava/config b/etc/cava/config similarity index 100% rename from xdg/cava/config rename to etc/cava/config diff --git a/xdg/compton.conf b/etc/compton.conf similarity index 100% rename from xdg/compton.conf rename to etc/compton.conf diff --git a/xdg/dunst/dunstrc b/etc/dunst/dunstrc similarity index 99% rename from xdg/dunst/dunstrc rename to etc/dunst/dunstrc index 6b0bb54..65c4ee5 100644 --- a/xdg/dunst/dunstrc +++ b/etc/dunst/dunstrc @@ -20,7 +20,6 @@ icon_path = "~/.icons/Paper/16x16/actions:~/.icons/Paper/16x16/apps:~/.icons/Pap dmenu = "~/bin/dmenu -p dunst:" browser = /usr/bin/firefox -[shortcuts] close = mod4+shift+grave #close_all = mod4+mod2+grave history = mod4+grave diff --git a/xdg/fontconfig/fonts.conf b/etc/fontconfig/fonts.conf similarity index 100% rename from xdg/fontconfig/fonts.conf rename to etc/fontconfig/fonts.conf diff --git a/xdg/gtk-3.0/settings.ini b/etc/gtk-3.0/settings.ini similarity index 85% rename from xdg/gtk-3.0/settings.ini rename to etc/gtk-3.0/settings.ini index 8d7652a..6882323 100644 --- a/xdg/gtk-3.0/settings.ini +++ b/etc/gtk-3.0/settings.ini @@ -1,8 +1,9 @@ [Settings] +gtk-font-name=monospace 10 gtk-theme-name=Blackbird gtk-icon-theme-name=Paper-Mono-Dark -gtk-font-name=monospace 10 -gtk-cursor-theme-name=Paper-Mono-Dark +gtk-application-prefer-dark-theme=true +gtk-cursor-theme-name=Paper gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR diff --git a/xdg/i3status/config b/etc/i3status/config similarity index 100% rename from xdg/i3status/config rename to etc/i3status/config diff --git a/xdg/i3status/tint2-cpu-net b/etc/i3status/tint2-cpu-net similarity index 100% rename from xdg/i3status/tint2-cpu-net rename to etc/i3status/tint2-cpu-net diff --git a/xdg/i3/config b/etc/sway/config similarity index 64% rename from xdg/i3/config rename to etc/sway/config index 8b7b33c..7f6e0a1 100644 --- a/xdg/i3/config +++ b/etc/sway/config @@ -1,46 +1,78 @@ +### load system +include /etc/sway/config.d/* + +### exports +# XXX: this works but I feel like it shouldn't +exec '\ + export XDG_SESSION_TYPE=${XDG_SESSION_TYPE:-wayland}; \ + export QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-wayland-egl}; \ + export QT_WAYLAND_DISABLE_WINDOWDECORATION=${QT_WAYLAND_DISABLE_WINDOWDECORATION:--1}; \ + export SDL_VIDEODRIVER=${SDL_VIDEODRIVER:-wayland}; \ + export TERMINAL=${TERMINAL:-footclient}' + +### daemons +exec dunst +exec foot --server +#exec mpc-notify -d +exec swayidle timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' +# x220t +# TODO: check hostname to load auxillary things +# TODO: reformat for linux +#exec acpi_ac "0x0`sysctl -n hw.acpi.acline`" + +### Xorg config +xwayland force +# XXX: this works but I feel like it shouldn't +exec xrdb -merge ~/.Xresources +exec '\ + find -L "$${XDG_DATA_HOME:-~/share}/fonts" -mindepth 1 -maxdepth 2 -type d | while read -r x; do \ + [ -f "$$x/fonts.dir" ] && xset +fp "$$x"; \ + done; \ + xset fp rehash' + +### inputs +input 1:1:AT_Translated_Set_2_keyboard { + xkb_layout us + xkb_options caps:super + xkb_numlock enable + repeat_delay 290 + repeat_rate 26 +} -# master modifier key +### binds set $mod Mod4 -### important binds ### -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace -bindsym $mod+Shift+r restart -# exit i3 -bindsym $mod+Shift+e exec --no-startup-id i3-nagbar -t warning -m Exit? -b Yes 'i3-msg exit' - -### applications ### -# x220t bezel buttons -bindcode 198 exec --no-startup-id rotate set normal -bindcode 204 exec --no-startup-id rotate right +bindsym $mod+Shift+r reload +bindsym $mod+Shift+e exec swaynag -t warning -m Exit? -b Yes 'swaymsg exit' -# terminal -bindsym $mod+Return exec --no-startup-id i3-sensible-terminal +## terminal +bindsym $mod+Return exec [ -n "$$TERMINAL" ] && exec $$TERMINAL || exec footclient -# dmenu -bindsym $mod+d exec --no-startup-id $HOME/bin/dmenu_runsmart -p "%" +## menu +bindsym $mod+d exec nwgdmenu +bindsym $mod+Shift+d exec nwggrid +bindsym $mod+Ctrl+d exec nwgbar +## special # mpc -bindsym XF86AudioPlay exec --no-startup-id mpc -h /var/mpd/socket play -bindsym XF86AudioStop exec --no-startup-id mpc -h /var/mpd/socket pause -bindsym XF86AudioPrev exec --no-startup-id mpc -h /var/mpd/socket cdprev -bindsym XF86AudioNext exec --no-startup-id mpc -h /var/mpd/socket next - +#bindsym XF86AudioPlay exec mpc -h /var/mpd/socket play +#bindsym XF86AudioStop exec mpc -h /var/mpd/socket pause +#bindsym XF86AudioPrev exec mpc -h /var/mpd/socket cdprev +#bindsym XF86AudioNext exec mpc -h /var/mpd/socket next +# x220t bezel buttons +#bindcode 198 exec rotate set normal +#bindcode 204 exec rotate right -### window management ### -# directional keys +## window management set $up k set $down j set $left h set $right l -# arrow keys for completeness set $up2 Up set $down2 Down set $left2 Left set $right2 Right -# change focus bindsym $mod+$left focus left bindsym $mod+$down focus down bindsym $mod+$up focus up @@ -49,7 +81,8 @@ bindsym $mod+$left2 focus left bindsym $mod+$down2 focus down bindsym $mod+$up2 focus up bindsym $mod+$right2 focus right -# move focused window +bindsym $mod+a focus parent +bindsym $mod+z focus child bindsym $mod+Shift+$left move left bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up @@ -59,46 +92,25 @@ bindsym $mod+Shift+$down2 move down bindsym $mod+Shift+$up2 move up bindsym $mod+Shift+$right2 move right -# split in horizontal orientation bindsym $mod+i split h -# split in vertical orientation bindsym $mod+o split v -# mouse+$mod to drag floating windows floating_modifier $mod +bindsym $mod+Shift+space floating toggle +bindsym $mod+space focus mode_toggle -# enter fullscreen mode for the focused container bindsym $mod+f fullscreen toggle bindsym $mod+Shift+f fullscreen toggle global -# change container layout (stacked, tabbed, toggle split) bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -bindsym $mod+z focus child - -# kill focused window bindsym $mod+Shift+q kill -# move the currently focused window to the scratchpad bindsym $mod+Shift+minus move scratchpad - -# Show the next scratchpad window or hide the focused scratchpad window. -# If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+minus scratchpad show -# switch to workspace bindsym $mod+1 workspace 1 bindsym $mod+2 workspace 2 bindsym $mod+3 workspace 3 @@ -109,10 +121,8 @@ bindsym $mod+7 workspace 7 bindsym $mod+8 workspace 8 bindsym $mod+9 workspace 9 bindsym $mod+0 workspace 10 -# repeat workspace to go back workspace_auto_back_and_forth yes -# move focused container to workspace bindsym $mod+Shift+1 move container to workspace 1 bindsym $mod+Shift+2 move container to workspace 2 bindsym $mod+Shift+3 move container to workspace 3 @@ -122,9 +132,8 @@ bindsym $mod+Shift+6 move container to workspace 6 bindsym $mod+Shift+7 move container to workspace 7 bindsym $mod+Shift+8 move container to workspace 8 bindsym $mod+Shift+9 move container to workspace 9 -Bindsym $mod+Shift+0 move container to workspace 10 +bindsym $mod+Shift+0 move container to workspace 10 -# move and resize [floating] windows mode "translate" { bindsym $left resize shrink width 20 px bindsym $down resize grow height 20 px @@ -163,19 +172,15 @@ mode "translate" { bindsym Control+Shift+$up2 move up 1 px bindsym Control+Shift+$right2 move right 1 px - # toggle tiling / floating - bindsym $mod+Shift+space floating toggle - - # change focus between tiling / floating windows - bindsym $mod+space focus mode_toggle - - # focus the parent container + # focus bindsym $mod+a focus parent - - # focus the child container bindsym $mod+z focus child - # back to normal: Enter, Escape, or original key + # floating + bindsym $mod+Shift+space floating toggle + bindsym $mod+space focus mode_toggle + + # exit bindsym Return mode default bindsym Escape mode default bindsym $mod+r mode default @@ -183,21 +188,15 @@ mode "translate" { bindsym $mod+r mode "translate" -### appearance ### -# font -font pango:monospace 7 - -# windows -for_window [class="Gsimplecal"] floating enable -for_window [class="XMixer"] floating enable - -# borders +### appearance +font pango:monospace 10 +seat seat0 xcursor_theme Paper 16 +## borders +default_border pixel 1 hide_edge_borders smart -new_window pixel 1 gaps inner 6 smart_gaps on - -# color definitions +## colors # generic set $bg #110800 set $fg #93a1a1 @@ -225,30 +224,6 @@ set $b_bg #268bd2 set $b_fg #fdf6e3 set $b_ind #264db2 set $b_chb #4466ff - -# deprecated in favor of tint2 -#bar { -# position top -# output LVDS1 -# tray_output primary -# status_command i3status -# separator_symbol "|" -# -# colors { -# background $bg -# statusline $fg -# separator $b_ind -# -# # class border backgr. text -# focused_workspace $f_bdr $f_bg $f_fg -# active_workspace $i_bdr $i_bg $i_fg -# inactive_workspace $i_bdr $i_bg $i_fg -# urgent_workspace $u_bdr $u_bg $u_fg -# binding_mode $b_bdr $b_bg $b_fg -# } -#} - -# apply colors # class border backgr. text indicator child_border client.focused $f_bdr $f_bg $f_fg $f_ind $f_chb client.focused_inactive $i_bdr $i_bg $i_fg $i_ind $i_chb @@ -256,5 +231,27 @@ client.unfocused $i_bdr $i_bg $i_fg $i_ind $i_chb client.urgent $u_bdr $u_bg $u_fg $u_ind $u_chb client.placeholder $b_bdr $b_bg $b_fg $b_ind $b_chb client.background #221100 -# keep urgent colors around longer force_display_urgency_hint 2000 ms + +bar { + position top + tray_output primary + status_command i3status + separator_symbol "|" + + colors { + background $bg + statusline $fg + separator $b_ind + + # class border backgr. text + focused_workspace $f_bdr $f_bg $f_fg + active_workspace $i_bdr $i_bg $i_fg + inactive_workspace $i_bdr $i_bg $i_fg + urgent_workspace $u_bdr $u_bg $u_fg + binding_mode $b_bdr $b_bg $b_fg + } +} + +### load site-local +include config.d/* diff --git a/xdg/tint2/tint2rc b/etc/tint2/tint2rc similarity index 100% rename from xdg/tint2/tint2rc rename to etc/tint2/tint2rc diff --git a/xdg/user-dirs.dirs b/etc/user-dirs.dirs similarity index 100% rename from xdg/user-dirs.dirs rename to etc/user-dirs.dirs diff --git a/xdg/volumeicon/volumeicon b/etc/volumeicon/volumeicon similarity index 100% rename from xdg/volumeicon/volumeicon rename to etc/volumeicon/volumeicon diff --git a/gpg/gpg-agent.conf b/gnupg/gpg-agent.conf similarity index 100% rename from gpg/gpg-agent.conf rename to gnupg/gpg-agent.conf diff --git a/gpg/gpg.conf b/gnupg/gpg.conf similarity index 100% rename from gpg/gpg.conf rename to gnupg/gpg.conf diff --git a/gpg/sshcontrol b/gnupg/sshcontrol similarity index 100% rename from gpg/sshcontrol rename to gnupg/sshcontrol diff --git a/fonts/Adobe/LICENSE.md b/gui/fonts/Adobe/LICENSE.md similarity index 100% rename from fonts/Adobe/LICENSE.md rename to gui/fonts/Adobe/LICENSE.md diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Black.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-Black.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-Black.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-Black.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-BlackIt.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-BlackIt.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-BlackIt.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-BlackIt.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Bold.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-Bold.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-Bold.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-Bold.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-BoldIt.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-BoldIt.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-BoldIt.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-BoldIt.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLight.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLight.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLight.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLight.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLightIt.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLightIt.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLightIt.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-ExtraLightIt.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-It.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-It.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-It.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-It.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Light.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-Light.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-Light.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-Light.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-LightIt.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-LightIt.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-LightIt.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-LightIt.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Regular.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-Regular.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-Regular.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-Regular.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-Semibold.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-Semibold.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-Semibold.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-Semibold.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansPro-SemiboldIt.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansPro-SemiboldIt.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansPro-SemiboldIt.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansPro-SemiboldIt.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansVariable-Italic.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansVariable-Italic.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansVariable-Italic.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansVariable-Italic.otf diff --git a/fonts/Adobe/SourceSansPro/SourceSansVariable-Roman.otf b/gui/fonts/Adobe/SourceSansPro/SourceSansVariable-Roman.otf similarity index 100% rename from fonts/Adobe/SourceSansPro/SourceSansVariable-Roman.otf rename to gui/fonts/Adobe/SourceSansPro/SourceSansVariable-Roman.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Black.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Black.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-Black.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Black.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-BlackIt.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-BlackIt.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-BlackIt.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-BlackIt.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Bold.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Bold.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-Bold.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Bold.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-BoldIt.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-BoldIt.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-BoldIt.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-BoldIt.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLight.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLight.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLight.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLight.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLightIt.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLightIt.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLightIt.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-ExtraLightIt.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-It.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-It.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-It.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-It.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Light.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Light.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-Light.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Light.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-LightIt.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-LightIt.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-LightIt.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-LightIt.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Regular.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Regular.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-Regular.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Regular.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-Semibold.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Semibold.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-Semibold.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-Semibold.otf diff --git a/fonts/Adobe/SourceSerifPro/SourceSerifPro-SemiboldIt.otf b/gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-SemiboldIt.otf similarity index 100% rename from fonts/Adobe/SourceSerifPro/SourceSerifPro-SemiboldIt.otf rename to gui/fonts/Adobe/SourceSerifPro/SourceSerifPro-SemiboldIt.otf diff --git a/fonts/Dina-ttf/Dina.ttf b/gui/fonts/Dina-ttf/Dina.ttf similarity index 100% rename from fonts/Dina-ttf/Dina.ttf rename to gui/fonts/Dina-ttf/Dina.ttf diff --git a/fonts/Dina-ttf/LICENSE b/gui/fonts/Dina-ttf/LICENSE similarity index 100% rename from fonts/Dina-ttf/LICENSE rename to gui/fonts/Dina-ttf/LICENSE diff --git a/fonts/Dina/Dina_i400-10.pcf.gz b/gui/fonts/Dina/Dina_i400-10.pcf.gz similarity index 100% rename from fonts/Dina/Dina_i400-10.pcf.gz rename to gui/fonts/Dina/Dina_i400-10.pcf.gz diff --git a/fonts/Dina/Dina_i400-8.pcf.gz b/gui/fonts/Dina/Dina_i400-8.pcf.gz similarity index 100% rename from fonts/Dina/Dina_i400-8.pcf.gz rename to gui/fonts/Dina/Dina_i400-8.pcf.gz diff --git a/fonts/Dina/Dina_i400-9.pcf.gz b/gui/fonts/Dina/Dina_i400-9.pcf.gz similarity index 100% rename from fonts/Dina/Dina_i400-9.pcf.gz rename to gui/fonts/Dina/Dina_i400-9.pcf.gz diff --git a/fonts/Dina/Dina_i700-10.pcf.gz b/gui/fonts/Dina/Dina_i700-10.pcf.gz similarity index 100% rename from fonts/Dina/Dina_i700-10.pcf.gz rename to gui/fonts/Dina/Dina_i700-10.pcf.gz diff --git a/fonts/Dina/Dina_i700-8.pcf.gz b/gui/fonts/Dina/Dina_i700-8.pcf.gz similarity index 100% rename from fonts/Dina/Dina_i700-8.pcf.gz rename to gui/fonts/Dina/Dina_i700-8.pcf.gz diff --git a/fonts/Dina/Dina_i700-9.pcf.gz b/gui/fonts/Dina/Dina_i700-9.pcf.gz similarity index 100% rename from fonts/Dina/Dina_i700-9.pcf.gz rename to gui/fonts/Dina/Dina_i700-9.pcf.gz diff --git a/fonts/Dina/Dina_r400-10.pcf.gz b/gui/fonts/Dina/Dina_r400-10.pcf.gz similarity index 100% rename from fonts/Dina/Dina_r400-10.pcf.gz rename to gui/fonts/Dina/Dina_r400-10.pcf.gz diff --git a/fonts/Dina/Dina_r400-6.pcf.gz b/gui/fonts/Dina/Dina_r400-6.pcf.gz similarity index 100% rename from fonts/Dina/Dina_r400-6.pcf.gz rename to gui/fonts/Dina/Dina_r400-6.pcf.gz diff --git a/fonts/Dina/Dina_r400-8.pcf.gz b/gui/fonts/Dina/Dina_r400-8.pcf.gz similarity index 100% rename from fonts/Dina/Dina_r400-8.pcf.gz rename to gui/fonts/Dina/Dina_r400-8.pcf.gz diff --git a/fonts/Dina/Dina_r400-9.pcf.gz b/gui/fonts/Dina/Dina_r400-9.pcf.gz similarity index 100% rename from fonts/Dina/Dina_r400-9.pcf.gz rename to gui/fonts/Dina/Dina_r400-9.pcf.gz diff --git a/fonts/Dina/Dina_r700-10.pcf.gz b/gui/fonts/Dina/Dina_r700-10.pcf.gz similarity index 100% rename from fonts/Dina/Dina_r700-10.pcf.gz rename to gui/fonts/Dina/Dina_r700-10.pcf.gz diff --git a/fonts/Dina/Dina_r700-8.pcf.gz b/gui/fonts/Dina/Dina_r700-8.pcf.gz similarity index 100% rename from fonts/Dina/Dina_r700-8.pcf.gz rename to gui/fonts/Dina/Dina_r700-8.pcf.gz diff --git a/fonts/Dina/Dina_r700-9.pcf.gz b/gui/fonts/Dina/Dina_r700-9.pcf.gz similarity index 100% rename from fonts/Dina/Dina_r700-9.pcf.gz rename to gui/fonts/Dina/Dina_r700-9.pcf.gz diff --git a/fonts/Dina/LICENSE b/gui/fonts/Dina/LICENSE similarity index 100% rename from fonts/Dina/LICENSE rename to gui/fonts/Dina/LICENSE diff --git a/fonts/Dina/NEWS b/gui/fonts/Dina/NEWS similarity index 100% rename from fonts/Dina/NEWS rename to gui/fonts/Dina/NEWS diff --git a/xorg/icons/paper-icon-theme b/gui/icons/paper-icon-theme similarity index 100% rename from xorg/icons/paper-icon-theme rename to gui/icons/paper-icon-theme diff --git a/xorg/themes/Blackbird b/gui/themes/Blackbird similarity index 100% rename from xorg/themes/Blackbird rename to gui/themes/Blackbird diff --git a/install.sh b/install.sh index 2da2589..fd83604 100755 --- a/install.sh +++ b/install.sh @@ -2,86 +2,98 @@ #NOTE: .zshenv XDG paths are hardcoded to allow non-zsh install +: ${DEST:=$(realpath "$HOME")} +: ${SRC:=$(dirname "$(realpath "$0")")} + # test devnull=/dev/null if [ "$1" = "test" ]; then - echo "Running test -- no changes will be applied" - devnull=/dev/stdout - _cd() { - cd $*; - echo " cd $*"; - echo "\$PWD=$PWD"; - } - alias cd="_cd" - alias mkdir="echo mkdir" - alias ln="echo ln" - alias rm="echo rm" - alias sh="echo sh" + echo "Running test -- no changes will be applied" + devnull=/dev/stdout + _cd() { + cd $*; + echo " cd $*"; + echo "\$PWD=$PWD"; + } + alias cd="_cd" + alias mkdir="echo -- mkdir" + alias ln="echo -- ln" + alias rm="echo -- rm" + alias sh="echo -- sh" fi # create preferred folder structure -cd ~ -mkdir -p bin etc share share/fonts .urxvt/ext \ - .icons .themes .gnupg .ssh .termux >$devnull 2>&1 -mkdir -pm 700 var/tmp var/tmp/vim >$devnull 2>&1 -cd - >$devnull +cd $DEST +mkdir -p bin etc share/fonts share/themes share/icons >$devnull 2>&1 +which vim >$devnull 2>&1 && mkdir -pm 700 var/tmp/vim >$devnull 2>&1 +cd $SRC >$devnull # ensure ostype if [ -z "$OSTYPE" ]; then - OSTYPE=`uname -s | tr '[:upper:]' '[:lower:]'` + OSTYPE=$(uname -s | tr '[:upper:]' '[:lower:]') fi # accomodate multiple userlands lnargs=-sfnv case "$OSTYPE" in - freebsd*) lnargs=-sFhv;; - netbsd|openbsd*) lnargs=-sfhv;; + freebsd*) lnargs=-sFhv;; + netbsd|openbsd*) lnargs=-sfhv;; esac l() { - # TODO: use install? - [ -L "$1" -o \! -e "$1" ] && ln $lnargs "${2:-$PWD/$x}" "$1" || \ - echo "!!! File exists and is not a link: $1" + # TODO: use install? + [ -L "$1" -o \! -e "$1" ] && ln $lnargs "$SRC/${2:-$x}" "$DEST/${1:-$x}" || + echo "!!! File exists and is not a link: $1" } -# link files -find base -mindepth 1 -maxdepth 1 | while read -r x; do - l "$HOME/`basename "$x"`" -done -find bin share -mindepth 1 -maxdepth 1 | while read -r x; do - l "$HOME/$x" -done -find fonts -mindepth 1 -maxdepth 1 -type d | while read -r x; do - l "$HOME/share/fonts/`basename "$x"`" -done -find xdg -mindepth 1 -maxdepth 1 | while read -r x; do - l "$HOME/etc/`basename "$x"`" -done -find urxvt-ext -mindepth 1 -maxdepth 2 -type f -perm -111 | while read -r x; do - l "$HOME/.urxvt/ext/`basename $x`" -done -find xorg/icons -mindepth 1 -maxdepth 2 -type d | while read -r x; do - if [ -e "$x/index.theme" ]; then - d="$HOME/.icons/`basename "$x"`" - l $d - which gtk-update-icon-cache >/dev/null 2>&1 && gtk-update-icon-cache -qtf $d - unset d - fi -done -find xorg/themes -mindepth 1 -maxdepth 1 -type d | while read -r x; do - l "$HOME/.themes/`basename "$x"`" -done -find gpg -mindepth 1 -maxdepth 1 \! -name '*.gpg' | while read -r x; do - l "$HOME/.gnupg/`basename "$x"`" +# generic links +find base -mindepth 1 -maxdepth 1 | while read -r x; do l "${x#base/}"; done +find bin etc share -mindepth 1 -maxdepth 1 | while read -r x; do l; done + +# xorg/wayland resources +find gui -mindepth 1 -maxdepth 1 | while read -r x; do + if [ "$x" = gui/fonts ]; then + find $x -mindepth 1 -maxdepth 2 -type d | while read -r x; do + which mkfontscale >$devnull 2>&1 && mkfontscale "$x" + which mkfontdir >$devnull 2>&1 && mkfontdir "$x" + [ "$(head -1 "$x/fonts.dir")" = 0 ] && + rm "$x/fonts.dir" + [ "$(head -1 "$x/fonts.scale")" = 0 ] && + rm "$x/fonts.scale" + done + elif [ "$x" = gui/icons ]; then + find $x -mindepth 1 -maxdepth 2 -type d | while read -r x; do + [ ! -e "$x/index.theme" ] && continue + which gtk-update-icon-cache >$devnull 2>&1 && + gtk-update-icon-cache "$x" + done + fi + find "$x" -mindepth 1 -maxdepth 1 | while read -r x; do + l "share${x#gui}" + done done -if which gpg >/dev/null 2>&1; then - find gpg -mindepth 1 -maxdepth 1 -name '*.gpg' | while read -r x; do - gpg --import "$x" - done + +# gpg +if which gpg >$devnull 2>&1; then + mkdir -p "$DEST/etc/gnupg" + find gnupg -mindepth 1 -maxdepth 1 \! -name '*.gpg' | while read -r x; do + l "etc/$x" + done + find gnupg -mindepth 1 -maxdepth 1 -name '*.gpg' | while read -r x; do + gpg --import "$x" + done fi -for y in ssh termux; do - find $y -mindepth 1 -maxdepth 1 | while read -r x; do - l "$HOME/.$y/`basename "$x"`" - done -done -x='fonts/Dina-ttf/Dina.ttf' l "$HOME/.termux/font.ttf" + +# ssh +find ssh -mindepth 1 -maxdepth 1 | while read -r x; do + l ".$x"; done + +# termux, assume it if android +if [ $(uname -o) = 'Android' ]; then + mkdir -p "$DEST/.termux" + find termux -mindepth 1 -maxdepth 1 | while read -r x; do + l ".$x"; done + l ".termux/font.ttf" 'share/fonts/Dina-ttf/Dina.ttf' +fi + +# vim: sts=4 sw=4 et diff --git a/root/syslinux.cfg b/syslinux/syslinux.cfg similarity index 100% rename from root/syslinux.cfg rename to syslinux/syslinux.cfg diff --git a/root/update-extlinux.conf b/syslinux/update-extlinux.conf similarity index 100% rename from root/update-extlinux.conf rename to syslinux/update-extlinux.conf diff --git a/urxvt-ext/urxvt-font-size b/urxvt-ext/urxvt-font-size deleted file mode 160000 index 0984499..0000000 --- a/urxvt-ext/urxvt-font-size +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0984499379e420de651dcfeedfbb7938867c44f8 -- 2.47.0