added bash dpi switcher detecting monitor types (more to come)

gray-sff
Chris Nutter 2020-09-14 17:59:56 -07:00
parent bc609835d8
commit e7c3697c96
10 changed files with 41 additions and 47 deletions

View File

@ -1,4 +1,6 @@
Xft.dpi: 112 Xft.dpi: 128
! 96 = 1080p | 128 = 1440p
Xft.antialias: true Xft.antialias: true
Xft.hinting: true Xft.hinting: true
Xft.rgba: rgb Xft.rgba: rgb

View File

@ -427,19 +427,28 @@ mode "$mode_gaps_outer" {
} }
# Custom Scripts # Custom Scripts
########################################################
# --> Colorscheme
exec_always --no-startup-id wal -i ~/Pictures/Wallpapers/ exec_always --no-startup-id wal -i ~/Pictures/Wallpapers/
exec_always sh ~/.config/polybar/launch.sh
exec_always sh ~/.scripts/pywal-dunst.sh exec_always sh ~/.scripts/pywal-dunst.sh
# --> Taskbar
exec_always sh ~/.config/polybar/launch.sh
# --> Transparency
exec pkill picom exec pkill picom
exec picom -b -f exec picom -b -f
# --> Music
exec mpd ~/.config/mpd/mpd.conf exec mpd ~/.config/mpd/mpd.conf
exec mpc update exec mpc update
# --> Cross-platform M&K Support
exec synergyc --no-tray --restart --name Gray 192.168.1.236:24800 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 #exec kitty ~/.scripts/monitor-setup.sh

View File

@ -208,6 +208,13 @@ audio_output {
name "pulse audio" 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): # An example of a httpd output (built-in HTTP streaming server):
# #
#audio_output { #audio_output {

View File

@ -2,4 +2,4 @@
email = cdnutter@gmail.com email = cdnutter@gmail.com
name = Chris Nutter name = Chris Nutter
[credential] [credential]
helper = cache --timeout=86400 helper = store

View File

@ -1,31 +0,0 @@
#!/usr/bin/env zsh
# Compile and run LaTeX files from the command line
# make_run_latex [OPTION] <FILENAME>
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"

14
.scripts/dpi-switch.sh Executable file
View File

@ -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

View File

@ -1,7 +0,0 @@
#! /bin/bash
git add .
git commit
git push
# I'M LAZY ALRIGHT AREN'T WE ALL!?!

View File

@ -1 +0,0 @@
sudo mount.cifs //192.168.1.176/data /mnt/purple/ -o user=admin

1
.vimrc
View File

@ -1,5 +1,6 @@
set nocompatible set nocompatible
set wildmenu set wildmenu
set nowrap
filetype off filetype off
autocmd BufRead,BufNewFile *.md,*.text,*.txt,*.tex setlocal spell autocmd BufRead,BufNewFile *.md,*.text,*.txt,*.tex setlocal spell

View File

@ -647,9 +647,9 @@ pacman-mirrors 4.16.4-1
pacui 1.14-1 pacui 1.14-1
palemoon-bin 28.13.0-1 palemoon-bin 28.13.0-1
pam 1.4.0-3 pam 1.4.0-3
pamac-cli 9.5.9-1 pamac-cli 9.5.10-1
pamac-common 9.5.9-1 pamac-common 9.5.10-1
pamac-gtk 9.5.9-1 pamac-gtk 9.5.10-1
pambase 20200721.1-2 pambase 20200721.1-2
pango 1:1.46.1-1 pango 1:1.46.1-1
pangomm 2.42.1-2 pangomm 2.42.1-2
@ -766,7 +766,7 @@ remmina 1:1.4.8-1
remmina-plugin-rdesktop 1.3.0.0-1 remmina-plugin-rdesktop 1.3.0.0-1
rest 0.8.1-3 rest 0.8.1-3
rhash 1.4.0-1 rhash 1.4.0-1
rofi 1.6.0-1 rofi 1.6.0.r9.g6ba878e4-1
rpcbind 1.2.5-3 rpcbind 1.2.5-3
rsync 3.2.3-1 rsync 3.2.3-1
rtkit 0.13-1 rtkit 0.13-1