]> git.madduck.net Git - etc/awesome.git/blobdiff - .config/awesome/rc.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

font experiments
[etc/awesome.git] / .config / awesome / rc.lua
index 53abbf1b1444b97853315f981516504df10acb29..3246cb4dfc2544157f6d5142e76afe6161c87d3c 100644 (file)
@@ -7,6 +7,7 @@ require("awful.autofocus")
 local wibox = require("wibox")
 -- Theme handling library
 local beautiful = require("beautiful")
+local xrdb = beautiful.xresources
 -- Notification library
 local naughty = require("naughty")
 local menubar = require("menubar")
@@ -44,8 +45,12 @@ end
 -- }}}
 
 -- {{{ Variable definitions
+--xrdb.set_dpi(95, screen[1])
+--xrdb.set_dpi(120, screen[2])
+
 -- Themes define colours, icons, and wallpapers
 beautiful.init(awful.util.get_themes_dir() .. "default/theme.lua")
+beautiful.font = 'Sans 10'
 
 -- This is used later as the default terminal and editor to run.
 terminal = "x-terminal-emulator"
@@ -303,6 +308,8 @@ elseif screen.count() == 3 then -- main screen is still #1 in the middle
 end
 
 awful.screen.connect_for_each_screen(function(s)
+    -- local fontsize = math.floor(250 * xrdb.get_dpi(s)/s.geometry.width)
+    -- beautiful.font = "Sans " .. tostring(fontsize)
     -- Wallpaper
     --DISABLED--if beautiful.wallpaper then
     --DISABLED--    local wallpaper = beautiful.wallpaper