dotfiles

Mahdi's build of dotfiles
git clone git://mahdi.pw/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 9c30b635b2a54f0da512e4b3a258640ed8265b9d
parent de73f889a361296ca6e405117690361b22e55ad7
Author: Mahdi Mirzade <me@mahdi.pw>
Date:   Fri, 12 Aug 2022 17:52:26 +0430

Update mutt configuration, add doas.conf, remove ksh, tabs instead of spaces

Diffstat:
M.config/mutt/mailcap | 2+-
M.config/mutt/muttrc | 132+++++++++++++++++++++++++++++++++++++++++--------------------------------------
M.config/shell/aliasrc | 15+++++++--------
M.config/x11/xinitrc | 3+--
D.kshrc | 32--------------------------------
M.local/bin/dwm-bar | 14++++++++++----
M.local/src/dmenu/config.mk | 8++++----
M.mkshrc | 23+++++------------------
MMakefile | 102+++++++++++++++++++++++++++++++++++++++++++------------------------------------
Mconfig.mk | 1+
Aetc/doas.conf | 1+
Agen-makefile | 32++++++++++++++++++++++++++++++++
Minc/configs-files.mk | 1-
13 files changed, 186 insertions(+), 180 deletions(-)

diff --git a/.config/mutt/mailcap b/.config/mutt/mailcap @@ -2,7 +2,7 @@ text/plain; $EDITOR %s ; text/html; openfile %s ; nametemplate=%s.html text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput; image/*; openfile %s ; -video/*; setsid mpv --quiet %s &; copiousoutput +video/*; mpv --quiet %s &; copiousoutput audio/*; mpv %s ; application/pdf; openfile %s ; application/pgp-encrypted; gpg -d '%s'; copiousoutput; diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc @@ -14,12 +14,12 @@ set reverse_name=yes set mbox_type=Maildir set ssl_force_tls = yes -# imaps://user@domain@imap_domain:port +# Syntax: imaps://user@domain@imap_domain:port #set folder="imaps://me@mahdi.pw@mail.mahdi.pw:993" #set imap_pass = `pass email` set folder="~/.local/share/mail/acct0" -# smtps://user@domain@smtp_domain:port +# Syntax: smtps://user@domain@smtp_domain:port set smtp_url = "smtps://me@mahdi.pw@mail.mahdi.pw:465" set smtp_pass = `pass email` @@ -115,7 +115,7 @@ set sidebar_visible = yes set sidebar_width = 23 set sidebar_short_path = yes set sidebar_next_new_wrap = yes -set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?' +set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%?S?%S?' set sidebar_divider_char = ' │ ' bind index,pager \Ck sidebar-prev bind index,pager \Cj sidebar-next @@ -124,68 +124,63 @@ bind index,pager \Cp sidebar-prev-new bind index,pager \Cn sidebar-next-new bind index,pager B sidebar-toggle-visible -#set crypt_autosign = yes -#set crypt_opportunistic_encrypt = yes -#set pgp_self_encrypt = yes -#set pgp_default_key = 'me@mahdi.pw' +set fcc_clear=yes + +set pgp_use_gpg_agent = yes +set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f" +set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f" +set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f" +set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x2C2Cd561 -- -r %r -- %f" +set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x2C2Cd561 -- -r %r -- %f" +set pgp_import_command="gpg --no-verbose --import -v %f" +set pgp_export_command="gpg --no-verbose --export --armor %r" +set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r" +set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" +set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" + +set pgp_autosign = no +set pgp_good_sign = "^gpg: Good signature from" +set pgp_default_key = "me@mahdym.ir" +#set pgp_sign_as = "me@mahdym.ir" +set pgp_self_encrypt = yes +set pgp_replyencrypt = yes +set pgp_timeout = 3600 # Colors -# Default index colors: -color index yellow default '.*' - -# New mail is boldened: -color index brightyellow black "~N" - -# Tagged mail is highlighted: -color index brightyellow blue "~T" - -# Other colors and aesthetic settings: -mono bold bold -mono underline underline -mono indicator reverse -mono error bold -color normal default default -color indicator brightblack white -color sidebar_highlight yellow default -color sidebar_divider brightblack black -color sidebar_flagged red black -color sidebar_new green black -color normal brightyellow default -color error red default -color tilde black default -color message cyan default -color markers red white -color attachment white default -color search brightmagenta default -color status brightyellow black -color hdrdefault brightgreen default -color quoted green default -color quoted1 blue default -color quoted2 cyan default -color quoted3 yellow default -color quoted4 red default -color quoted5 brightred default -color signature brightgreen default -color bold black default -color underline black default -color normal default default - -# Regex highlighting: -color header brightmagenta default "^From" -color header brightcyan default "^Subject" -color header brightwhite default "^(CC|BCC)" -color header blue default ".*" -color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses -color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL -color body green default "\`[^\`]*\`" # Green text between ` and ` -color body brightblue default "^# \.*" # Headings as bold blue -color body brightcyan default "^## \.*" # Subheadings as bold cyan -color body brightgreen default "^### \.*" # Subsubheadings as bold green -color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow -color body brightcyan default "[;:][-o][)/(|]" # emoticons -color body brightcyan default "[;:][)(|]" # emoticons -color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon? -color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon? +color normal brightblue default +color indicator black brightblue +color tree brightred default +color status brightgreen black + +mono bold bold + +# Index +color index brightmagenta default "~U" # Unread messages +color index brightyellow default ~N # New messages +color index brightblue default "~R" # Read messages +color index blue default ~Q # Replied messages + +# URL +color body brightgreen default "[a-zA-Z]+://[^ \"\t\r\n]*" +color body brightgreen default "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +color body brightgreen default "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" +mono body bold "[a-zA-Z]+://[^ \"\t\r\n]*" +mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +mono body bold "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" + +# Header +color hdrdefault blue default +color header white default "^(From)" +color header yellow default "^(Subject)" +color header brightgreen default "^(User-*)" +color header red default "^(Envelope-To)" +color header red default "^(To)" +color header white default "^(Return-Path)" +color header brightmagenta default "^(Date)" + +# PGP color body red default "(BAD signature)" color body cyan default "(Good signature)" color body brightblack default "^gpg: Good signature .*" @@ -193,4 +188,13 @@ color body brightyellow default "^gpg: " color body brightyellow red "^gpg: BAD signature from.*" mono body bold "^gpg: Good signature" mono body bold "^gpg: BAD signature from.*" -color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" + +# Quoted text +color quoted cyan default +color quoted1 yellow black +color quoted2 red black +color quoted3 green black +color quoted4 cyan black +color quoted5 yellow black +color quoted6 red black +color quoted7 green black diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc @@ -8,7 +8,6 @@ done; unset command alias startx="startx \"$XINITRC\"" alias vim="vim -i ${XDG_DATA_HOME:-$HOME/.local/share}/viminfo" - alias \ ..='cd ..' \ ...='cd ../..' \ @@ -17,21 +16,21 @@ alias \ # Fix colorizing commands. alias \ ls="ls -h --color=always" \ - ip="ip --color=auto" \ + ip="ip --color=auto" \ grep="grep --color=auto" # Lazy Aliases. alias \ - c="clear -x" \ + c="clear -x" \ e="$EDITOR" \ g="git" \ - h="htop" \ - l="ls" \ + h="htop" \ + l="ls" \ p="pacman" \ v="$EDITOR" \ - x="exit" + x="exit" # Suckless now with tabbed. #alias \ -# surf="surf-open" \ -# st="tabbed -c -r 2 st -w ''" +# surf="surf-open" \ +# st="tabbed -c -r 2 st -w ''" diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc @@ -44,6 +44,5 @@ xmodmap -e "keycode 108 = p P Arabic_hah bracketleft" xmodmap -e "add mod1 = Alt_L Meta_L" # Add -f after startx to experience dwm in floating mode. -#dwm ssh-agent dwm "$@" -#ssh-add +#exec dwm "$@" diff --git a/.kshrc b/.kshrc @@ -1,32 +0,0 @@ -#!/bin/ksh -[ -f "$HOME/.config/shell/profile" ] && . $HOME/.config/shell/profile -[ -f "$HOME/.config/shell/aliasrc" ] && . $HOME/.config/shell/aliasrc -[ -f "$HOME/.config/shell/functions" ] && . $HOME/.config/shell/functions - -hostname(){ cat /etc/hostname; } - -# Prompt -if [ "$(id -u)" -eq 0 ]; then - PS1="$(printf " \033[90m[ \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m # " \ - "$(whoami)" "$(hostname)" '${PWD/#"$HOME"/\~}')" -else - PS1="$(printf " \033[36m[%s]\033[0m " '${PWD/#"$HOME"/\~}')" - #PS1="$(printf " \033[90m[ \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m \$ " \ - # "$(whoami)" "$(hostname)" '${PWD/#"$HOME"/\~}')" - #PS1="$(printf " \033[90m[ \033[1;34m\033[32m%s \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m \$ " \ - # '$(date +%H:%M)' "$(whoami)" "$(hostname)" '${PWD/#"$HOME"/\~}')" -fi - -# Shell options -set -o emacs # Edit mode -set +o histexpand # csh-style history off -set -o multiline # turn on multiline mode -set -o notify # immediate notification from background jobs - -# Binds -alias __A=`echo "\020"` # up arrow = ^p = back a command -alias __B=`echo "\016"` # down arrow = ^n = down a command -alias __C=`echo "\006"` # right arrow = ^f = forward a character -alias __D=`echo "\002"` # left arrow = ^b = back a character -alias __H=`echo "\001"` # home = ^a = start of line -alias __Y=`echo "\005"` # end = ^e = end of line diff --git a/.local/bin/dwm-bar b/.local/bin/dwm-bar @@ -189,10 +189,16 @@ Uptime() { H=$((SECS / 60/ 60 % 24)) M=$((SECS / 60 % 60)) S=$((SECS % 60)) - [ "$D" = 0 ] || UPTIME="${UPTIME} ${D}d" - [ "$H" = 0 ] || UPTIME="${UPTIME} ${H}h" - [ "$M" = 0 ] || UPTIME="${UPTIME} ${M}m" - printf "%s" "$UPTIME" + if [ "$D" != 0 ]; then + UPTIME="${D}d ${H:-0}h ${M:-0}m" + elif [ "$H" != 0 ]; then + UPTIME="${H}h ${M:-0}m" + elif [ "$M" != 0 ]; then + UPTIME="${M}m" + else + UPTIME="${S}s" + fi + printf " %s" "$UPTIME" } Memory() { diff --git a/.local/src/dmenu/config.mk b/.local/src/dmenu/config.mk @@ -5,10 +5,10 @@ VERSION = 5.1 PREFIX = /usr/local MANPREFIX = $(PREFIX)/share/man -X11INC = /usr/local/include -X11LIB = /usr/local/lib +X11INC = /usr/include +X11LIB = /usr/lib -BDINC = /usr/local/include/fribidi +BDINC = /usr/include/fribidi # Xinerama, comment if you don't want it XINERAMALIBS = -lXinerama @@ -16,7 +16,7 @@ XINERAMAFLAGS = -DXINERAMA # freetype FREETYPELIBS = -lfontconfig -lXft -FREETYPEINC = /usr/local/include/freetype2 +FREETYPEINC = /usr/include/freetype2 # OpenBSD (uncomment) #FREETYPEINC = $(X11INC)/freetype2 diff --git a/.mkshrc b/.mkshrc @@ -1,4 +1,4 @@ -#!/bin/mksh +#!/bin/sh [ -f "$HOME/.config/shell/profile" ] && . $HOME/.config/shell/profile [ -f "$HOME/.config/shell/aliasrc" ] && . $HOME/.config/shell/aliasrc [ -f "$HOME/.config/shell/functions" ] && . $HOME/.config/shell/functions @@ -7,13 +7,13 @@ hostname(){ cat /etc/hostname; } # Prompt if [ "$(id -u)" -eq 0 ]; then - PS1="$(printf " \033[90m[ \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m # " \ + PS1="$(printf " \033[90m[ \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m \033[34m#\033[0m " \ "$(whoami)" "$(hostname)" '${PWD/#"$HOME"/\~}')" else - PS1="$(printf " \033[36m[%s]\033[0m " '${PWD/#"$HOME"/\~}')" - #PS1="$(printf " \033[90m[ \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m \$ " \ + PS1="$(printf " \033[36m[%s]\033[0m \033[34m\$\033[0m " '${PWD/#"$HOME"/\~}')" + #PS1="$(printf " \033[90m[ \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m \033[34m\$\033[0m " \ # "$(whoami)" "$(hostname)" '${PWD/#"$HOME"/\~}')" - #PS1="$(printf " \033[90m[ \033[1;34m\033[32m%s \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m \$ " \ + #PS1="$(printf " \033[90m[ \033[1;34m\033[32m%s \033[35m%s\033[0m\033[94m@\033[34m%s\033[0m \033[36m%s\033[0m\033[90m ]\033[0m \033[34m\$\033[0m " \ # '$(date +%H:%M)' "$(whoami)" "$(hostname)" '${PWD/#"$HOME"/\~}')" fi @@ -30,16 +30,3 @@ bind ^L=clear-screen bind ^[[A=search-history-up bind ^[[B=search-history-down bind ^[#=comment - -# SSH Agent -#if [ -z "$SSH_AUTH_SOCK" ];then - #printf "\033[31mThere's no SSH agent running, want to start one?\033[0m" - #read o - #case $o in - #[Yy][Ee][Ss]|[Yy]) - #killall ssh-agent >/dev/null 2>&1 - #eval $(ssh-agent) - #ssh-add - #;; - #esac -#fi diff --git a/Makefile b/Makefile @@ -7,37 +7,51 @@ help: @grep '^[a-zA-Z_-]*:.*## .*$$' Makefile \ | awk -F ':.*##' '{printf "\033[34m%-20s\033[0m %s\n", $$1, $$2}' +link: ## Force link dotfiles to $HOME + @for CONFIG_MKDIR in $(CONFIGS_MKDIR); do $(MKDIR) $${HOME}/$$CONFIG_MKDIR; done + @for CONFIG_FILE in $(CONFIGS_FILES); do $(LN) $${PWD}/$$CONFIG_FILE $${HOME}/$$CONFIG_FILE; done + $(EXTRACT) ${HOME}/.local/share/fonts.tar.gz + $(RUN_PERM) $(MKDIR) /etc/X11/xorg.conf.d + $(RUN_PERM) $(LN) etc/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf + +copy: ## Force copy dotfiles to $HOME + @for CONFIG_DIR in $(CONFIGS_MKDIR); do $(MKDIR) $${HOME}/$$CONFIG_DIR; done + @for CONFIG_FILE in $(CONFIGS_FILES); do $(CP) $${PWD}/$$CONFIG_FILE $${HOME}/$$CONFIG_FILE; done + $(EXTRACT) ${HOME}/.local/share/fonts.tar.gz + $(RUN_PERM) $(MKDIR) /etc/X11/xorg.conf.d + $(RUN_PERM) $(CP) etc/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf + arch: ## Install packages for my arch setup $(INSTALL_ARCH) $(ARCH_PKGS) - echo "permit persist keepenv :wheel" | $(RUN_PERM) tee /etc/doas.conf + $(RUN_PERM) $(CP) etc/doas.conf /etc/doas.conf -arch-backup: ## Backup packages from my arch setup +alpine: ## Install packages for my alpine setup + $(INSTALL_ALPINE) $(ALPINE_PKGS) + $(RUN_PERM) $(CP) etc/doas.conf /etc/doas.d/doas.conf + +freebsd: ## Install packages for my freebsd setup + $(INSTALL_FREEBSD) $(FREEBSD_PKGS) + $(RUN_PERM) $(CP) etc/doas.conf /usr/local/etc/doas.conf + +backup-arch: ## Backup packages from my arch setup pacman -Q | awk '{print $1}' > pkgs-arch.mk sed 's/^/ARCH_PKGS\t+= /' pkgs-arch.mk > pkgs-arch.mk.tmp mv pkgs-arch.mk.tmp pkgs-arch.mk mv pkgs-arch.mk inc/pkgs-arch.mk -alpine: ## Install packages for my alpine setup - $(INSTALL_ALPINE) $(ALPINE_PKGS) - echo "permit persist keepenv :wheel" | $(RUN_PERM) tee /etc/doas.d/doas.conf - -alpine-backup: ## Backup packages from my alpine setup +backup-alpine: ## Backup packages from my alpine setup cat /etc/apk/world > pkgs-alpine.mk sed 's/^/ALPINE_PKGS\t+= /' pkgs-alpine.mk > pkgs-alpine.mk.tmp mv pkgs-alpine.mk.tmp pkgs-alpine.mk mv pkgs-alpine.mk inc/pkgs-alpine.mk -freebsd: ## Install packages for my freebsd setup - $(INSTALL_FREEBSD) $(FREEBSD_PKGS) - echo "permit keepenv :wheel" | $(RUN_PERM) tee /usr/local/etc/doas.conf - -freebsd-backup: ## Backup packages from my freebsd setup +backup-freebsd: ## Backup packages from my freebsd setup pkg prime-list > pkgs-freebsd.mk sed 's/^/FREEBSD_PKGS\t+= /' pkgs-freebsd.mk > pkgs-freebsd.mk.tmp mv pkgs-freebsd.mk.tmp pkgs-freebsd.mk mv pkgs-freebsd.mk inc/pkgs-freebsd.mk -scheme: ## Create configs-dirs.mk, configs-files.mk +backup-scheme: ## Generate inc/{configs-dirs.mk,configs-files.mk} find . -type d > configs-dirs.mk sort configs-dirs.mk > configs-dirs.mk.tmp sed 's/^\.\///g;/^\.$$/d;/^\.git/d;/^\./!d;/^\.local\/src\//d;s/^/CONFIGS_MKDIR\t+= /' configs-dirs.mk.tmp > configs-dirs.mk @@ -48,60 +62,56 @@ scheme: ## Create configs-dirs.mk, configs-files.mk mv configs-files.mk inc/configs-files.mk rm configs-dirs.mk.tmp configs-files.mk.tmp -link: ## Force link dotfiles to $HOME - @for CONFIG_MKDIR in $(CONFIGS_MKDIR); do $(MKDIR) $${HOME}/$$CONFIG_MKDIR; done - @for CONFIG_FILE in $(CONFIGS_FILES); do $(LN) $${PWD}/$$CONFIG_FILE $${HOME}/$$CONFIG_FILE; done - $(EXTRACT) ${HOME}/.local/share/fonts.tar.gz - $(RUN_PERM) $(MKDIR) /etc/X11/xorg.conf.d - $(RUN_PERM) $(LN) ${PWD}/etc/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf - -copy: ## Force copy dotfiles to $HOME - @for CONFIG_DIR in $(CONFIGS_MKDIR); do $(MKDIR) $${HOME}/$$CONFIG_DIR; done - @for CONFIG_FILE in $(CONFIGS_FILES); do $(CP) $${PWD}/$$CONFIG_FILE $${HOME}/$$CONFIG_FILE; done - $(EXTRACT) ${HOME}/.local/share/fonts.tar.gz - $(RUN_PERM) $(MKDIR) /etc/X11/xorg.conf.d - $(RUN_PERM) $(CP) ${PWD}/etc/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf +# --------------------------------- # +# | Suckless software collection: | # +# --------------------------------- # -desktop: dwm dmenu st surf tabbed slock ## Install my suckless desktop suite (dwm/dmenu/st/surf/tabbed/slock) +dmenu: ## Install my build of dmenu + $(MKDIR) ${HOME}/.local/src + rm -rf ${HOME}/.local/src/dmenu + cp -rf ${PWD}/.local/src/dmenu ${HOME}/.local/src/dmenu + cd ${HOME}/.local/src/dmenu; $(RUN_PERM) make install dwm: ## Install my build of dwm $(MKDIR) ${HOME}/.local/src rm -rf ${HOME}/.local/src/dwm cp -rf ${PWD}/.local/src/dwm ${HOME}/.local/src/dwm - cd ${HOME}/.local/src/dwm - $(RUN_PERM) make install + cd ${HOME}/.local/src/dwm; $(RUN_PERM) make install -dmenu: ## Install my build of dmenu +merbe: ## Install my build of merbe $(MKDIR) ${HOME}/.local/src - rm -rf ${HOME}/.local/src/dmenu - cp -rf ${PWD}/.local/src/dmenu ${HOME}/.local/src/dmenu - cd ${HOME}/.local/src/dmenu - $(RUN_PERM) make install + rm -rf ${HOME}/.local/src/merbe + cp -rf ${PWD}/.local/src/merbe ${HOME}/.local/src/merbe + cd ${HOME}/.local/src/merbe; $(RUN_PERM) make install + +slock: ## Install my build of slock + $(MKDIR) ${HOME}/.local/src + rm -rf ${HOME}/.local/src/slock + cp -rf ${PWD}/.local/src/slock ${HOME}/.local/src/slock + cd ${HOME}/.local/src/slock; $(RUN_PERM) make install st: ## Install my build of st $(MKDIR) ${HOME}/.local/src rm -rf ${HOME}/.local/src/st cp -rf ${PWD}/.local/src/st ${HOME}/.local/src/st - cd ${HOME}/.local/src/st - $(RUN_PERM) make install + cd ${HOME}/.local/src/st; $(RUN_PERM) make install surf: ## Install my build of surf $(MKDIR) ${HOME}/.local/src rm -rf ${HOME}/.local/src/surf cp -rf ${PWD}/.local/src/surf ${HOME}/.local/src/surf - cd ${HOME}/.local/src/surf - $(RUN_PERM) make install + cd ${HOME}/.local/src/surf; $(RUN_PERM) make install tabbed: ## Install my build of tabbed $(MKDIR) ${HOME}/.local/src rm -rf ${HOME}/.local/src/tabbed - cp -rf ${PWD}/.local/src/tabbed ${HOME}/.local/src/tabbed - cd ${HOME}/.local/src/tabbed - $(RUN_PERM) make install + cp -rf ${PWD}/.local/src/tabbed ${HOME}/.local/src/tabbed + cd ${HOME}/.local/src/tabbed; $(RUN_PERM) make install -slock: ## Install by build of slock +xwallpaper: ## Install my build of xwallpaper $(MKDIR) ${HOME}/.local/src - rm -rf ${HOME}/.local/src/slock - cp -rf ${PWD}/.local/src/slock ${HOME}/.local/src/slock - cd ${HOME}/.local/src/slock - $(RUN_PERM) make install + rm -rf ${HOME}/.local/src/xwallpaper + cp -rf ${PWD}/.local/src/xwallpaper ${HOME}/.local/src/xwallpaper + cd ${HOME}/.local/src/xwallpaper; $(RUN_PERM) make install + +desktop: dmenu dwm merbe slock st surf tabbed xwallpaper ## Install my suckless desktop suite (dmenu/dwm/merbe/slock/st/surf/tabbed/xwallpaper) diff --git a/config.mk b/config.mk @@ -3,6 +3,7 @@ LN = ln -vsf MKDIR = mkdir -p EXTRACT = tar -C ${HOME}/.local/share -xzf RUN_PERM = doas +#RUN_PERM = su -c INSTALL_ARCH = $(RUN_PERM) pacman --needed -S INSTALL_ALPINE = $(RUN_PERM) apk add INSTALL_FREEBSD = $(RUN_PERM) pkg install diff --git a/etc/doas.conf b/etc/doas.conf @@ -0,0 +1 @@ +permit persist keepenv :wheel diff --git a/gen-makefile b/gen-makefile @@ -0,0 +1,32 @@ +#!/bin/sh +# Generate texts for Makefile, from .local/src/* builds: +# +# generate-builds.sh >> Makefile +# +unset DIRS TEXT +for d in .local/src/*; do + base=$(basename "$d") + if [ -z "$TEXT" ]; then + DIRS="$base" + TEXT="$base: ## Install my build of $base + \$(MKDIR) \${HOME}/.local/src + rm -rf \${HOME}/.local/src/$base + cp -rf \${PWD}/.local/src/$base \${HOME}/.local/src/$base + cd \${HOME}/.local/src/$base; \$(RUN_PERM) make install" + else + DIRS="$DIRS $base" + TEXT="$TEXT + +$base: ## Install my build of $base + \$(MKDIR) \${HOME}/.local/src + rm -rf \${HOME}/.local/src/$base + cp -rf \${PWD}/.local/src/$base \${HOME}/.local/src/$base + cd \${HOME}/.local/src/$base; \$(RUN_PERM) make install" + fi +done + +DIRS_slash=$(echo "$DIRS" | sed 's/ /\//g') + +LAST="desktop: $DIRS ## Install my suckless desktop suite ($DIRS_slash)" + +printf "%s\n\ndesktop: %s ## Install my suckless desktop suite (%s)\n" "$TEXT" "$DIRS" "$DIRS_slash" diff --git a/inc/configs-files.mk b/inc/configs-files.mk @@ -35,7 +35,6 @@ CONFIGS_FILES += .config/x11/xresources CONFIGS_FILES += .config/yt-dlp/config CONFIGS_FILES += .config/zathura/zathurarc CONFIGS_FILES += .config/zathura/zathurarc.in -CONFIGS_FILES += .kshrc CONFIGS_FILES += .local/bin/bg-gen CONFIGS_FILES += .local/bin/bg-set CONFIGS_FILES += .local/bin/bright