summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 20:02:10 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 20:06:21 -0500
commit65cb251ba9d9203056c3c71e49576d7bd7e36069 (patch)
tree025b4015b5b8bed7906f271cc7d3b369c07535ba /.local
parent5e5e5029e76d88b3887bb175e28709a9022323a8 (diff)
more systemd/x11 stuff
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/systemd-import-profile9
-rwxr-xr-x.local/bin/xrdb-set-dpi4
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}"