summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautostart48
-rwxr-xr-xbrowser22
-rwxr-xr-xbrowser-work10
-rwxr-xr-xlayout-switch15
-rwxr-xr-xsync-mail4
5 files changed, 67 insertions, 32 deletions
diff --git a/autostart b/autostart
index e332498..4e289f7 100755
--- a/autostart
+++ b/autostart
@@ -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
diff --git a/browser b/browser
index a8f8612..9768162 100755
--- a/browser
+++ b/browser
@@ -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
diff --git a/sync-mail b/sync-mail
index 4a3d4f7..78fbc2f 100755
--- a/sync-mail
+++ b/sync-mail
@@ -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