From e7c3697c965fca998344d9a3d28d4e84dafa2dea Mon Sep 17 00:00:00 2001 From: Chris Nutter Date: Mon, 14 Sep 2020 17:59:56 -0700 Subject: [PATCH] added bash dpi switcher detecting monitor types (more to come) --- .Xresources | 4 +++- .config/i3/config | 13 +++++++++++-- .config/mpd/mpd.conf | 7 +++++++ .gitconfig | 2 +- .scripts/compile-latex.sh | 31 ------------------------------- .scripts/dpi-switch.sh | 14 ++++++++++++++ .scripts/git-commit-push.sh | 7 ------- .scripts/purple_mount.sh | 1 - .vimrc | 1 + packages.txt | 8 ++++---- 10 files changed, 41 insertions(+), 47 deletions(-) delete mode 100755 .scripts/compile-latex.sh create mode 100755 .scripts/dpi-switch.sh delete mode 100755 .scripts/git-commit-push.sh delete mode 100755 .scripts/purple_mount.sh diff --git a/.Xresources b/.Xresources index 9d99a47..4a54666 100644 --- a/.Xresources +++ b/.Xresources @@ -1,4 +1,6 @@ -Xft.dpi: 112 +Xft.dpi: 128 +! 96 = 1080p | 128 = 1440p + Xft.antialias: true Xft.hinting: true Xft.rgba: rgb diff --git a/.config/i3/config b/.config/i3/config index a13c95a..06d41b7 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -427,19 +427,28 @@ mode "$mode_gaps_outer" { } # Custom Scripts +######################################################## +# --> Colorscheme exec_always --no-startup-id wal -i ~/Pictures/Wallpapers/ -exec_always sh ~/.config/polybar/launch.sh exec_always sh ~/.scripts/pywal-dunst.sh +# --> Taskbar +exec_always sh ~/.config/polybar/launch.sh + +# --> Transparency exec pkill picom exec picom -b -f +# --> Music exec mpd ~/.config/mpd/mpd.conf exec mpc update +# --> Cross-platform M&K Support exec synergyc --no-tray --restart --name Gray 192.168.1.236:24800 -# Extra +# --> Xresources DPI Switcher +exec_always sh ~/.scripts/dpi-switch.sh && xrdb ~/.Xresources +# Unused #exec kitty ~/.scripts/monitor-setup.sh diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf index 31d64f3..a6ac0b7 100644 --- a/.config/mpd/mpd.conf +++ b/.config/mpd/mpd.conf @@ -208,6 +208,13 @@ audio_output { name "pulse audio" } +audio_output { + type "fifo" + name "my_fifo" + path "/tmp/mpd.fifo" + format "44100:16:2" +} + # An example of a httpd output (built-in HTTP streaming server): # #audio_output { diff --git a/.gitconfig b/.gitconfig index ad9a8a6..ae72150 100644 --- a/.gitconfig +++ b/.gitconfig @@ -2,4 +2,4 @@ email = cdnutter@gmail.com name = Chris Nutter [credential] - helper = cache --timeout=86400 + helper = store diff --git a/.scripts/compile-latex.sh b/.scripts/compile-latex.sh deleted file mode 100755 index 4c25253..0000000 --- a/.scripts/compile-latex.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env zsh - -# Compile and run LaTeX files from the command line -# make_run_latex [OPTION] - -function x() { - [[ -z "$@" ]] && (xdg-open "$PWD" > /dev/null 2>&1) - for item in "$@"; do - - done -} - -[[ ! -f "$1" ]] && (echo "[-] Cannot open file at: $1, cowardly refusing";exit) -[[ ! -d exported ]] && mkdir exported -filename="$1:t:r" -#pdflatex "$1" "$filename".pdf -rubber -vvvv --unsafe -d "$1" -latexmk -silent -c -mv "$filename".pdf exported -process_count="$(ps aux | grep "$filename.pdf" | grep -v "grep" | awk '{print $2}')" - #| while read process; do kill -SIGTERM "$process"; done -if [[ -z "$process_count" ]]; then - xreader exported/"$filename".pdf > /dev/null 2>&1 & disown -else - PID="$(echo "$process_count" | head -n1)" - wmctrl -ia "$(wmctrl -lp | awk -vpid="$PID" '$3==pid {print $1; exit}')" -fi - -GREEN="\033[1;32m" -NOCOLOR="\033[0m" -echo "$GREEN"'Word count: '"$(textcount $1 | awk '/Words in text/ {print $4}')""$NOCOLOR" diff --git a/.scripts/dpi-switch.sh b/.scripts/dpi-switch.sh new file mode 100755 index 0000000..6586a21 --- /dev/null +++ b/.scripts/dpi-switch.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +if xdpyinfo | grep --quiet -oh 1440 + then + sed '1 s/96/128/g' ~/.Xresources > /tmp/xres + mv /tmp/xres ~/.Xresources + fi + +if xdpyinfo | grep --quiet -oh 1080 + then + sed '1 s/128/96/g' ~/.Xresources > /tmp/xres + mv /tmp/xres ~/.Xresources + fi + diff --git a/.scripts/git-commit-push.sh b/.scripts/git-commit-push.sh deleted file mode 100755 index b834e6f..0000000 --- a/.scripts/git-commit-push.sh +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/bash - -git add . -git commit -git push - -# I'M LAZY ALRIGHT AREN'T WE ALL!?! diff --git a/.scripts/purple_mount.sh b/.scripts/purple_mount.sh deleted file mode 100755 index 9761dbd..0000000 --- a/.scripts/purple_mount.sh +++ /dev/null @@ -1 +0,0 @@ -sudo mount.cifs //192.168.1.176/data /mnt/purple/ -o user=admin diff --git a/.vimrc b/.vimrc index e500387..cd9bb9b 100644 --- a/.vimrc +++ b/.vimrc @@ -1,5 +1,6 @@ set nocompatible set wildmenu +set nowrap filetype off autocmd BufRead,BufNewFile *.md,*.text,*.txt,*.tex setlocal spell diff --git a/packages.txt b/packages.txt index 3798ce5..309c57f 100644 --- a/packages.txt +++ b/packages.txt @@ -647,9 +647,9 @@ pacman-mirrors 4.16.4-1 pacui 1.14-1 palemoon-bin 28.13.0-1 pam 1.4.0-3 -pamac-cli 9.5.9-1 -pamac-common 9.5.9-1 -pamac-gtk 9.5.9-1 +pamac-cli 9.5.10-1 +pamac-common 9.5.10-1 +pamac-gtk 9.5.10-1 pambase 20200721.1-2 pango 1:1.46.1-1 pangomm 2.42.1-2 @@ -766,7 +766,7 @@ remmina 1:1.4.8-1 remmina-plugin-rdesktop 1.3.0.0-1 rest 0.8.1-3 rhash 1.4.0-1 -rofi 1.6.0-1 +rofi 1.6.0.r9.g6ba878e4-1 rpcbind 1.2.5-3 rsync 3.2.3-1 rtkit 0.13-1