Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/helpers/get-screen-dpi
diff options
context:
space:
mode:
Diffstat (limited to 'commands/helpers/get-screen-dpi')
-rwxr-xr-xcommands/helpers/get-screen-dpi6
1 files changed, 6 insertions, 0 deletions
diff --git a/commands/helpers/get-screen-dpi b/commands/helpers/get-screen-dpi
new file mode 100755
index 0000000..8165920
--- /dev/null
+++ b/commands/helpers/get-screen-dpi
@@ -0,0 +1,6 @@
+#!/usr/bin/python
+
+from gi.repository import Gtk
+
+settings = Gtk.Settings.get_default()
+print settings.get_property('gtk-xft-dpi') / 1024