diff options
-rwxr-xr-x | autostart | 48 | ||||
-rwxr-xr-x | browser | 22 | ||||
-rwxr-xr-x | browser-work | 10 | ||||
-rwxr-xr-x | layout-switch | 15 | ||||
-rwxr-xr-x | sync-mail | 4 |
5 files changed, 67 insertions, 32 deletions
@@ -1,31 +1,38 @@ #!/usr/bin/env zsh feh --no-xinerama --image-bg black --bg-fill "$HOME/image/MIPS-R3000A-die.jpg" & + xset s 0 & xset b off & xset +fp $HOME/.fonts & + mkdir -p /tmp/pks/.cache /tmp/pks/.ccache /tmp/mutt & -exec xmodmap $HOME/.Xmodmap & -exec xbindkeys & -urxvtd=$(which urxvtd) -if [[ -x $HOME/.local/bin/urxvtd ]]; then - exec $HOME/.local/bin/urxvtd -q -f -o & -elif [[ -x $urxvtd ]]; then - exec urxvtd -q -f -o & +xmodmap $HOME/.Xmodmap & +xbindkeys & + +urxvtd -q -f -o & + +imwheel &>/dev/null & +unclutter -idle 5 & + +if [[ -x $(which sloppy) ]]; then + sloppy & fi -exec imwheel &>/dev/null & -exec unclutter -idle 5 & -exec $HOME/.local/bin/notification-daemon-launch & + +$HOME/.local/bin/notification-daemon-launch & + if [[ $RATPOISON == "ratpoison" && -x $(which acpi 2&>/dev/null) ]]; then - exec $HOME/.local/bin/ratcpi & + $HOME/.local/bin/ratcpi & fi -exec $HOME/.local/bin/mouse-settings & + +$HOME/.local/bin/mouse-settings & if [[ $(hostname) == "barkley" ]]; then xmodmap -e "keycode 66 = Shift_L NoSymbol Shift_L" - gsettings set org.gnome.desktop.interface text-scaling-factor 1.2 - syncthing -no-browser -home=$HOME/.config/syncthing &> $HOME/.config/syncthing/log.txt & + if [[ -x $(which gsettings) ]]; then + gsettings set org.gnome.desktop.interface text-scaling-factor 1.2 + fi fi if [[ $(hostname) == "bogues" ]]; then @@ -36,8 +43,15 @@ if [[ $(hostname) == "bogues" ]]; then fi if [[ $(hostname) == "bryant" ]]; then - exec xrandr --output HDMI-2 --rotate right & - #exec xrandr --output DP-7 --rotate right & - #exec sudo nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan-0]/GPUTargetFanSpeed=1" & + if [[ -f /dev/nvidia0 ]]; then + xrandr --output DP-7 --rotate right & + sudo nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan-0]/GPUTargetFanSpeed=1" & + else + xrandr --output HDMI-2 --rotate right & + fi +fi + +if [[ -x $(which notmuchfs) ]]; then + notmuchfs ~/.notmuchfs -o backing_dir=$HOME/.notmuchfs_backing -o mail_dir=$HOME/.mail -o mutt_2476_workaround fi @@ -1,11 +1,21 @@ #!/usr/bin/env zsh -dpi=`xdpyinfo | grep -oP 'resolution:\s+\K\S+'` -host=$(hostname) - -if [[ $dpi == 96x96 ]]; then - GDK_DPI_SCALE=1.3 /usr/bin/env firefox $@ +if printf $1 | grep -q "youtube.com"; then + mpv "$1" else - /usr/bin/env firefox $@ + dpi=`xdpyinfo | grep -oP 'resolution:\s+\K\S+'` + host=$(hostname) + + if [[ $(xdpyinfo | grep 'dimensions:' | strips | cut -d" " -f 5) == "1200x1920" ]]; then + SCALE=1.0 + else + SCALE=1.5 + fi + + if [[ $dpi == 96x96 ]]; then + GDK_DPI_SCALE=$SCALE /usr/bin/env firefox $@ + else + /usr/bin/env firefox $@ + fi fi diff --git a/browser-work b/browser-work index a858c8a..cdff00c 100755 --- a/browser-work +++ b/browser-work @@ -3,9 +3,15 @@ dpi=`xdpyinfo | grep -oP 'resolution:\s+\K\S+'` host=$(hostname) +if [[ $(xdpyinfo | grep 'dimensions:' | strips | cut -d" " -f 5) == "1200x1920" ]]; then + SCALE=1.0 +else + SCALE=1.5 +fi + if [[ $dpi == 96x96 ]]; then - GDK_DPI_SCALE=1.3 /usr/bin/env chromium-browser --reset-variation-state $@ + GDK_DPI_SCALE=$SCALE /usr/bin/env $HOME/chrome-linux/chrome --disk-cache-dir=/tmp/cache --reset-variation-state $@ else - /usr/bin/env chromium-browser $@ + $HOME/chrome-linux/chrome --disk-cache-dir=/tmp/cache --reset-variation-state $@ fi diff --git a/layout-switch b/layout-switch index fdc6b65..256eeb2 100755 --- a/layout-switch +++ b/layout-switch @@ -2,13 +2,18 @@ CUR_US=$(setxkbmap -print | grep xkb_symbols | grep -o "+us+") CUR_RU=$(setxkbmap -print | grep xkb_symbols | grep -o "+ru+") +CUR_DE=$(setxkbmap -print | grep xkb_symbols | grep -o "+de+") -if [[ $CUR_US == "" ]]; then - setxkbmap us -fi - -if [[ $CUR_RU == "" ]]; then +# us > de > ru +if [[ $CUR_US == "+us+" ]]; then + setxkbmap de + ratpoison -c "echo keyboard map DE" +elif [[ $CUR_DE == "+de+" ]]; then setxkbmap ru + ratpoison -c "echo keyboard map RU" +elif [[ $CUR_RU == "+ru+" ]]; then + setxkbmap us + ratpoison -c "echo keyboard map US" fi setxkbmap -option @@ -8,7 +8,7 @@ if [[ $(uname) == "Linux" ]]; then fi $(which imapfilter) -c $HOME/.imapfilter/personal.lua 2>/dev/null -if [[ ! -f ~/.holiday ]]; then +if [[ ! -f ~/.ooo ]]; then $(which imapfilter) -c $HOME/.imapfilter/work.lua 2>/dev/null fi @@ -17,7 +17,7 @@ case `date +"%a"` in $(which mbsync) -q personal ;; *) - if [[ -f ~/.holiday ]]; then + if [[ -f ~/.ooo ]]; then $(which mbsync) -q personal else $(which mbsync) -q -a |