diff options
| -rw-r--r-- | arch-pkgs | 5 | ||||
| -rwxr-xr-x | bin/4k-addmode.sh | 26 | ||||
| -rw-r--r-- | bin/Makefile | 1 | ||||
| -rw-r--r-- | kshrc | 27 |
4 files changed, 53 insertions, 6 deletions
@@ -20,12 +20,9 @@ git picom chromium firefox -konsole openssh feh -dolphin qt5ct # https://wiki.archlinux.org/title/qt#Appearance -okular oxygen oxygen-icons oxygen-icons-svg @@ -101,3 +98,5 @@ ntfs-3g pv exfat-utils zstd +bind-utils +evince diff --git a/bin/4k-addmode.sh b/bin/4k-addmode.sh new file mode 100755 index 0000000..ca5b712 --- /dev/null +++ b/bin/4k-addmode.sh @@ -0,0 +1,26 @@ +#!/bin/sh +help() { +cat <<EOF +$0 [-d <display_name>] [-x <x>] [-y <y>] [-ref <rate>] +'xrandr' with no arguments will give you a listing. +EOF +printf 'Defaults: x: %-6d y: %-6d ref: %-6.2f\n' "$x" "$y" "$ref" +exit 1 +} +display=DisplayPort-0 +x=3840 +y=2160 +ref=110.00 +while [ $# -gt 0 ] ; do case $1 in + -d) display="$2" ; shift ; shift ;; + -x) x="$2"; shift ; shift ;; + -y) y="$2"; shift ; shift ;; + -ref) ref="$(printf "%0.2f" "$2")"; shift ; shift ;; + *) help;; +esac ; done +modename="${x}x${y}_$ref" +mdline="$(cvt "$x" "$y" "$ref" | sed -ne's/^Modeline "[^"]*"//p')" +#shellcheck disable=SC2086 +xrandr --newmode "$modename" $mdline +xrandr --addmode "$display" "$modename" +xrandr --output "$display" --mode "$modename" diff --git a/bin/Makefile b/bin/Makefile index dc416a9..01a6333 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -14,4 +14,5 @@ install: install wallpaper $(HOME)/bin/ install status-bar $(HOME)/bin/ install vol $(HOME)/bin/ + install 4k-addmode.sh $(HOME)/bin/ @@ -30,6 +30,7 @@ alias egiv='grep -Eiv' alias search='grep -niRIE' alias rot13="tr 'A-Za-z' 'N-ZA-Mn-za-m'" alias setxkbmap-list="man xkeyboard-config" +alias csi="rlwrap chicken-csi" # docker-getip $container_id [ -x "$(command -v docker)" ] && \ alias docker-getip="docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'" @@ -208,6 +209,7 @@ set_ksh_competion() { show copy type list ls mv cp rm edit otp fnd find insert \ && set -A complete_dpw_2 -- $(dpw list) + #shellcheck disable=SC2046 set -A complete_passenv -- \ $(showPasswordStore ~/.password-store) @@ -218,6 +220,9 @@ set_ksh_competion() { set -A complete_ssh -- -L -D -A -X \ $(showsshhosts | awk '{print $1}') + #shellcheck disable=SC2046 + set -A complete_rsync -- $(showsshhosts | awk '{print $1}') + set -A complete_setPrompt -- date time basic } @@ -316,7 +321,7 @@ _passDir="$1" ; shift find "$_passDir" -type f -iname '*.gpg' \ | while read -r _line; do - _line="${_line##$_passDir}" + _line="${_line##"$_passDir"}" _line="${_line#/}" _line="${_line%.gpg}" echo "$_line" @@ -363,6 +368,7 @@ timestamp() { date +%m.%d.%y_%H.%M.%S } +#shellcheck disable=SC2120 checkSSHAgent() { if [ "$1" = "-k" ] ; then pkill -9 ssh-agent @@ -692,6 +698,20 @@ updateshell() { #shellcheck disable=SC1090 . "$HOME/.kshrc" } +updatenvim() { + OLDWD="$(pwd)" + #shellcheck disable=SC2164 + cd "$HOME" + nvimDest="$HOME/.config/nvim" + if ! [ -d "$nvimDest" ] ; then + mkdir -p "$nvimDest" + git clone "$NVIM_GIT_URL" "$nvimDest" + else + cd "$nvimDest" || { echo failed to cd "$nvimDest" ; return ; } + git pull --ff-only origin master + fi + cd "$OLDWD" +} updatevimrc() { OLDWD="$(pwd)" #shellcheck disable=SC2164 @@ -718,6 +738,7 @@ path_preappend "$HOME/bin" UPDATE_URL="https://git.riedstra.dev/mitch/dotfiles/plain/" VIM_GIT_URL="https://git.riedstra.dev/mitch/vim-cfg" +NVIM_GIT_URL="https://git.riedstra.dev/mitch/nvim-config" VIM_BASIC_URL="https://git.riedstra.dev/mitch/dotfiles/plain/vimrc" PRELOAD="$HOME/${SHELL_CONFIG}.pre" @@ -764,7 +785,7 @@ elif [ -n "$KSH_VERSION" ] ; then # export PS1='`nzret`\u@\h \$PWD \$ ' export PS1='`nzret`\u@\h\$ ' - if [ $(id -u) -eq 0 ] ; then + if [ "$(id -u)" -eq 0 ] ; then export PS1='`nzret`\h\$ ' fi @@ -783,7 +804,7 @@ elif [ -n "$BASH" ] ; then # export PS1='\u@\h \$PWD \$ ' export PS1='\u@\h\$ ' - if [ $(id -u) -eq 0 ] ; then + if [ "$(id -u)" -eq 0 ] ; then export PS1='\h\$ ' fi fi |
