reupload
This commit is contained in:
		
							
								
								
									
										33
									
								
								arch-user/bin/alg/file-tree-apply.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								arch-user/bin/alg/file-tree-apply.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| #!/bin/bash | ||||
| set -e | ||||
|  | ||||
| if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ]; then | ||||
| 	echo "bad args" >&2 | ||||
| 	exit 1 | ||||
| fi  | ||||
|  | ||||
| DEST=$(realpath "$2") | ||||
| cd "$1" | ||||
|  | ||||
| #shellcheck disable=SC2016 | ||||
| find . \ | ||||
| 	-type f \ | ||||
| 	-not -path '*/.*' \ | ||||
| 	-path "$3" | \ | ||||
| 		xargs -0 -d \\n -n 1 sh -c "mkdir -p $DEST/\$(dirname \"\$1\")" sh | ||||
|  | ||||
| #shellcheck disable=SC2016 | ||||
| find . \ | ||||
| 	-type f \ | ||||
| 	-not -path '*/.*' \ | ||||
| 	-path "$3" \ | ||||
| 	-printf "$(pwd)/%P\n$DEST/%P\n" | \ | ||||
| 		xargs -0 -d \\n -n 2 sh -c "$4" sh | ||||
|  | ||||
|  | ||||
| #for rel in $(find . -type f -name *.gpg); do | ||||
| #	DESTFILE=$(echo $DEST/$rel | sed 's/\.[^.]*$//') | ||||
|  #      	[ -f "$DESTFILE" ] && continue	 | ||||
| #	mkdir -p "$(dirname "$DESTFILE")" | ||||
| #	gpg --output "$DESTFILE" --decrypt "$rel" | ||||
| #done | ||||
							
								
								
									
										9
									
								
								arch-user/bin/archiso/make.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								arch-user/bin/archiso/make.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| #!/bin/bash | ||||
| set -e | ||||
|  | ||||
| sudo rm -rf /tmp/archiso-work /tmp/archiso-out | ||||
| cd ~/know/archiso | ||||
| sudo mkarchiso -v -w /tmp/archiso-work -o /tmp/archiso-out "profile-$1" | ||||
| iso=(/tmp/archiso-out/*) | ||||
| sudo dd if="$iso" of="$2" status=progress bs=4M | ||||
| sudo rm -rf /tmp/archiso-work /tmp/archiso-out | ||||
							
								
								
									
										251
									
								
								arch-user/bin/bemenu/pinentry.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										251
									
								
								arch-user/bin/bemenu/pinentry.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,251 @@ | ||||
| #!/bin/bash -efu | ||||
| ### This file is covered by the GNU General Public License, | ||||
| ### which should be included with libshell as the file LICENSE. | ||||
| ### All copyright information are listed in the COPYING. | ||||
|  | ||||
| #exec 2>/tmp/pinentry.log | ||||
| #set -x | ||||
|  | ||||
| VERSION='1.0' | ||||
| FLAVOR='bash' | ||||
|  | ||||
| ############################### PATCH ################################# | ||||
| . ~/.config/bemenu/env.sh | ||||
| ####################################################################### | ||||
|  | ||||
| keyinfo='' | ||||
| error='' | ||||
| timeout=0 | ||||
| touch_file='' | ||||
|  | ||||
| readonly def_desc='Enter password for GPG key' | ||||
| readonly def_prompt='Password:' | ||||
| readonly def_title='GPG Key Credentials' | ||||
| readonly def_repeat='Confirm password for GPG key' | ||||
| readonly def_labelok='OK' | ||||
| readonly def_labelnotok='Do not do this' | ||||
| readonly def_labelcancel='Cancel' | ||||
|  | ||||
| # from /usr/include/gpg-error.h | ||||
| readonly GPG_ERR_NO_ERROR=0 | ||||
| readonly GPG_ERR_TIMEOUT=62 | ||||
| readonly GPG_ERR_CANCELED=99 | ||||
| readonly GPG_ERR_NOT_CONFIRMED=114 | ||||
| readonly GPG_ERR_ASS_PARAMETER=280 | ||||
|  | ||||
| strerror() | ||||
| { | ||||
| 	case "$1" in | ||||
| 		$GPG_ERR_NO_ERROR)      echo "Success" ;; | ||||
| 		$GPG_ERR_TIMEOUT)       echo "Timeout" ;; | ||||
| 		$GPG_ERR_CANCELED)      echo "Operation cancelled" ;; | ||||
| 		$GPG_ERR_NOT_CONFIRMED) echo "Not confirmed" ;; | ||||
| 		$GPG_ERR_ASS_PARAMETER) echo "IPC parameter error" ;; | ||||
| 	esac | ||||
| } | ||||
|  | ||||
| assuan_result() | ||||
| { | ||||
| 	[ "$1" -gt 0 ] && | ||||
| 		echo -n "ERR $(( 5 << 24 | $1 )) " || | ||||
| 		echo -n "OK " | ||||
| 	strerror "$1" | ||||
| } | ||||
|  | ||||
| cmd_settimeout() | ||||
| { | ||||
| 	[ -n "${1##0*}" ] && [ -n "${1##*[!0-9]*}" ] && [ "$1" -gt 0 ] 2>/dev/null || | ||||
| 		return 0 | ||||
| 	timeout="$1" | ||||
| 	assuan_result $GPG_ERR_NO_ERROR | ||||
| } | ||||
|  | ||||
| cmd_setkeyinfo() | ||||
| { | ||||
| 	[ "$1" = "--clear" ] && | ||||
| 		keyinfo="" || | ||||
| 		keyinfo="$1" | ||||
| 	assuan_result $GPG_ERR_NO_ERROR | ||||
| } | ||||
|  | ||||
| set_text_variable() | ||||
| { | ||||
| 	printf -v "$1" "${2//%/\\x}" | ||||
| 	eval "set_$1=1" | ||||
| 	assuan_result $GPG_ERR_NO_ERROR | ||||
| } | ||||
|  | ||||
| cmd_setoption() | ||||
| { | ||||
| 	case "$1" in | ||||
| 		default-prompt=*) set_text_variable prompt "${1#*=}"      ;; | ||||
| 		default-ok=*)     set_text_variable labelok "${1#*=}"     ;; | ||||
| 		default-cancel=*) set_text_variable labelcancel "${1#*=}" ;; | ||||
| 		touch-file=*) | ||||
| 			touch_file="${1#*=}" | ||||
| 			assuan_result $GPG_ERR_NO_ERROR | ||||
| 			;; | ||||
| 		*) | ||||
| 			assuan_result $GPG_ERR_NO_ERROR | ||||
| 			;; | ||||
| 	esac | ||||
| } | ||||
|  | ||||
| cmd_getinfo() | ||||
| { | ||||
| 	case "$1" in | ||||
| 		version) | ||||
| 			echo "D $VERSION" | ||||
| 			assuan_result $GPG_ERR_NO_ERROR | ||||
| 			;; | ||||
| 		pid) | ||||
| 			echo "D $BASHPID" | ||||
| 			assuan_result $GPG_ERR_NO_ERROR | ||||
| 			;; | ||||
| 		flavor) | ||||
| 			echo "D $FLAVOR" | ||||
| 			assuan_result $GPG_ERR_NO_ERROR | ||||
| 			;; | ||||
| 		ttyinfo) | ||||
| 			echo "D - - - - $(id -u 2>/dev/null || echo 0)/$(id -g 2>/dev/null || echo 0) -" | ||||
| 			assuan_result $GPG_ERR_NO_ERROR | ||||
| 			;; | ||||
| 		*) | ||||
| 			assuan_result $GPG_ERR_ASS_PARAMETER | ||||
| 			;; | ||||
| 	esac | ||||
| } | ||||
|  | ||||
| cmd_getpin() | ||||
| { | ||||
| 	local ret=0 result output password=1 repeatpassword=3 | ||||
|  | ||||
| 	output="$( | ||||
| 		echo -n "|" | ||||
| ############################### PATCH ################################# | ||||
| 		bemenu \ | ||||
| 			--password indicator \ | ||||
| 			--prompt "${prompt:-$def_prompt}" \ | ||||
| 			</dev/null | tr -d '\n' | ||||
| 		ret=${PIPESTATUS[0]} | ||||
| #		yad \ | ||||
| #			--splash \ | ||||
| #			--no-markup \ | ||||
| #			--title="${title:-$def_title}" \ | ||||
| #			--form \ | ||||
| #			--separator="\n" \ | ||||
| #			--field="${desc:-$def_desc}:LBL" \ | ||||
| #			--field="${prompt:-$def_prompt}:H" \ | ||||
| #			${set_repeat:+--field="${repeat:-$def_repeat}:LBL"} \ | ||||
| #			${set_repeat:+--field="${prompt-$def_prompt}:H"} \ | ||||
| #			${error:+--field="$error:LBL"} \ | ||||
| #			--button="${labelok:-$def_labelok}:0" \ | ||||
| #			--button="${labelcancel:-$def_labelcancel}:1" \ | ||||
| #			--timeout="${timeout:-0}" \ | ||||
| #			</dev/null || ret=$? | ||||
| ###################################################################### | ||||
| 		echo -n "|" | ||||
| 		exit $ret | ||||
| 	)" || ret=$? | ||||
|  | ||||
| 	set_error='' error='' | ||||
|  | ||||
| 	case "$ret" in | ||||
| 		1)  assuan_result $GPG_ERR_CANCELED; return 0; ;; | ||||
| 		70) assuan_result $GPG_ERR_TIMEOUT;  return 0; ;; | ||||
| 	esac | ||||
|  | ||||
| 	output="${output#|}" | ||||
| 	output="${output%|}" | ||||
|  | ||||
| ############################### PATCH ################################# | ||||
| 	declare -A result | ||||
| 	result[$password]="$output" | ||||
| 	result[$repeatpassword]="$output" | ||||
| #	readarray -t result <<<"$output" | ||||
| #	output='' | ||||
| # | ||||
| ####################################################################### | ||||
| 	if [ -n "${set_repeat-}" ]; then | ||||
| 		set_repeat='' repeat='' | ||||
|  | ||||
| 		if [ "${result[$password]}" != "${result[$repeatpassword]}" ]; then | ||||
| 			cmd_confirm --one-button "${repeaterror:-Error: Passwords did not match.}" | ||||
| 			assuan_result $GPG_ERR_NOT_CONFIRMED | ||||
| 			return | ||||
| 		fi | ||||
| 		echo "S PIN_REPEATED" | ||||
| 	fi | ||||
|  | ||||
| 	[ -z "$touch_file" ] || | ||||
| 		touch "$touch_file" | ||||
|  | ||||
| 	echo "D ${result[$password]}" | ||||
| 	assuan_result $GPG_ERR_NO_ERROR | ||||
| } | ||||
|  | ||||
| cmd_confirm() | ||||
| { | ||||
| 	local ret=0 showmsg='' showcfm=1 | ||||
|  | ||||
| 	if [ "$1" = '--one-button' ]; then | ||||
| 		shift | ||||
| 		showmsg=1 | ||||
| 		showcfm= | ||||
| 	fi | ||||
|  | ||||
| 	yad \ | ||||
| 		--splash \ | ||||
| 		--no-markup \ | ||||
| 		--title="${title:-$def_title}" \ | ||||
| 		--text="${1:-${desc:-$def_desc}}" \ | ||||
| 		${showmsg:+--button="${labelok:-$def_labelok}:0"} \ | ||||
| 		${showcfm:+${error:+--field="$error:LBL"}} \ | ||||
| 		--timeout="${timeout:-0}" \ | ||||
| 		< /dev/null || | ||||
| 		ret=$? | ||||
|  | ||||
| 	set_error='' error='' | ||||
|  | ||||
| 	case "$ret" in | ||||
| 		0)  assuan_result $GPG_ERR_NO_ERROR ;; | ||||
| 		1)  assuan_result $GPG_ERR_CANCELED ;; | ||||
| 		70) assuan_result $GPG_ERR_TIMEOUT ;; | ||||
| 		*)  assuan_result $GPG_ERR_NOT_CONFIRMED ;; | ||||
| 	esac | ||||
| } | ||||
|  | ||||
| echo "OK Your orders please" | ||||
|  | ||||
| while :; do | ||||
| 	read -r cmd args 2>/dev/null || | ||||
| 		continue | ||||
|  | ||||
| 	#echo >&2 "$cmd: $args" | ||||
|  | ||||
| 	case "$cmd" in | ||||
| 		BYE) | ||||
| 			echo "OK closing connection" | ||||
| 			exit 0 | ||||
| 			;; | ||||
| 		GETPIN)         cmd_getpin ;; | ||||
| 		CONFIRM)        cmd_confirm "$args" ;; | ||||
| 		MESSAGE)        cmd_confirm --one-button ;; | ||||
| 		GETINFO)        cmd_getinfo "$args" ;; | ||||
| 		SETTIMEOUT)     cmd_settimeout "$args" ;; | ||||
| 		SETKEYINFO)     cmd_setkeyinfo "$args" ;; | ||||
| 		OPTION)         cmd_setoption "$args" ;; | ||||
| 		SETDESC)        set_text_variable desc "$args" ;; | ||||
| 		SETPROMPT)      set_text_variable prompt "$args" ;; | ||||
| 		SETTITLE)       set_text_variable title "$args" ;; | ||||
| 		SETOK)          set_text_variable labelok "$args" ;; | ||||
| 		SETCANCEL)      set_text_variable labelcancel "$args" ;; | ||||
| 		SETNOTOK)       set_text_variable labelnotok "$args" ;; | ||||
| 		SETERROR)       set_text_variable error "$args" ;; | ||||
| 		SETREPEAT)      set_text_variable repeat "$args" ;; | ||||
| 		SETREPEATERROR) set_text_variable repeaterror "$args" ;; | ||||
| 		*) | ||||
| 			assuan_result $GPG_ERR_NO_ERROR | ||||
| 			;; | ||||
| 	esac | ||||
| done | ||||
							
								
								
									
										13
									
								
								arch-user/bin/gpg/reencrypt-to-sym.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								arch-user/bin/gpg/reencrypt-to-sym.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| #!/bin/bash | ||||
| set -e | ||||
|  | ||||
| if [ -z "$PASSPHRASE" ]; then | ||||
| 	read -srp "Password: " PASSPHRASE | ||||
| 	echo | ||||
| fi | ||||
| export PASSPHRASE | ||||
|  | ||||
| bash ~/.local/bin/alg/file-tree-apply.sh "$1" "$2" '*.gpg' \ | ||||
| 	'if [ ! -f "$2" ]; then gpg --decrypt "$1" | gpg --symmetric --output "$2" --passphrase "$PASSPHRASE" --batch --yes; fi' | ||||
|  | ||||
| echo ok | ||||
							
								
								
									
										14
									
								
								arch-user/bin/i3blocks/battery.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								arch-user/bin/i3blocks/battery.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| read -r stat </sys/class/power_supply/ACAD/online | ||||
| read -r cap </sys/class/power_supply/BAT1/capacity | ||||
| read -r volt </sys/class/power_supply/BAT1/voltage_now | ||||
| read -r curr </sys/class/power_supply/BAT1/current_now | ||||
|  | ||||
| w=$((volt*curr/1000000000000)) | ||||
| if [ "$stat" = "1" ]; then | ||||
| 	echo "🔌 $cap% ${w}W" | ||||
| else | ||||
| 	echo "🔋 $cap% ${w}W" | ||||
| 	[ "$cap" -lt "15" ] && exit 33 | ||||
| fi | ||||
							
								
								
									
										23
									
								
								arch-user/bin/i3blocks/volume.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										23
									
								
								arch-user/bin/i3blocks/volume.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| sink_mute=$(pactl get-sink-mute @DEFAULT_SINK@) | ||||
| case "$sink_mute" in | ||||
| 	*yes*) sink_res=M;; | ||||
| 	*) sink_res=$(pactl get-sink-volume @DEFAULT_SINK@ | sed -e 's/.*\s\([0-9]*\)%.*/\1/;t;d');; | ||||
| esac | ||||
|  | ||||
| source_mute=$(pactl get-source-mute @DEFAULT_SOURCE@) | ||||
| case "$source_mute" in | ||||
| 	*yes*) source_res=M;; | ||||
| 	*) source_res=$(pactl get-source-volume @DEFAULT_SOURCE@ | sed -e 's/.*\s\([0-9]*\)%.*/\1/;t;d');; | ||||
| esac | ||||
|  | ||||
| bt_status="$(bluetoothctl devices Connected)" | ||||
| if [ -n "$bt_status"  ]; then | ||||
| 	sink_icon=🎧 | ||||
| else | ||||
| 	sink_icon=🔈 | ||||
| fi | ||||
|  | ||||
| echo "$sink_icon $sink_res% 🎙 $source_res%" | ||||
|  | ||||
							
								
								
									
										3
									
								
								arch-user/bin/i3blocks/weather.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								arch-user/bin/i3blocks/weather.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #!/bin/bash | ||||
| curl "https://wttr.in/?format=%l;%t%20%p" --silent | sed 's/^\(.\{3\}\)\(.*\);/\1 /' | ||||
| echo | ||||
							
								
								
									
										2
									
								
								arch-user/bin/i3blocks/xkb_layout.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										2
									
								
								arch-user/bin/i3blocks/xkb_layout.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| #!/bin/sh | ||||
| swaymsg -t get_inputs | jq -r 'map(select(has("xkb_active_layout_name")))[0].xkb_active_layout_name' | ||||
							
								
								
									
										6
									
								
								arch-user/bin/init
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								arch-user/bin/init
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| . /etc/profile | ||||
| . ~/.profile | ||||
|  | ||||
| sway --unsupported-gpu >>~/.local/state/sway/out.log 2>>~/.local/state/sway/err.log | ||||
							
								
								
									
										12
									
								
								arch-user/bin/misc/font-glyphs.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								arch-user/bin/misc/font-glyphs.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| #!/bin/bash | ||||
| for range in $(fc-match --format='%{charset}\n' "$1"); do | ||||
|     for n in $(seq "0x${range%-*}" "0x${range#*-}"); do | ||||
|         printf "%04x\n" "$n" | ||||
|     done | ||||
| done | while read -r n_hex; do | ||||
|     count=$((count + 1)) | ||||
|     printf "%-5s\U$n_hex\t" "$n_hex" | ||||
|     [ $((count % 10)) = 0 ] && printf "\n" | ||||
| done | ||||
| printf "\n" | ||||
|  | ||||
							
								
								
									
										2
									
								
								arch-user/bin/pacman/uninstall-orphans.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										2
									
								
								arch-user/bin/pacman/uninstall-orphans.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| #!/bin/sh | ||||
| pacman -Qdttq | sudo pacman -Rns - | ||||
							
								
								
									
										211
									
								
								arch-user/bin/run.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										211
									
								
								arch-user/bin/run.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,211 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| LIST=(); | ||||
| # gui | ||||
| if [ "$USER" = "yrzam" ]; then | ||||
| 	LIST+=( | ||||
| 	"web" 	"web projects" | ||||
| 	"web" 	"web life" | ||||
| 	) | ||||
| 	WEB_HAS_PROFILES=1 | ||||
| else | ||||
| 	LIST+=( | ||||
| 	"web" 	"web" | ||||
| 	) | ||||
| fi | ||||
| LIST+=( | ||||
| 	"gui"		"telegram-desktop" | ||||
| 	"gui"		"gimp" | ||||
| 	"gui"		"sqlitebrowser" | ||||
| # tui | ||||
| 	"shell_tui"	"vifm" | ||||
| 	"shell_tui"	"vim" | ||||
| 	"tui"		"htop" | ||||
| 	"float_tui"	"nmtui" | ||||
| 	"float_tui"	"bluetoothctl" | ||||
| 	"man"		"man" | ||||
| 	"float_tui"	"node" | ||||
| 	"term"		"term" | ||||
| # native | ||||
| 	"screen_pick"	"screenshot output" | ||||
| 	"screen_pick"	"screenshot selection" | ||||
| 	"screen_pick"	"color-picker" | ||||
| 	"todo"		"pass" | ||||
| 	"calc"		"calc" | ||||
| 	"todo"		"translate ru-en" | ||||
| 	"todo"		"translate en-ru" | ||||
| 	"grep_dict"	"dict" | ||||
| ) | ||||
| if [ "$FEAT_BRIGHTNESS" ]; then | ||||
| 	LIST+=(	 | ||||
| 	"brightness"	"brightness" | ||||
| 	) | ||||
| fi | ||||
| LIST+=( | ||||
| 	"direct"	"sway reload" | ||||
| 	"power"		"logout" | ||||
| 	"todo"		"inhibit" | ||||
| 	"power"		"suspend" | ||||
| 	"power"		"poweroff" | ||||
| 	"power"		"poweroff --check-inhibitors=no" | ||||
| 	"power"		"reboot" | ||||
| ) | ||||
|  | ||||
| sure() { | ||||
| 	echo yes | bemenu --prompt "sure?" | ||||
| } | ||||
|  | ||||
| # generic | ||||
| exec_gui() { | ||||
| 	exec "$@" | ||||
| } | ||||
| exec_tui() { | ||||
| 	exec footclient -D ~/ "$@"  | ||||
| } | ||||
| exec_float_tui() { # todo  | ||||
| 	exec footclient --app-id="footclient_float" -D ~/ "$@" | ||||
| } | ||||
| exec_shell_tui() { | ||||
| 	exec footclient -D ~/ "$SHELL" -c "$@" | ||||
| } | ||||
| exec_shell_full() { | ||||
| 	exec footclient -D ~/ "$SHELL" -c "($1); read -n1" | ||||
| } | ||||
| exec_direct() { | ||||
| 	exec "$@" | ||||
| } | ||||
| exec_term() { | ||||
| 	exec footclient -D ~/ | ||||
| } | ||||
| # custom | ||||
| exec_web() { | ||||
| 	shift | ||||
| 	if [ "$WEB_HAS_PROFILES" ]; then | ||||
| 		shift | ||||
| 	fi | ||||
| 	qutebrowser "$*" | ||||
| } | ||||
| exec_man() { | ||||
| 	shift | ||||
| 	page="$1" | ||||
| 	if [ -z "$page" ]; then | ||||
| 		page="$( | ||||
| 			man -k . | \ | ||||
| 			bemenu --prompt "man" | \ | ||||
| 			sed ' s/\s\+\-.*//;s/ //g' | ||||
| 		)" | ||||
| 	fi | ||||
| 	[ -n "$page" ] && exec footclient "$SHELL" -c "man '$page' || read -n1" | ||||
| } | ||||
| exec_screen_pick() { | ||||
| 	if [ "$*" = "screenshot output" ]; then | ||||
| 		mon="$(swaymsg -t get_outputs | jq -r '. | map(select(.focused == true)) | .[0].name')" | ||||
| 		grim -o "$mon" - | wl-copy -t image/png | ||||
| 		notify-send Done -a screenshot "PNG image copied to clipboard" -t 3000 | ||||
| 	elif [ "$*" = "screenshot selection" ]; then | ||||
| 		grim -g "$(slurp)" - | wl-copy -t image/png | ||||
| 		notify-send Done -a screenshot "PNG image copied to clipboard" -t 3000 | ||||
| 	elif [ "$*" = "color-picker" ]; then | ||||
| 		hex="$( | ||||
| 			grim -g "$(slurp -p)" -t ppm - | \ | ||||
| 			magick - -format '%[pixel:p{0,0}]' txt:- | \ | ||||
| 			tail -n 1 | \ | ||||
| 			cut -d ' ' -f 4 | ||||
| 		)" | ||||
| 		notify-send "$hex" -a screenshot "stnrit" -t 3000 | ||||
| 	fi | ||||
| } | ||||
| exec_pass() { | ||||
| 	echo 1 | ||||
| } | ||||
| exec_calc() { | ||||
| 	shift | ||||
| 	query="$1" | ||||
| 	if [ -z "$query" ]; then | ||||
| 		query="$(echo "tui" | bemenu --prompt "qalc")" | ||||
| 	fi | ||||
| 	if [ "$query" = "tui" ]; then | ||||
| 		exec_float_tui "qalc"	 | ||||
| 	elif [ -n "$query" ]; then | ||||
| 		qalc_res="$(qalc --terse "$query")" | ||||
| 		menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")" | ||||
| 		if [ "$qalc_res" = "$menu_res" ]; then | ||||
| 			wl-copy "$qalc_res" | ||||
| 			notify-send "$qalc_res" -a calc "Result copied to clipboard" -t 3000 | ||||
| 		elif [ -n "$menu_res" ]; then | ||||
| 			exec_calc _ "$menu_res" | ||||
| 		fi | ||||
| 	fi | ||||
| } | ||||
| exec_transl() { | ||||
| 	echo 1 | ||||
| } | ||||
| exec_grep_dict() { | ||||
| 	shift | ||||
| 	dict="$1" | ||||
| 	pattern="$2" | ||||
| 	dicts_path="$HOME/know/dict/" | ||||
| 	if [ -z "$dict" ]; then | ||||
| 		dict="$(find "$dicts_path" -type f -printf "%f\n" | bemenu --prompt "dict")" | ||||
| 		[ -z "$dict" ] && return | ||||
| 	fi | ||||
| 	if [ -z "$pattern" ]; then | ||||
| 		pattern="$(echo -n | bemenu --prompt "grep $dict")" | ||||
| 		[ -z "$pattern" ] && return | ||||
| 	fi | ||||
| 	res="$({ echo ..; grep "$pattern" "$dicts_path/$dict"; } | bemenu --prompt " ")" | ||||
| 	if [ "$res" = ".."  ]; then | ||||
| 		exec_grep_dict _ "$dict" | ||||
| 	else | ||||
| 		wl-copy "$res" | ||||
| 		notify-send "$res" -a dict "Word copied to clipboard" -t 3000 | ||||
| 	fi | ||||
| } | ||||
| exec_brightness() { | ||||
| 	shift | ||||
| 	target="$1" | ||||
| 	if [ -z "$target" ]; then | ||||
| 		current="$(($(brightnessctl g)*100/$(brightnessctl m)))" | ||||
| 		current_i="$((current/5))" | ||||
| 		list="$(echo 1%; seq 5 5 100 | sed 's/$/%/')"; | ||||
| 		target="$(echo "$list" | bemenu --index $current_i --prompt "$current% ->")"; | ||||
| 	fi | ||||
| 	if [ -n "$target" ] && [ "$target" != "$current%" ]; then | ||||
| 		brightnessctl set "$target" | ||||
| 		[ -z "$1" ] && exec_brightness _ | ||||
| 	fi | ||||
| } | ||||
| exec_power() { | ||||
| 	case "$1" in | ||||
| 		poweroff|reboot|suspend) sure && systemctl "$@";; | ||||
| 		logout) sure && swaymsg exit;; | ||||
| 	esac | ||||
| } | ||||
|  | ||||
| if [ -n "$1" ]; then | ||||
| 	out="$*"; | ||||
| else | ||||
| 	out=$( | ||||
| 		for (( i=1; i<${#LIST[@]}; i+=2 )); do | ||||
| 			echo "${LIST[$i]}"; | ||||
| 		done | bemenu --prompt ">" | ||||
| 	) | ||||
| fi | ||||
|  | ||||
|  | ||||
| if [ "$out" ]; then | ||||
| 	for (( i=1; i<${#LIST[@]}; i+=2 )); do | ||||
| 		if [[ "$out" == "${LIST[$i]}"* ]]; then | ||||
| 			executor=${LIST[$((i-1))]} | ||||
| 		fi | ||||
| 	done | ||||
| 	[ -z "$executor" ] && executor=shell_full | ||||
| 	 | ||||
| 	if [ "$executor" = "shell_full" ]; then | ||||
| 		"exec_$executor" "$out" | ||||
| 	else | ||||
| 		eval "executor_args=($out)" | ||||
| 		#shellcheck disable=SC2154 | ||||
| 		"exec_$executor" "${executor_args[@]}" | ||||
| 	fi | ||||
| fi | ||||
							
								
								
									
										4
									
								
								arch-user/bin/sway/brightness-set-and-notify.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								arch-user/bin/sway/brightness-set-and-notify.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| #!/bin/sh | ||||
| brig="$(brightnessctl set "$1" -m | sed -e 's/.*,\([0-9]*\)%.*/\1/')" | ||||
| notify-send -t 2000 -h "int:value:$brig" -a "brightness" "$brig%" \ | ||||
| 	-h string:x-canonical-private-synchronous:brightness | ||||
							
								
								
									
										6
									
								
								arch-user/bin/sway/command-mode.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								arch-user/bin/sway/command-mode.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| out="$(printf '' | bemenu --prompt ':sway')" | ||||
| eval "executor_args=($out)" | ||||
| #shellcheck disable=SC2154 | ||||
| sway "${executor_args[@]}" | ||||
							
								
								
									
										11
									
								
								arch-user/config/bash/bashrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								arch-user/config/bash/bashrc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| [[ $- != *i* ]] && return | ||||
|  | ||||
| stty intr ^K | ||||
|  | ||||
| alias ls='ls --color=auto' | ||||
| alias grep='grep --color=auto' | ||||
|  | ||||
| export EDITOR=vim | ||||
| PS1='\[\033[38;2;153;136;255m\]\u@\h:\W\$\[\033[0m\]\[\e[0;91m\]${?#0}\[\e[0m\] ' | ||||
							
								
								
									
										24
									
								
								arch-user/config/bemenu/env.sh.tmpl
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										24
									
								
								arch-user/config/bemenu/env.sh.tmpl
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| #!/bin/sh | ||||
| export BEMENU_OPTS="\ | ||||
| --ignorecase \ | ||||
| --width-factor 0.5 \ | ||||
| --fn \"{{ .theme.font.name_mono }} {{ math.Add .theme.font.size_base_pt .theme.font.size_step_pt }}\" \ | ||||
| --list 500 \ | ||||
| --border 2 \ | ||||
| --scrollbar autohide \ | ||||
| --border-radius 4 \ | ||||
| --bdr #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \ | ||||
| --scf #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \ | ||||
| --scb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ | ||||
| --nb #{{ .theme.color.bg }} \ | ||||
| --ab #{{ .theme.color.bg }} \ | ||||
| --hb #{{ .theme.color.bg }} \ | ||||
| --fb #{{ .theme.color.bg }} \ | ||||
| --tb #{{ .theme.color.bg }} \ | ||||
| --nf #{{ .theme.color.fg }} \ | ||||
| --af #{{ .theme.color.fg }} \ | ||||
| --cf #{{ .theme.color.fg }} \ | ||||
| --hf #{{ .theme.color.fg_accent }} \ | ||||
| --tf #{{ .theme.color.fg_accent }} \ | ||||
| --ff #{{ .theme.color.fg_accent }} \ | ||||
| " | ||||
							
								
								
									
										255
									
								
								arch-user/config/foot/foot.ini.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										255
									
								
								arch-user/config/foot/foot.ini.tmpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,255 @@ | ||||
| # -*- conf -*- | ||||
|  | ||||
| # shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) | ||||
| # term=foot (or xterm-256color if built with -Dterminfo=disabled) | ||||
| # login-shell=no | ||||
|  | ||||
| # app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode | ||||
| title=term | ||||
| # locked-title=no | ||||
| font={{ .theme.font.name_mono }}:size={{ .theme.font.size_base_pt }} | ||||
| # font-bold=<bold variant of regular font> | ||||
| # font-italic=<italic variant of regular font> | ||||
| # font-bold-italic=<bold+italic variant of regular font> | ||||
| # font-size-adjustment=0.5 | ||||
| # line-height=<font metrics> | ||||
| # letter-spacing=0 | ||||
| # horizontal-letter-offset=0 | ||||
| # vertical-letter-offset=0 | ||||
| # underline-offset=<font metrics> | ||||
| # underline-thickness=<font underline thickness> | ||||
| # strikeout-thickness=<font strikeout thickness> | ||||
| # box-drawings-uses-font-glyphs=no | ||||
| # dpi-aware=no | ||||
|  | ||||
| # initial-window-size-pixels=700x500  # Or, | ||||
| # initial-window-size-chars=<COLSxROWS> | ||||
| # initial-window-mode=windowed | ||||
| pad=8x4                             # optionally append 'center' | ||||
| # resize-by-cells=yes | ||||
| # resize-keep-grid=yes | ||||
| # resize-delay-ms=100 | ||||
|  | ||||
| # bold-text-in-bright=no | ||||
| # word-delimiters=,│`|:"'()[]{}<> | ||||
| # selection-target=primary | ||||
| # workers=<number of logical CPUs> | ||||
| # utmp-helper=/usr/lib/utempter/utempter  # When utmp backend is ‘libutempter’ (Linux) | ||||
| # utmp-helper=/usr/libexec/ulog-helper    # When utmp backend is ‘ulog’ (FreeBSD) | ||||
|  | ||||
| [environment] | ||||
| # name=value | ||||
|  | ||||
| [bell] | ||||
| urgent=yes | ||||
| # notify=no | ||||
| # visual=no | ||||
| # command= | ||||
| # command-focused=no | ||||
|  | ||||
| [desktop-notifications] | ||||
| # command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body} | ||||
| # command-action-argument=--action ${action-name}=${action-label} | ||||
| # close="" | ||||
| # inhibit-when-focused=yes | ||||
|  | ||||
|  | ||||
| [scrollback] | ||||
| # lines=1000 | ||||
| # multiplier=3.0 | ||||
| # indicator-position=relative | ||||
| # indicator-format="" | ||||
|  | ||||
| [url] | ||||
| # launch=xdg-open ${url} | ||||
| # label-letters=sadfjklewcmpgh | ||||
| # osc8-underline=url-mode | ||||
| # protocols=http, https, ftp, ftps, file, gemini, gopher | ||||
| # uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] | ||||
|  | ||||
| [cursor] | ||||
| # style=block | ||||
| # color=<inverse foreground/background> | ||||
| # blink=no | ||||
| blink-rate=250 | ||||
| # beam-thickness=1.5 | ||||
| # underline-thickness=<font underline thickness> | ||||
|  | ||||
| [mouse] | ||||
| # hide-when-typing=no | ||||
| # alternate-scroll-mode=yes | ||||
|  | ||||
| [touch] | ||||
| # long-press-delay=400 | ||||
|  | ||||
| [colors] | ||||
| #alpha=1 | ||||
| background={{ .theme.color.bg }} | ||||
| foreground={{ .theme.color.fg }} | ||||
| # flash=7f7f00 | ||||
| # flash-alpha=0.5 | ||||
|  | ||||
| ## Normal/regular colors (color palette 0-7) | ||||
| # regular0=242424  # black | ||||
| # regular1=f62b5a  # red | ||||
| # regular2=47b413  # green | ||||
| # regular3=e3c401  # yellow | ||||
| # regular4=24acd4  # blue | ||||
| # regular5=f2affd  # magenta | ||||
| # regular6=13c299  # cyan | ||||
| # regular7=e6e6e6  # white | ||||
|  | ||||
| ## Bright colors (color palette 8-15) | ||||
| # bright0=616161   # bright black | ||||
| # bright1=ff4d51   # bright red | ||||
| # bright2=35d450   # bright green | ||||
| # bright3=e9e836   # bright yellow | ||||
| # bright4=5dc5f8   # bright blue | ||||
| # bright5=feabf2   # bright magenta | ||||
| # bright6=24dfc4   # bright cyan | ||||
| # bright7=ffffff   # bright white | ||||
|  | ||||
| ## dimmed colors (see foot.ini(5) man page) | ||||
| # dim0=<not set> | ||||
| # ... | ||||
| # dim7=<not-set> | ||||
|  | ||||
| ## The remaining 256-color palette | ||||
| # 16 = <256-color palette #16> | ||||
| # ... | ||||
| # 255 = <256-color palette #255> | ||||
|  | ||||
| ## Sixel colors | ||||
| # sixel0 =  000000 | ||||
| # sixel1 =  3333cc | ||||
| # sixel2 =  cc2121 | ||||
| # sixel3 =  33cc33 | ||||
| # sixel4 =  cc33cc | ||||
| # sixel5 =  33cccc | ||||
| # sixel6 =  cccc33 | ||||
| # sixel7 =  878787 | ||||
| # sixel8 =  424242 | ||||
| # sixel9 =  545499 | ||||
| # sixel10 = 994242 | ||||
| # sixel11 = 549954 | ||||
| # sixel12 = 995499 | ||||
| # sixel13 = 549999 | ||||
| # sixel14 = 999954 | ||||
| # sixel15 = cccccc | ||||
|  | ||||
| ## Misc colors | ||||
| # selection-foreground=<inverse foreground/background> | ||||
| # selection-background=<inverse foreground/background> | ||||
| # jump-labels=<regular0> <regular3>          # black-on-yellow | ||||
| # scrollback-indicator=<regular0> <bright4>  # black-on-bright-blue | ||||
| # search-box-no-match=<regular0> <regular1>  # black-on-red | ||||
| # search-box-match=<regular0> <regular3>     # black-on-yellow | ||||
| # urls=<regular3> | ||||
|  | ||||
| [csd] | ||||
| # preferred=server | ||||
| # size=26 | ||||
| # font=<primary font> | ||||
| # color=<foreground color> | ||||
| # hide-when-maximized=no | ||||
| # double-click-to-maximize=yes | ||||
| # border-width=0 | ||||
| # border-color=<csd.color> | ||||
| # button-width=26 | ||||
| # button-color=<background color> | ||||
| # button-minimize-color=<regular4> | ||||
| # button-maximize-color=<regular2> | ||||
| # button-close-color=<regular1> | ||||
|  | ||||
| [key-bindings] | ||||
| # scrollback-up-page=Shift+Page_Up | ||||
| # scrollback-up-half-page=none | ||||
| # scrollback-up-line=none | ||||
| # scrollback-down-page=Shift+Page_Down | ||||
| # scrollback-down-half-page=none | ||||
| # scrollback-down-line=none | ||||
| # scrollback-home=none | ||||
| # scrollback-end=none | ||||
| clipboard-copy=Control+c XF86Copy | ||||
| clipboard-paste=Control+v XF86Paste | ||||
| # primary-paste=Shift+Insert | ||||
| # search-start=Control+Shift+r | ||||
| # font-increase=Control+plus Control+equal Control+KP_Add | ||||
| # font-decrease=Control+minus Control+KP_Subtract | ||||
| # font-reset=Control+0 Control+KP_0 | ||||
| # spawn-terminal=Control+Shift+n | ||||
| # minimize=none | ||||
| # maximize=none | ||||
| # fullscreen=none | ||||
| # pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none | ||||
| # pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none | ||||
| # pipe-selected=[xargs -r firefox] none | ||||
| # pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard | ||||
| # show-urls-launch=Control+Shift+o | ||||
| # show-urls-copy=none | ||||
| # show-urls-persistent=none | ||||
| # prompt-prev=Control+Shift+z | ||||
| # prompt-next=Control+Shift+x | ||||
| # unicode-input=Control+Shift+u | ||||
| # noop=none | ||||
|  | ||||
| [search-bindings] | ||||
| # cancel=Control+g Control+c Escape | ||||
| # commit=Return | ||||
| # find-prev=Control+r | ||||
| # find-next=Control+s | ||||
| # cursor-left=Left Control+b | ||||
| # cursor-left-word=Control+Left Mod1+b | ||||
| # cursor-right=Right Control+f | ||||
| # cursor-right-word=Control+Right Mod1+f | ||||
| # cursor-home=Home Control+a | ||||
| # cursor-end=End Control+e | ||||
| # delete-prev=BackSpace | ||||
| # delete-prev-word=Mod1+BackSpace Control+BackSpace | ||||
| # delete-next=Delete | ||||
| # delete-next-word=Mod1+d Control+Delete | ||||
| # extend-char=Shift+Right | ||||
| # extend-to-word-boundary=Control+w Control+Shift+Right | ||||
| # extend-to-next-whitespace=Control+Shift+w | ||||
| # extend-line-down=Shift+Down | ||||
| # extend-backward-char=Shift+Left | ||||
| # extend-backward-to-word-boundary=Control+Shift+Left | ||||
| # extend-backward-to-next-whitespace=none | ||||
| # extend-line-up=Shift+Up | ||||
| clipboard-paste=Control+v Control+y XF86Paste | ||||
| # primary-paste=Shift+Insert | ||||
| # unicode-input=none | ||||
| # quit=none | ||||
| # scrollback-up-page=Shift+Page_Up | ||||
| # scrollback-up-half-page=none | ||||
| # scrollback-up-line=none | ||||
| # scrollback-down-page=Shift+Page_Down | ||||
| # scrollback-down-half-page=none | ||||
| # scrollback-down-line=none | ||||
| # scrollback-home=none | ||||
| # scrollback-end=none | ||||
|  | ||||
| [url-bindings] | ||||
| # cancel=Control+g Control+c Control+d Escape | ||||
| # toggle-url-visible=t | ||||
|  | ||||
| [text-bindings] | ||||
| # \x03=Mod4+c  # Map Super+c -> Ctrl+c | ||||
|  | ||||
| [mouse-bindings] | ||||
| # scrollback-up-mouse=BTN_WHEEL_BACK | ||||
| # scrollback-down-mouse=BTN_WHEEL_FORWARD | ||||
| # font-increase=Control+BTN_WHEEL_BACK | ||||
| # font-decrease=Control+BTN_WHEEL_FORWARD | ||||
| # selection-override-modifiers=Shift | ||||
| # primary-paste=BTN_MIDDLE | ||||
| # select-begin=BTN_LEFT | ||||
| # select-begin-block=Control+BTN_LEFT | ||||
| # select-extend=BTN_RIGHT | ||||
| # select-extend-character-wise=Control+BTN_RIGHT | ||||
| # select-word=BTN_LEFT-2 | ||||
| # select-word-whitespace=Control+BTN_LEFT-2 | ||||
| # select-quote = BTN_LEFT-3 | ||||
| # select-row=BTN_LEFT-4 | ||||
|  | ||||
| # vim: ft=dosini | ||||
							
								
								
									
										7
									
								
								arch-user/config/git/config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								arch-user/config/git/config
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| [user] | ||||
| 	email = {{ .user.GIT_USER_EMAIL }} | ||||
| 	name = {{ .user.GIT_USER_NAME }} | ||||
| [init] | ||||
| 	defaultBranch = main | ||||
| [pull] | ||||
| 	rebase = false | ||||
							
								
								
									
										7
									
								
								arch-user/config/gnupg/env.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								arch-user/config/gnupg/env.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| #!/bin/sh | ||||
| unset SSH_AGENT_PID | ||||
| if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then | ||||
| 	export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" | ||||
| fi | ||||
| export GPG_TTY=$(tty) | ||||
| gpg-connect-agent updatestartuptty /bye >/dev/null | ||||
							
								
								
									
										1
									
								
								arch-user/config/gnupg/gpg-agent.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								arch-user/config/gnupg/gpg-agent.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| pinentry-program ~/.local/bin/bemenu/pinentry.sh | ||||
							
								
								
									
										26
									
								
								arch-user/config/i3blocks/config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								arch-user/config/i3blocks/config
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| separator_block_width=20 | ||||
| command=~/.local/bin/i3blocks/$BLOCK_NAME.sh | ||||
|  | ||||
| [weather] | ||||
| label=⛅  | ||||
| interval=3600 | ||||
|  | ||||
| {{ if file.Exists "/sys/class/power_supply/ACAD/" }} | ||||
| [battery] | ||||
| interval=10 | ||||
| {{ end }} | ||||
|  | ||||
| [volume] | ||||
| interval=once | ||||
| signal=2 | ||||
|  | ||||
| [xkb_layout] | ||||
| label=⌨  | ||||
| interval=once | ||||
| signal=1 | ||||
|  | ||||
| [time] | ||||
| label=🕓  | ||||
| command=date +"%Y-%m-%dT%H:%M:%SZ" | ||||
| interval=1 | ||||
|  | ||||
							
								
								
									
										48
									
								
								arch-user/config/less/lesskey
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								arch-user/config/less/lesskey
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,48 @@ | ||||
| ###### colemak dh movement ##### | ||||
|  | ||||
| # n -> h | ||||
| #n	Help | ||||
| #N	Help | ||||
|  | ||||
| # e -> k | ||||
| e	back-line | ||||
| ^E	back-line | ||||
| E	back-line-force | ||||
|  | ||||
| # i -> j | ||||
| i	forw-line | ||||
| J	forw-line-force | ||||
|  | ||||
| # o -> l | ||||
| ^O	repaint | ||||
|  | ||||
|  | ||||
| # k -> n | ||||
| ^K	forw-line | ||||
| k	repeat-search | ||||
| \ek	repeat-search-all | ||||
| K	reverse-search | ||||
| \eK	reverse-search-all | ||||
| #^O^K	osc8-forw-search | ||||
| #^Ok	osc8-forw-search | ||||
| :k	next-file | ||||
|  | ||||
| # j -> e | ||||
| j	forw-line | ||||
| ^J	forw-line | ||||
| J	examine | ||||
| :j	examine | ||||
|  | ||||
| # l -> i | ||||
| # noop | ||||
|  | ||||
| # h -> o | ||||
| #^H^H osc8-open | ||||
|  | ||||
| ############################ | ||||
|  | ||||
|  | ||||
| ######### custom ########### | ||||
| n	left-scroll | ||||
| o	right-scroll | ||||
| ############################ | ||||
							
								
								
									
										9
									
								
								arch-user/config/mako/config.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								arch-user/config/mako/config.tmpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| format=<b>%s - %a</b>\n%b | ||||
| font=Roboto 10 | ||||
| background-color=#{{ .theme.color.bg_accent_dark }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} | ||||
| border-size=2 | ||||
| border-radius=4 | ||||
| border-color=#{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} | ||||
| padding=5,10 | ||||
| width=400 | ||||
| progress-color=#{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} | ||||
							
								
								
									
										4
									
								
								arch-user/config/pass/env.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								arch-user/config/pass/env.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| export PASSWORD_STORE_DIR="$HOME/know/id" | ||||
| export PASSWORD_STORE_GENERATED_LENGTH=16 | ||||
							
								
								
									
										16
									
								
								arch-user/config/profile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								arch-user/config/profile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| export PATH=$PATH:~/.local/bin | ||||
|  | ||||
| export WLR_RENDERER=vulkan | ||||
|  | ||||
| for fpath in ~/.config/*/env.sh; do | ||||
| 	. "$fpath" | ||||
| done | ||||
|  | ||||
| unset SSH_AGENT_PID | ||||
| if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then | ||||
| 	export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" | ||||
| fi | ||||
| export GPG_TTY=$(tty) | ||||
| gpg-connect-agent updatestartuptty /bye >/dev/null | ||||
							
								
								
									
										63
									
								
								arch-user/config/qutebrowser/config.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								arch-user/config/qutebrowser/config.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | ||||
| #import time | ||||
| #start_ts=time.time()  | ||||
|  | ||||
| import os | ||||
| env=os.environ | ||||
|  | ||||
| ################# general ############ | ||||
| config.load_autoconfig(False) | ||||
| c.tabs.tabs_are_windows = True | ||||
| c.tabs.show = 'never' | ||||
| ###################################### | ||||
|  | ||||
| ############### keybinds ############## | ||||
| for mode in ['normal','insert','hint','passthrough','command','prompt','yesno','register']: | ||||
|   m = c.bindings.commands[mode]={} | ||||
|   d = c.bindings.default[mode] | ||||
|    | ||||
|   m['<Cut>'] = 'fake-key -g <Ctrl-x>' | ||||
|   m['<Copy>'] =	'fake-key -g <Ctrl-c>' | ||||
|   m['<Paste>'] = 'fake-key -g <Ctrl-v>' | ||||
|  | ||||
|   noremap=[ | ||||
|     'n','h',	'N','H',	'<Ctrl-N>','<Ctrl-H>', | ||||
|     'e','k',	'E','K',	'<Ctrl-E>','<Ctrl-K>', | ||||
|     'i','j',	'I','J',	'<Ctrl-I>','<Ctrl-J>', | ||||
|     'o','l',	'O','L',	'<Ctrl-O>','<Ctrl-L>', | ||||
|  | ||||
|     'k','n',	'K','N',	'<Ctrl-K>','<Ctrl-N>', | ||||
|     'l','i',	'L','I',	'<Ctrl-L>','<Ctrl-I>', | ||||
|     'h','o',	'H','O',	'<Ctrl-H>','<Ctrl-O>', | ||||
|     'j','e',	'J','E',	'<Ctrl-J>','<Ctrl-E>', | ||||
|   ] | ||||
|   for i in range(0,len(noremap)-1,2): | ||||
|     cmd=d.get(noremap[i+1]) | ||||
|     if(cmd): | ||||
|       m[noremap[i]]=cmd | ||||
|  | ||||
| c.bindings.key_mappings.update(dict(zip("ьЬыЫфФпПбБжЖлЛуУяЯаАрРсСтТгГмМнНеЕиИоОчЧцЦдДвВзЗкКхХ", "qQwWfFpPbBjJlLuUyYaArRsStTgGmMnNeEiIoOxXcCdDvVzZkKhH"))) | ||||
| ############################################ | ||||
|  | ||||
| # styles | ||||
| c.colors.webpage.preferred_color_scheme = 'dark' | ||||
| c.colors.webpage.darkmode.enabled = True | ||||
| c.colors.webpage.bg = '#'+env['QB_THEME_COLOR_BG'] | ||||
| c.fonts.default_family = 'Roboto' | ||||
| ########################################## | ||||
|  | ||||
| # search engines | ||||
| c.url.searchengines = { | ||||
|   'DEFAULT':	'https://lite.duckduckgo.com/lite?&q={}', | ||||
|   '!d':		'https://lite.duckduckgo.com/lite?&q={}', | ||||
|   '!g':		'https://google.com/search?hl=en&q={}', | ||||
|   '!y':		'https://ya.ru/search/?text={}', | ||||
|   '!c':		'https://chat.openai.com/chat?q={}', | ||||
| } | ||||
| ########################################### | ||||
|  | ||||
| # start page ############ | ||||
| c.url.default_page = 'file:///home/'+env['USER']+'/.local/share/qutebrowser/start.html' | ||||
| c.url.start_pages = ['file:///home/'+env['USER']+'/.local/share/qutebrowser/start.html'] | ||||
| ######################################## | ||||
|  | ||||
| #print(f"Execution time {time.time() - start_ts}")  | ||||
							
								
								
									
										3
									
								
								arch-user/config/qutebrowser/env.sh.tmpl
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								arch-user/config/qutebrowser/env.sh.tmpl
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| export QB_THEME_COLOR_BG={{ .theme.color.bg  }} | ||||
							
								
								
									
										3
									
								
								arch-user/config/readline/env.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								arch-user/config/readline/env.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| export INPUTRC="$HOME/.config/readline/inputrc" | ||||
							
								
								
									
										55
									
								
								arch-user/config/readline/inputrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								arch-user/config/readline/inputrc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | ||||
| set editing-mode vi | ||||
|  | ||||
| ########### prompt ############## | ||||
| set show-mode-in-prompt on | ||||
| set vi-ins-mode-string \1\e[1 q\2 | ||||
| set vi-cmd-mode-string \1\e[2 q\2 | ||||
| ################################# | ||||
|  | ||||
| ##### remap - colemak-dh ####### | ||||
|  | ||||
| # n -> h | ||||
| set keymap vi-insert | ||||
| "\C-n":backward-delete-char | ||||
| set keymap vi-command | ||||
| "n":backward-char | ||||
| "\C-n":backward-char | ||||
| # e -> k | ||||
| set keymap vi-command | ||||
| "e":previous-history | ||||
| "\C-e":kill-line | ||||
| # i -> j | ||||
| #set keymap vi-insert | ||||
| # "\C-i":accept-line # ascii code conflicts with tab | ||||
| set keymap vi-command | ||||
| "i":next-history | ||||
| # "\C-i":accept-line # ascii code conflicts with tab | ||||
| # o -> l | ||||
| set keymap vi-command | ||||
| "o":forward-char | ||||
| "\C-o":clear-screen | ||||
|  | ||||
| # k -> n | ||||
| #set keymap vi-insert | ||||
| #"\C-k":menu-complete # bound to intr, use tab | ||||
| set keymap vi-command | ||||
| "k":vi-search-again | ||||
| "K":vi-search-again | ||||
| "\C-k":next-history | ||||
| # j -> e | ||||
| set keymap vi-insert | ||||
| "\C-e":self-insert | ||||
| set keymap vi-command | ||||
| "j":vi-end-word | ||||
| "J":vi-end-word | ||||
| # l -> i | ||||
| set keymap vi-insert | ||||
| "\C-l":complete | ||||
| set keymap vi-command | ||||
| "l":vi-insertion-mode | ||||
| "L":vi-insert-beg | ||||
| # h -> o | ||||
| set keymap vi-insert | ||||
| "\C-h":operate-and-get-next | ||||
|  | ||||
| ################################# | ||||
							
								
								
									
										150
									
								
								arch-user/config/sway/config.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										150
									
								
								arch-user/config/sway/config.tmpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,150 @@ | ||||
| # vim: filetype=swayconfig | ||||
|  | ||||
| set $mod Mod4 | ||||
| set $altmod Mod4+Mod5 | ||||
| set $altmod2 Mod4+Shift | ||||
| set $kbmod Alt_R | ||||
| set $fwd m | ||||
| set $left n | ||||
| set $up e | ||||
| set $down i | ||||
| set $right o | ||||
| set $bwd apostrophe | ||||
|  | ||||
| ################ styles #################### | ||||
| default_border pixel 1 | ||||
| smart_borders on | ||||
| title_align center | ||||
| font pango:{{ .theme.font.name_regular }} {{ math.Sub .theme.font.size_base_pt .theme.font.size_step_pt }} | ||||
| output * bg #{{ .theme.color.bg }} solid_color | ||||
| client.focused #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }} | ||||
| client.focused_tab_title #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }} | ||||
| client.focused_inactive #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }} | ||||
| client.unfocused #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.fg_dark }} #{{ .theme.color.fg_accent }} #{{ .theme.color.bg_accent_light }}{{ math.Mul .theme.opacity.low 255 | conv.ToInt64 | printf "%02X" }} | ||||
| client.urgent #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} | ||||
| bar { | ||||
| 	position top | ||||
| 	font pango:{{ .theme.font.name_regular }} {{ .theme.font.size_base_pt }} | ||||
| 	status_command i3blocks | ||||
| 	strip_workspace_numbers yes | ||||
| 	separator_symbol | | ||||
| 	workspace_min_width 28 | ||||
| 	tray_output none | ||||
| 	colors { | ||||
| 		statusline #{{ .theme.color.fg }} | ||||
| 		background #{{ .theme.color.bg }} | ||||
| 		separator #{{ .theme.color.fg_dark }} | ||||
| 		focused_workspace #{{ .theme.color.bg_accent_light }} #{{ .theme.color.bg_accent_light }} #{{ .theme.color.fg }} | ||||
| 		inactive_workspace #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.bg_accent_dark }} #{{ .theme.color.fg }} | ||||
| 		urgent_workspace #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }} | ||||
| 		binding_mode #{{ .theme.color.fg_accent }} #{{ .theme.color.fg_accent }} #{{ .theme.color.fg }} | ||||
| 	} | ||||
| } | ||||
| ########################################### | ||||
|  | ||||
| ################ inputs #################### | ||||
| input "type:keyboard" { | ||||
| 	xkb_layout us(yurmak),ru(yurmak) | ||||
| 	repeat_rate 50 | ||||
| } | ||||
| bindsym --to-code $kbmod input "type:keyboard" xkb_switch_layout next; exec pkill -SIGRTMIN+1 i3blocks | ||||
| input "type:touchpad" { | ||||
| 	tap enabled | ||||
| 	natural_scroll enabled | ||||
| } | ||||
| ############################################ | ||||
|  | ||||
| ############### workspaces ################# | ||||
| bindsym --to-code { | ||||
| 	$mod+a workspace 1:A | ||||
| 	$mod+r workspace 2:R | ||||
| 	$mod+s workspace 3:S | ||||
| 	$mod+t workspace 4:T | ||||
| 	$mod+g workspace 5:G | ||||
| 	$altmod+a move container to workspace 1:A; workspace 1:A | ||||
| 	$altmod+r move container to workspace 2:R; workspace 2:R | ||||
| 	$altmod+s move container to workspace 3:S; workspace 3:S | ||||
| 	$altmod+t move container to workspace 4:T; workspace 4:T | ||||
| 	$altmod+g move container to workspace 5:G; workspace 5:G | ||||
| } | ||||
| bindgesture swipe:right workspace prev | ||||
| bindgesture swipe:left workspace next | ||||
| ############################################ | ||||
|  | ||||
| ############### containers ################# | ||||
| # top row - layouts | ||||
| bindsym --to-code { | ||||
| 	$mod+p layout splith | ||||
| 	$altmod+p split h | ||||
| 	$mod+l layout splitv | ||||
| 	$altmod+l split v | ||||
| 	$mod+f fullscreen | ||||
| 	$mod+w layout tabbed | ||||
| 	$altmod+w split v; layout tabbed | ||||
| 	$mod+u split none | ||||
| 	$mod+y layout stacking | ||||
| 	$altmod+y split h; layout stacking | ||||
| } | ||||
| # mid row - focus, movement | ||||
| bindsym --to-code { | ||||
| 	$mod+$fwd focus child | ||||
| 	$mod+$left focus left | ||||
| 	$mod+$up focus up | ||||
| 	$mod+$down focus down | ||||
| 	$mod+$right focus right | ||||
| 	$mod+$bwd focus parent | ||||
| 	$altmod+$left move left 40px | ||||
| 	$altmod+$up move up 40px | ||||
| 	$altmod+$down move down 40px | ||||
| 	$altmod+$right move right 40px | ||||
| 	$altmod2+$left resize shrink width 2ppt or 40px | ||||
| 	$altmod2+$up resize shrink height 4ppt or 40px | ||||
| 	$altmod2+$down resize grow height 4ppt or 40px | ||||
| 	$altmod2+$right resize grow width 2ppt or 40px | ||||
| } | ||||
| # bottom row - 3d | ||||
| bindsym --to-code { | ||||
| 	$mod+d scratchpad show | ||||
| 	$altmod+x sticky enable; move scratchpad | ||||
| 	$mod+z focus tiling | ||||
| 	$altmod+z focus floating; floating disable; sticky disable | ||||
| 	$mod+h focus floating | ||||
| 	$altmod+h floating enable; sticky enable | ||||
| 	$mod+k focus prev sibling | ||||
| 	$mod+Comma opacity minus 0.05 | ||||
| 	$mod+Period opacity plus 0.05 | ||||
| 	$mod+slash focus next sibling | ||||
| 	$mod+x exec wtype -M ctrl x -m ctrl | ||||
| 	$mod+c exec wtype -M ctrl c -m ctrl | ||||
| 	$mod+v exec wtype -M ctrl v -m ctrl | ||||
| } | ||||
| floating_modifier $mod normal | ||||
| ############################################ | ||||
|  | ||||
| ################## actions #################### | ||||
| bindsym --to-code { | ||||
| 	# generic | ||||
| 	$mod+Escape kill | ||||
| 	# media | ||||
| 	XF86MonBrightnessDown exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%- | ||||
| 	XF86MonBrightnessUp exec ~/.local/bin/sway/brightness-set-and-notify.sh 5%+ | ||||
| 	XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle && pkill -SIGRTMIN+2 i3blocks | ||||
| 	XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% && pkill -SIGRTMIN+2 i3blocks | ||||
| 	XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% && pkill -SIGRTMIN+2 i3blocks | ||||
| 	XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle && pkill -SIGRTMIN+2 i3blocks | ||||
| 	# basic scripts | ||||
| 	$mod+Colon exec ~/.local/bin/sway/command-mode.sh | ||||
| 	$mod+Return exec footclient | ||||
| 	$mod+Space exec run.sh | ||||
| } | ||||
| ############################################## | ||||
|  | ||||
| ################# daemons #################### | ||||
| exec foot -s | ||||
| exec mako | ||||
| exec swayidle | ||||
| ############################################## | ||||
|  | ||||
| ############## app-specific ################## | ||||
| for_window [app_id="_float"] floating enable, resize set 960 540 | ||||
| ############################################## | ||||
							
								
								
									
										2
									
								
								arch-user/config/swayidle/config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								arch-user/config/swayidle/config
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| timeout 280 'notify-send "Suspend in 20s" "Produce some acivity or run inhibit to cancel" -a "idle" -t 20000' | ||||
| timeout 300 'systemctl suspend' | ||||
							
								
								
									
										21
									
								
								arch-user/config/theme.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								arch-user/config/theme.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| { | ||||
| 	"color": { | ||||
| 		"fg": "ffffff", | ||||
| 		"fg_dark": "b8bcc1", | ||||
| 		"fg_accent": "9988ff", | ||||
| 		"bg": "0d1117", | ||||
| 		"bg_accent_light":"510079", | ||||
| 		"bg_accent_dark":"020030" | ||||
| 	}, | ||||
| 	"opacity": { | ||||
| 		"low": 0.2, | ||||
| 		"med": 0.55, | ||||
| 		"high": 0.85 | ||||
| 	}, | ||||
| 	"font": { | ||||
| 		"name_regular": "Roboto", | ||||
| 		"name_mono": "Roboto Mono", | ||||
| 		"size_base_pt": 12, | ||||
| 		"size_step_pt": 1.5 | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										142
									
								
								arch-user/config/vim/vimrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										142
									
								
								arch-user/config/vim/vimrc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,142 @@ | ||||
| "########## system ########### | ||||
| set nocompatible | ||||
| set ttyfast | ||||
| set encoding=utf-8 | ||||
| set mouse=a  | ||||
| set autoread | ||||
| au FocusGained,BufEnter * silent! checktime | ||||
| "############################# | ||||
|  | ||||
| "######### generic ########### | ||||
|  | ||||
| " status line | ||||
| set showmode | ||||
| set showcmd | ||||
| set ruler | ||||
|  | ||||
| " syntax hl | ||||
| syntax enable | ||||
| filetype on | ||||
| filetype plugin on | ||||
|  | ||||
| " lines | ||||
| set number | ||||
| set relativenumber | ||||
| set numberwidth=3 | ||||
| set wrap | ||||
| set showmatch " brackets | ||||
|  | ||||
| " search | ||||
| set hlsearch | ||||
| set incsearch | ||||
| set ignorecase | ||||
| set smartcase | ||||
|  | ||||
| " tabs | ||||
| set shiftwidth=4 | ||||
| set tabstop=4 | ||||
| set softtabstop=0 | ||||
| set noexpandtab | ||||
|  | ||||
| " scroll | ||||
| set scrolloff=5 | ||||
|  | ||||
| " commands  | ||||
| set wildmenu | ||||
| set wildmode=list:longest,full | ||||
| set gdefault | ||||
|  | ||||
| "########################################### | ||||
|  | ||||
| "############## file-specific ############### | ||||
| autocmd FileType markdown setlocal spell | ||||
| autocmd FileType gitcommit setlocal spell | ||||
| autocmd FileType markdown setlocal complete+=kspell | ||||
| autocmd FileType gitcommit setlocal complete+=kspell | ||||
| "############################################ | ||||
|  | ||||
| "####### remap - colemak-dh ####### | ||||
|  | ||||
| " n -> h | ||||
| noremap n h | ||||
| noremap N H | ||||
| noremap! <C-n> <C-h> | ||||
| " e -> k  | ||||
| noremap e k | ||||
| noremap E K | ||||
| noremap! <C-e> <C-k> | ||||
| " i -> j | ||||
| noremap i j | ||||
| noremap I J | ||||
| noremap! <C-i> <C-j> | ||||
| " o -> l | ||||
| noremap o l | ||||
| noremap O L | ||||
| noremap! <C-o> <C-l> | ||||
|  | ||||
| " k -> n | ||||
| noremap k n | ||||
| noremap K N | ||||
| noremap! <C-k> <C-n> | ||||
| " j -> e | ||||
| noremap j e | ||||
| noremap J E | ||||
| noremap! <C-j> <C-e> | ||||
| " l -> i | ||||
| noremap l i | ||||
| noremap L I | ||||
| noremap! <C-l> <C-i> | ||||
| " h -> o | ||||
| noremap h o | ||||
| noremap H O | ||||
| noremap! <C-h> <C-o> | ||||
|  | ||||
| "################################# | ||||
|  | ||||
| "####### custom commands ######### | ||||
| " W - Save file as superuser | ||||
| command! W execute 'w !sudo tee % > /dev/null' <bar> edit! | ||||
| "################################# | ||||
|  | ||||
| "######### localization ########## | ||||
| set langmap=ьЬыЫфФпПбБжЖлЛуУяЯаАрРсСтТгГмМнНеЕиИоОчЧцЦдДвВзЗкКхХ;qQwWfFpPbBjJlLuUyYaArRsStTgGmMnNeEiIoOxXcCdDvVzZkKhH | ||||
| " n -> h | ||||
| noremap н х | ||||
| noremap Н Х | ||||
| noremap! <C-н> <C-х> | ||||
| " e -> k  | ||||
| noremap е к | ||||
| noremap Е К | ||||
| noremap! <C-е> <C-к> | ||||
| " i -> j | ||||
| noremap и ж | ||||
| noremap И Ж | ||||
| noremap! <C-и> <C-ж> | ||||
| " o -> l | ||||
| noremap о л | ||||
| noremap О Л | ||||
| noremap! <C-о> <C-л> | ||||
| " k -> n | ||||
| noremap к н | ||||
| noremap К Н | ||||
| noremap! <C-к> <C-н> | ||||
| " j -> e | ||||
| noremap й е | ||||
| noremap Й Е | ||||
| noremap! <C-й> <C-е> | ||||
| " l -> i | ||||
| noremap л и | ||||
| noremap Л И | ||||
| noremap! <C-л> <C-и> | ||||
| " h -> o | ||||
| noremap х о | ||||
| noremap Х O | ||||
| noremap! <C-х> <C-о> | ||||
| "################################# | ||||
|  | ||||
| "############# hacks ############# | ||||
| {{ if ne .Env.IS_COMPAT "1" }} | ||||
| autocmd TextYankPost * if (v:event.operator == 'y' || v:event.operator == 'd') | silent! execute 'call system("wl-copy", @")' | endif | ||||
| nnoremap p :let @"=substitute(system("wl-paste --no-newline"), '<C-v><C-m>', '', 'g')<cr>p | ||||
| {{ end }} | ||||
| "################################ | ||||
							
								
								
									
										2
									
								
								arch-user/config/workspace.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								arch-user/config/workspace.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| GIT_USER_EMAIL= | ||||
| GIT_USER_NAME= | ||||
							
								
								
									
										93
									
								
								arch-user/config/xkb/symbols/ru
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								arch-user/config/xkb/symbols/ru
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,93 @@ | ||||
| xkb_symbols "yurmak" { | ||||
| 	 | ||||
| 	include "ru(common)" | ||||
| 	name[Group1]= "RU yurmak"; | ||||
| 	 | ||||
| 	########## functional ############## | ||||
| 	key.type = "ONE_LEVEL"; | ||||
| 	replace key <BKSL>	{ [ BackSpace ] }; | ||||
| 	replace key <TAB>	{ [ Escape ] }; | ||||
| 	replace key <RTSH>	{ [ Tab ] }; | ||||
| 	#################################### | ||||
| 	 | ||||
| 	########### modifiers ############## | ||||
| 	key.type = "ONE_LEVEL"; | ||||
| 	replace key <CAPS>	{ [ Control_L ] }; | ||||
| 	replace key <LCTL>	{ [ Super_L ] }; | ||||
| 	replace key <LWIN>	{ [ Alt_R ] }; | ||||
| 	replace key <LALT>	{ [ ISO_Level3_Shift ] }; | ||||
| 	replace key <RALT>	{ [ Alt_L ] }; | ||||
| 	##################################### | ||||
|  | ||||
| 	########### characters ############## | ||||
|  | ||||
| 	key.type = "FOUR_LEVEL"; | ||||
|  | ||||
| 	key <TLDE>	{ [ asterisk,	grave ]}; | ||||
| 	key <AE01>	{ [ 1,			numbersign ]}; | ||||
| 	key <AE02>	{ [ 2,			asciitilde ]}; | ||||
| 	key <AE03>	{ [ 3,			exclam ]}; | ||||
| 	key <AE04>	{ [ 4,			dollar ]}; | ||||
| 	key <AE05>	{ [ 5,			asciicircum ]}; | ||||
| 	key <AE06>	{ [ 6,			percent ]}; | ||||
| 	key <AE07>	{ [ 7,			bracketleft ]}; | ||||
| 	key <AE08>	{ [ 8,			bracketright ]}; | ||||
| 	key <AE09>	{ [ 9,			less ]}; | ||||
| 	key <AE10>	{ [ 0,			greater ]}; | ||||
| 	key <AE11>	{ [ minus,		plus ]}; | ||||
| 	key <AE12>	{ [ equal,		equal ]}; | ||||
| 	key <BKSP>	{ [ backslash,	at ] }; | ||||
| 	 | ||||
| 	key <AD01>	{ [ Cyrillic_softsign,	Cyrillic_SOFTSIGN,	Cyrillic_hardsign,	Cyrillic_HARDSIGN] }; # !!! | ||||
| 	key <AD02>	{ [ Cyrillic_yeru,	Cyrillic_YERU ] }; # !!! | ||||
| 	key <AD03>	{ [ Cyrillic_ef,	Cyrillic_EF] }; | ||||
| 	key <AD04>	{ [ Cyrillic_pe,	Cyrillic_PE] }; | ||||
| 	key <AD05>	{ [ Cyrillic_be,	Cyrillic_BE] }; | ||||
| 	key <AD06>	{ [ Cyrillic_zhe,	Cyrillic_ZHE] }; # !!! | ||||
| 	key <AD07>	{ [ Cyrillic_el,	Cyrillic_EL] }; | ||||
| 	key <AD08>	{ [ Cyrillic_u,		Cyrillic_U ] }; | ||||
| 	key <AD09>	{ [ Cyrillic_ya,	Cyrillic_YA] }; # !!! | ||||
| 	key <AD10>	{ [ colon,			semicolon] }; | ||||
| 	key <AD11>	{ [ parenleft,		braceleft,	 Cyrillic_sha, Cyrillic_SHA ] }; | ||||
| 	key <AD12>	{ [ parenright,		braceright,	 Cyrillic_shcha,Cyrillic_SHCHA ] }; | ||||
|  | ||||
| 	key <AC01>	{ [ Cyrillic_a,		Cyrillic_A]}; | ||||
| 	key <AC02>	{ [ Cyrillic_er,	Cyrillic_ER ] }; | ||||
| 	key <AC03>	{ [ Cyrillic_es,	Cyrillic_ES ] }; | ||||
| 	key <AC04>	{ [ Cyrillic_te,	Cyrillic_TE ] }; | ||||
| 	key <AC05>	{ [ Cyrillic_ghe,	Cyrillic_GHE ] }; | ||||
| 	key <AC06>	{ [ Cyrillic_em,	Cyrillic_EM ] }; | ||||
| 	key <AC07>	{ [ Cyrillic_en,	Cyrillic_EN ] }; | ||||
| 	key <AC08>	{ [ Cyrillic_ie,	Cyrillic_IE,	Cyrillic_io,	Cyrillic_IO ] }; | ||||
| 	key <AC09>	{ [ Cyrillic_i,		Cyrillic_I,		Cyrillic_shorti,Cyrillic_SHORTI ] }; | ||||
| 	key <AC10>	{ [ Cyrillic_o,		Cyrillic_O ] }; | ||||
| 	key <AC11>	{ [ quotedbl,		apostrophe,		Cyrillic_e,		Cyrillic_E ] }; | ||||
| 	 | ||||
| 	key <AB01>	{ [ Cyrillic_che,	Cyrillic_CHE ] }; # !!! | ||||
| 	key <AB02>	{ [ Cyrillic_tse,	Cyrillic_TSE ] }; | ||||
| 	key <AB03>	{ [ Cyrillic_de,	Cyrillic_DE ] }; | ||||
| 	key <AB04>	{ [ Cyrillic_ve,	Cyrillic_VE ] }; | ||||
| 	key <AB05>	{ [ Cyrillic_ze,	Cyrillic_ZE ] }; | ||||
| 	key <AB06>	{ [ Cyrillic_ka,	Cyrillic_KA ] }; | ||||
| 	key <AB07>	{ [ Cyrillic_ha,	Cyrillic_HA ] }; | ||||
| 	key <AB08>	{ [ comma,			bar,			Cyrillic_yu,	Cyrillic_YU] }; | ||||
| 	key <AB09>	{ [ period,			ampersand ] }; | ||||
| 	key <AB10>	{ [ slash,			question ] }; | ||||
|  | ||||
| 	key <SPCE>	{ [ space, underscore ] }; | ||||
|  | ||||
| 	####################################### | ||||
|  | ||||
| 	############# disable old ############# | ||||
| 	# This block disables old mappings completely | ||||
| 	# so that your only option is to use new ones. | ||||
| 	# Feel free to remove it, nothing will break =) | ||||
| 	key.type = "ONE_LEVEL"; | ||||
| 	replace key <ESC>	{ [ VoidSymbol ] }; | ||||
| 	replace key <LEFT>	{ [ VoidSymbol ] }; | ||||
| 	replace key <UP>	{ [ VoidSymbol ] }; | ||||
| 	replace key <RGHT>	{ [ VoidSymbol ] }; | ||||
| 	replace key <DOWN>	{ [ VoidSymbol ] }; | ||||
| 	####################################### | ||||
|  | ||||
| }; | ||||
							
								
								
									
										93
									
								
								arch-user/config/xkb/symbols/us
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								arch-user/config/xkb/symbols/us
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,93 @@ | ||||
| xkb_symbols "yurmak" { | ||||
| 	 | ||||
| 	include "us(basic)" | ||||
| 	name[Group1]= "EN yurmak"; | ||||
| 	 | ||||
| 	########## functional ############## | ||||
| 	key.type = "ONE_LEVEL"; | ||||
| 	replace key <BKSL>	{ [ BackSpace ] }; | ||||
| 	replace key <TAB>	{ [ Escape ] }; | ||||
| 	replace key <RTSH>	{ [ Tab ] }; | ||||
| 	#################################### | ||||
| 	 | ||||
| 	########### modifiers ############## | ||||
| 	key.type = "ONE_LEVEL"; | ||||
| 	replace key <CAPS>	{ [ Control_L ] }; | ||||
| 	replace key <LCTL>	{ [ Super_L ] }; | ||||
| 	replace key <LWIN>	{ [ Alt_R ] }; | ||||
| 	replace key <LALT>	{ [ ISO_Level3_Shift ] }; | ||||
| 	replace key <RALT>	{ [ ALT_L ] }; | ||||
| 	##################################### | ||||
|  | ||||
| 	########### characters ############## | ||||
|  | ||||
| 	key.type = "FOUR_LEVEL"; | ||||
|  | ||||
| 	key <TLDE>	{ [ asterisk,	grave ]}; | ||||
| 	key <AE01>	{ [ 1,			numbersign ]}; | ||||
| 	key <AE02>	{ [ 2,			asciitilde ]}; | ||||
| 	key <AE03>	{ [ 3,			exclam ]}; | ||||
| 	key <AE04>	{ [ 4,			dollar ]}; | ||||
| 	key <AE05>	{ [ 5,			asciicircum ]}; | ||||
| 	key <AE06>	{ [ 6,			percent ]}; | ||||
| 	key <AE07>	{ [ 7,			bracketleft ]}; | ||||
| 	key <AE08>	{ [ 8,			bracketright ]}; | ||||
| 	key <AE09>	{ [ 9,			less ]}; | ||||
| 	key <AE10>	{ [ 0,			greater ]}; | ||||
| 	key <AE11>	{ [ minus,		plus ]}; | ||||
| 	key <AE12>	{ [ equal,		equal ]}; | ||||
| 	key <BKSP>	{ [ backslash,	at ] }; | ||||
| 	 | ||||
| 	key <AD01>	{ [ q,			Q ] }; | ||||
| 	key <AD02>	{ [ w,			W ] }; | ||||
| 	key <AD03>	{ [ f,			F ] }; | ||||
| 	key <AD04>	{ [ p,			P ] }; | ||||
| 	key <AD05>	{ [ b,			B ] }; | ||||
| 	key <AD06>	{ [ j,			J ] }; | ||||
| 	key <AD07>	{ [ l,			L ] }; | ||||
| 	key <AD08>	{ [ u,			U ] }; | ||||
| 	key <AD09>	{ [ y,			Y ] }; | ||||
| 	key <AD10>	{ [ colon,		semicolon ] }; | ||||
| 	key <AD11>	{ [ parenleft,	braceleft ] }; | ||||
| 	key <AD12>	{ [ parenright,	braceright ] }; | ||||
|  | ||||
| 	key <AC01>	{ [ a,			A ] }; | ||||
| 	key <AC02>	{ [ r,			R ] }; | ||||
| 	key <AC03>	{ [ s,			S ] }; | ||||
| 	key <AC04>	{ [ t,			T ] }; | ||||
| 	key <AC05>	{ [ g,			G ] }; | ||||
| 	key <AC06>	{ [ m,			M ] }; | ||||
| 	key <AC07>	{ [ n,			N ] }; | ||||
| 	key <AC08>	{ [ e,			E ] }; | ||||
| 	key <AC09>	{ [ i,			I ] }; | ||||
| 	key <AC10>	{ [ o,			O ] }; | ||||
| 	key <AC11>	{ [ quotedbl,	apostrophe ] }; | ||||
| 	 | ||||
| 	key <AB01>	{ [ x,			X ] }; | ||||
| 	key <AB02>	{ [ c,			C ] }; | ||||
| 	key <AB03>	{ [ d,			D ] }; | ||||
| 	key <AB04>	{ [ v,			V ] }; | ||||
| 	key <AB05>	{ [ z,			Z ] }; | ||||
| 	key <AB06>	{ [ k,			K ]  }; | ||||
| 	key <AB07>	{ [ h,			H ] }; | ||||
| 	key <AB08>	{ [ comma,		bar ] }; | ||||
| 	key <AB09>	{ [ period,		ampersand ] }; | ||||
| 	key <AB10>	{ [ slash,		question ] }; | ||||
|  | ||||
| 	key <SPCE>	{ [ space,		underscore ] }; | ||||
|  | ||||
| 	####################################### | ||||
|  | ||||
| 	############# disable old ############# | ||||
| 	# This block disables old mappings completely | ||||
| 	# so that your only option is to use new ones. | ||||
| 	# Feel free to remove it, nothing will break =) | ||||
| 	key.type = "ONE_LEVEL"; | ||||
| 	replace key <ESC>	{ [ VoidSymbol ] }; | ||||
| 	replace key <LEFT>	{ [ VoidSymbol ] }; | ||||
| 	replace key <UP>	{ [ VoidSymbol ] }; | ||||
| 	replace key <RGHT>	{ [ VoidSymbol ] }; | ||||
| 	replace key <DOWN>	{ [ VoidSymbol ] }; | ||||
| 	####################################### | ||||
|  | ||||
| }; | ||||
							
								
								
									
										19
									
								
								arch-user/data/qutebrowser/start.html.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								arch-user/data/qutebrowser/start.html.tmpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
| <head> | ||||
| 	<meta charset="UTF-8"> | ||||
| 	<style> | ||||
| 		html { background:#$THEME_COLOR_BG; color:#$THEME_COLOR_FG; } | ||||
| 		body { margin: 8px; } | ||||
| 		form { display: flex; column-gap: 8px;  } | ||||
| 		label, input { font-size: ${THEME_SIZE_FONT_LARGE_MULT}rem; } | ||||
| 		input { flex:2; min-width:100px; background: none; } | ||||
| 	</style> | ||||
| </head> | ||||
| <body> | ||||
| 	<form onsubmit="location.href='https://lite.duckduckgo.com/lite/?q='+encodeURIComponent(document.getElementById('q').value); return false"> | ||||
| 		<label for="id">web :open</label> | ||||
| 		<input type="text" name="q" id="q" autofocus> | ||||
| 	</form> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										10
									
								
								arch-user/gen-linux-compat.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								arch-user/gen-linux-compat.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| set -e | ||||
| cd "$(dirname "$(readlink -f -- "$0")")" | ||||
| umask 002  | ||||
|  | ||||
| export IS_COMPAT=1 | ||||
| gomplate --file config/vim/vimrc --out ../linux-compat/home/.vimrc | ||||
| gomplate --file config/readline/inputrc --out ../linux-compat/home/.inputrc | ||||
| gomplate --file config/less/lesskey --out ../linux-compat/home/.lesskey | ||||
							
								
								
									
										94
									
								
								arch-user/install.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										94
									
								
								arch-user/install.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,94 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| # config/ - configuration files (including shell and profile) | ||||
| # data/ - resource files used by configured system | ||||
| # bin/ - scripts used either by configured system or by user | ||||
|  | ||||
| set -e | ||||
| cd "$(dirname "$(readlink -f -- "$0")")" | ||||
| umask 002 | ||||
| [[ "$(id -u)" == "0" ]] && echo "ERROR: wrong user" >&1 && exit 1 | ||||
|  | ||||
| ########## init config ######### | ||||
| if [[ ! -f ~/.config/workspace.conf ]]; then | ||||
| 	mkdir -p ~/.config | ||||
| 	cp config/workspace.conf ~/.config | ||||
| fi | ||||
| while read -r line; do | ||||
| 	param="${line::-1}" | ||||
| 	if ! grep -qE "^$param=.+" ~/.config/workspace.conf; then | ||||
| 		echo "ERROR: ~/.config/workspace.conf - missing $param" | ||||
| 		CONFIG_INVALID=1 | ||||
| 	fi | ||||
| done < config/workspace.conf | ||||
| [[ $CONFIG_INVALID ]] && exit 1 | ||||
| ################################ | ||||
|  | ||||
| ####### file structure ######### | ||||
| USER_DIRS=( | ||||
| 	##### xdg ##### | ||||
| 	~/.config	# bkp=weak | ||||
| 	~/.local/bin	# bkp=weak | ||||
| 	~/.local/share	# bkp=weak | ||||
| 	~/.local/state  | ||||
| 	~/.cache | ||||
| 	# app | ||||
| 	~/.local/state/sway | ||||
| 	################ | ||||
| 	##### user ##### | ||||
| 	# core knowledge base  | ||||
| 	~/know		# bkp=true,roam=true | ||||
| 	# large blobs for knowledge base | ||||
| 	~/know-lfs	# Large blobs for knowledge base. bkp=weak | ||||
| 	# temp files with manual bulk cleanup | ||||
| 	~/tmp | ||||
| 	# downloads | ||||
| 	~/dl		# bkp=weak | ||||
| 	# development - external vcs, tons of deps, etc. | ||||
| 	~/dev		# bkp=weak | ||||
| 	################ | ||||
| ) | ||||
| mkdir -p "${USER_DIRS[@]}" | ||||
| ################################ | ||||
|  | ||||
| ########## scripts ############# | ||||
| cp -rf bin/* ~/.local/bin | ||||
|  | ||||
| LN_EXCLUDE_DIRS=(i3blocks bemenu) | ||||
|  | ||||
| ln_exclude_dirs_cmp=" ${LN_EXCLUDE_DIRS[*]} " | ||||
| for sdir in bin/*; do | ||||
| 	[ ! -d "$sdir" ] && continue | ||||
| 	sdir="${sdir##*/}" | ||||
| 	[[ $ln_exclude_dirs_cmp == *" $sdir "*  ]] && continue | ||||
| 	find ~/.local/bin -maxdepth 1 -type l -name "$sdir-*" \ | ||||
| 		-exec rm {} \; | ||||
| 	#shellcheck disable=SC2016 | ||||
| 	find ~/.local/bin/"$sdir" -maxdepth 1 -type f -perm -u+rwx | \ | ||||
| 		xargs -0 -d \\n -n 1 sh -c 'ln -s "$1" "/$HOME/.local/bin/$(basename "$(dirname "$1")")-${1##*/}"' sh | ||||
| done | ||||
| ################################ | ||||
|  | ||||
| ########### config ############# | ||||
| export IS_COMPAT=0 | ||||
| gomplate --input-dir config \ | ||||
| 	--output-map "$HOME/.config/{{ .in | strings.ReplaceAll \".tmpl\" \"\" }}" \ | ||||
| 	--exclude-processing "!*.tmpl" \ | ||||
| 	--plugin jq=/bin/jq \ | ||||
| 	-c theme=config/theme.json \ | ||||
| 	-c user="file:///$HOME/.config/workspace.conf?type=application/x-env" \ | ||||
| 	--exclude /workspace.conf | ||||
|  | ||||
| ln -sf ~/.config/bash/bashrc ~/.bashrc | ||||
| ln -sf ~/.config/profile ~/.profile | ||||
| ln -sf ~/.config/less/lesskey ~/.lesskey | ||||
| mkdir -p ~/.gnupg && ln -sf ~/.config/gnupg/gpg-agent.conf ~/.gnupg | ||||
| ################################ | ||||
|  | ||||
| ############# data ############ | ||||
| cp -rf data/* ~/.local/share | ||||
| ############################### | ||||
|  | ||||
| swaymsg reload || true | ||||
|  | ||||
| echo ok | ||||
		Reference in New Issue
	
	Block a user