diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-27 20:02:10 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-27 20:02:10 -0500 |
commit | 42fdef6bf820b9a37b9b89017afaf3b3cdd86c4a (patch) | |
tree | 1c4035d4b70d86599b355ecf410675578a1d5de5 /.local/bin | |
parent | 10de71240a14b1fd5e7c9f788fbddb0ca6da664b (diff) |
more systemd/x11 stuff
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/systemd-import-profile | 9 | ||||
-rwxr-xr-x | .local/bin/xrdb-set-dpi | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/.local/bin/systemd-import-profile b/.local/bin/systemd-import-profile new file mode 100755 index 0000000..c896e31 --- /dev/null +++ b/.local/bin/systemd-import-profile @@ -0,0 +1,9 @@ +#!/bin/sh +. ~/.profile +vars=$(declare -x -p | sed -rn 's/^declare -x ([^=]+)(=.*)?$/\1/p' | grep -xFv -e PWD -e OLDPWD -e SHLVL) +if test "$1" = '-p'; then + declare -p $vars + echo systemctl --user import-environment $vars +else + systemctl --user import-environment $vars +fi diff --git a/.local/bin/xrdb-set-dpi b/.local/bin/xrdb-set-dpi new file mode 100755 index 0000000..2a6b055 --- /dev/null +++ b/.local/bin/xrdb-set-dpi @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +dpi=$(LC_ALL=C DISPLAY=:0 xdpyinfo|sed -rn 's/^\s*resolution:\s*(.*) dots per inch$/\1/p') +xrdb -merge <<<"Xft.dpi: ${dpi}" |