HiDPI compatibility fixes

This commit is contained in:
Frédéric VANNIÈRE 2019-03-02 18:05:33 +00:00 committed by Luca Capezzuto
parent 55d7c68bc3
commit 684a432de2
12 changed files with 135 additions and 123 deletions

View File

@ -21,6 +21,7 @@ local freedesktop = require("freedesktop")
local hotkeys_popup = require("awful.hotkeys_popup").widget local hotkeys_popup = require("awful.hotkeys_popup").widget
require("awful.hotkeys_popup.keys") require("awful.hotkeys_popup.keys")
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
local dpi = require("beautiful.xresources").apply_dpi
-- }}} -- }}}
-- {{{ Error handling -- {{{ Error handling
@ -167,7 +168,7 @@ awful.util.tasklist_buttons = my_table.join(
instance:hide() instance:hide()
instance = nil instance = nil
else else
instance = awful.menu.clients({theme = {width = 250}}) instance = awful.menu.clients({theme = {width = dpi(250)}})
end end
end end
end), end),
@ -179,9 +180,9 @@ lain.layout.termfair.nmaster = 3
lain.layout.termfair.ncol = 1 lain.layout.termfair.ncol = 1
lain.layout.termfair.center.nmaster = 3 lain.layout.termfair.center.nmaster = 3
lain.layout.termfair.center.ncol = 1 lain.layout.termfair.center.ncol = 1
lain.layout.cascade.tile.offset_x = 2 lain.layout.cascade.tile.offset_x = dpi(2)
lain.layout.cascade.tile.offset_y = 32 lain.layout.cascade.tile.offset_y = dpi(32)
lain.layout.cascade.tile.extra_padding = 5 lain.layout.cascade.tile.extra_padding = dpi(5)
lain.layout.cascade.tile.nmaster = 5 lain.layout.cascade.tile.nmaster = 5
lain.layout.cascade.tile.ncol = 2 lain.layout.cascade.tile.ncol = 2
@ -197,7 +198,7 @@ local myawesomemenu = {
{ "quit", function() awesome.quit() end } { "quit", function() awesome.quit() end }
} }
awful.util.mymainmenu = freedesktop.menu.build({ awful.util.mymainmenu = freedesktop.menu.build({
icon_size = beautiful.menu_height or 16, icon_size = beautiful.menu_height or dpi(16),
before = { before = {
{ "Awesome", myawesomemenu, beautiful.awesome_icon }, { "Awesome", myawesomemenu, beautiful.awesome_icon },
-- other triads can be put here -- other triads can be put here
@ -710,7 +711,7 @@ client.connect_signal("request::titlebars", function(c)
end) end)
) )
awful.titlebar(c, {size = 16}) : setup { awful.titlebar(c, {size = dpi(16)}) : setup {
{ -- Left { -- Left
awful.titlebar.widget.iconwidget(c), awful.titlebar.widget.iconwidget(c),
buttons = buttons, buttons = buttons,

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local os = os local os = os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -24,15 +25,15 @@ theme.bg_normal = "#060606"
theme.bg_focus = "#060606" theme.bg_focus = "#060606"
theme.fg_urgent = "#CC9393" theme.fg_urgent = "#CC9393"
theme.bg_urgent = "#2A1F1E" theme.bg_urgent = "#2A1F1E"
theme.border_width = 1 theme.border_width = dpi(1)
theme.border_normal = "#0E0E0E" theme.border_normal = "#0E0E0E"
theme.border_focus = "#F79372" theme.border_focus = "#F79372"
theme.taglist_fg_focus = "#F6784F" theme.taglist_fg_focus = "#F6784F"
theme.taglist_bg_focus = "#060606" theme.taglist_bg_focus = "#060606"
theme.tasklist_fg_focus = "#F6784F" theme.tasklist_fg_focus = "#F6784F"
theme.tasklist_bg_focus = "#060606" theme.tasklist_bg_focus = "#060606"
theme.menu_height = 16 theme.menu_height = dpi(16)
theme.menu_width = 130 theme.menu_width = dpi(130)
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
theme.awesome_icon = theme.dir .."/icons/awesome.png" theme.awesome_icon = theme.dir .."/icons/awesome.png"
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
@ -190,7 +191,7 @@ local first = wibox.widget.textbox('<span font="Misc Tamsyn 4"> </span>')
local arrl_pre = separators.arrow_right("alpha", "#1A1A1A") local arrl_pre = separators.arrow_right("alpha", "#1A1A1A")
local arrl_post = separators.arrow_right("#1A1A1A", "alpha") local arrl_post = separators.arrow_right("#1A1A1A", "alpha")
local barheight = 18 local barheight = dpi(18)
local barcolor = gears.color({ local barcolor = gears.color({
type = "linear", type = "linear",
from = { barheight, 0 }, from = { barheight, 0 },
@ -239,7 +240,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons, { bg_normal = barcolor, bg_focus = barcolor }) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons, { bg_normal = barcolor, bg_focus = barcolor })
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 18, bg = barcolor }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = barcolor })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local awesome, client, os = awesome, client, os local awesome, client, os = awesome, client, os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -23,7 +24,7 @@ theme.bg_normal = "#111111"
theme.bg_focus = "#111111" theme.bg_focus = "#111111"
theme.fg_urgent = "#000000" theme.fg_urgent = "#000000"
theme.bg_urgent = "#FFFFFF" theme.bg_urgent = "#FFFFFF"
theme.border_width = 1 theme.border_width = dpi(1)
theme.border_normal = "#141414" theme.border_normal = "#141414"
theme.border_focus = "#93B6FF" theme.border_focus = "#93B6FF"
theme.taglist_fg_focus = "#FFFFFF" theme.taglist_fg_focus = "#FFFFFF"
@ -31,8 +32,8 @@ theme.taglist_bg_focus = "#111111"
theme.taglist_bg_normal = "#111111" theme.taglist_bg_normal = "#111111"
theme.titlebar_bg_normal = "#191919" theme.titlebar_bg_normal = "#191919"
theme.titlebar_bg_focus = "#262626" theme.titlebar_bg_focus = "#262626"
theme.menu_height = 16 theme.menu_height = dpi(16)
theme.menu_width = 130 theme.menu_width = dpi(130)
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.awesome_icon = theme.dir .."/icons/awesome.png" theme.awesome_icon = theme.dir .."/icons/awesome.png"
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
@ -155,14 +156,14 @@ theme.mpd = lain.widget.mpd({
-- Battery -- Battery
local baticon = wibox.widget.imagebox(theme.bat) local baticon = wibox.widget.imagebox(theme.bat)
local batbar = wibox.widget { local batbar = wibox.widget {
forced_height = 1, forced_height = dpi(1),
forced_width = 59, forced_width = dpi(59),
color = theme.fg_normal, color = theme.fg_normal,
background_color = theme.bg_normal, background_color = theme.bg_normal,
margins = 1, margins = 1,
paddings = 1, paddings = 1,
ticks = true, ticks = true,
ticks_size = 6, ticks_size = dpi(6),
widget = wibox.widget.progressbar, widget = wibox.widget.progressbar,
} }
local batupd = lain.widget.bat({ local batupd = lain.widget.bat({
@ -198,20 +199,20 @@ local batupd = lain.widget.bat({
end end
}) })
local batbg = wibox.container.background(batbar, "#474747", gears.shape.rectangle) local batbg = wibox.container.background(batbar, "#474747", gears.shape.rectangle)
local batwidget = wibox.container.margin(batbg, 2, 7, 4, 4) local batwidget = wibox.container.margin(batbg, dpi(2), dpi(7), dpi(4), dpi(4))
-- /home fs -- /home fs
--[[ commented because it needs Gio/Glib >= 2.54 --[[ commented because it needs Gio/Glib >= 2.54
local fsicon = wibox.widget.imagebox(theme.disk) local fsicon = wibox.widget.imagebox(theme.disk)
local fsbar = wibox.widget { local fsbar = wibox.widget {
forced_height = 1, forced_height = dpi(1),
forced_width = 59, forced_width = dpi(59),
color = theme.fg_normal, color = theme.fg_normal,
background_color = theme.bg_normal, background_color = theme.bg_normal,
margins = 1, margins = 1,
paddings = 1, paddings = 1,
ticks = true, ticks = true,
ticks_size = 6, ticks_size = dpi(6),
widget = wibox.widget.progressbar, widget = wibox.widget.progressbar,
} }
theme.fs = lain.widget.fs { theme.fs = lain.widget.fs {
@ -226,13 +227,13 @@ theme.fs = lain.widget.fs {
end end
} }
local fsbg = wibox.container.background(fsbar, "#474747", gears.shape.rectangle) local fsbg = wibox.container.background(fsbar, "#474747", gears.shape.rectangle)
local fswidget = wibox.container.margin(fsbg, 2, 7, 4, 4) local fswidget = wibox.container.margin(fsbg, dpi(2), dpi(7), dpi(4), dpi(4))
--]] --]]
-- ALSA volume bar -- ALSA volume bar
local volicon = wibox.widget.imagebox(theme.vol) local volicon = wibox.widget.imagebox(theme.vol)
theme.volume = lain.widget.alsabar { theme.volume = lain.widget.alsabar {
width = 59, border_width = 0, ticks = true, ticks_size = 6, width = dpi(59), border_width = 0, ticks = true, ticks_size = dpi(6),
notification_preset = { font = theme.font }, notification_preset = { font = theme.font },
--togglechannel = "IEC958,3", --togglechannel = "IEC958,3",
settings = function() settings = function()
@ -275,7 +276,7 @@ theme.volume.bar:buttons(my_table.join (
end) end)
)) ))
local volumebg = wibox.container.background(theme.volume.bar, "#474747", gears.shape.rectangle) local volumebg = wibox.container.background(theme.volume.bar, "#474747", gears.shape.rectangle)
local volumewidget = wibox.container.margin(volumebg, 2, 7, 4, 4) local volumewidget = wibox.container.margin(volumebg, dpi(2), dpi(7), dpi(4), dpi(4))
-- Weather -- Weather
theme.weather = lain.widget.weather({ theme.weather = lain.widget.weather({
@ -331,7 +332,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 18, bg = theme.bg_normal, fg = theme.fg_normal }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = theme.bg_normal, fg = theme.fg_normal })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local os = os local os = os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -24,14 +25,14 @@ theme.bg_normal = "#121212"
theme.bg_focus = "#121212" theme.bg_focus = "#121212"
theme.fg_urgent = "#CC9393" theme.fg_urgent = "#CC9393"
theme.bg_urgent = "#2A1F1E" theme.bg_urgent = "#2A1F1E"
theme.border_width = "0" theme.border_width = dpi(0)
theme.border_normal = "#121212" theme.border_normal = "#121212"
theme.border_focus = "#292929" theme.border_focus = "#292929"
theme.titlebar_bg_focus = "#292929" theme.titlebar_bg_focus = "#292929"
theme.taglist_fg_focus = "#dddcff" theme.taglist_fg_focus = "#dddcff"
theme.taglist_bg_focus = "#121212" theme.taglist_bg_focus = "#121212"
theme.menu_height = 16 theme.menu_height = dpi(16)
theme.menu_width = 130 theme.menu_width = dpi(130)
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
theme.awesome_icon = theme.dir .."/icons/awesome.png" theme.awesome_icon = theme.dir .."/icons/awesome.png"
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
@ -50,7 +51,7 @@ theme.layout_magnifier = theme.dir .. "/icons/magnifier
theme.layout_floating = theme.dir .. "/icons/floating.png" theme.layout_floating = theme.dir .. "/icons/floating.png"
theme.tasklist_plain_task_name = true theme.tasklist_plain_task_name = true
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.useless_gap = 10 theme.useless_gap = dpi(10)
theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png"
theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png"
theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png"
@ -219,7 +220,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 18, bg = theme.bg_normal, fg = theme.fg_normal }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = theme.bg_normal, fg = theme.fg_normal })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local string, os = string, os local string, os = string, os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -25,15 +26,15 @@ theme.bg_focus = "#303030"
theme.bg_normal = "#242424" theme.bg_normal = "#242424"
theme.fg_urgent = "#CC9393" theme.fg_urgent = "#CC9393"
theme.bg_urgent = "#006B8E" theme.bg_urgent = "#006B8E"
theme.border_width = 3 theme.border_width = dpi(3)
theme.border_normal = "#252525" theme.border_normal = "#252525"
theme.border_focus = "#0099CC" theme.border_focus = "#0099CC"
theme.taglist_fg_focus = "#FFFFFF" theme.taglist_fg_focus = "#FFFFFF"
theme.tasklist_bg_normal = "#222222" theme.tasklist_bg_normal = "#222222"
theme.tasklist_fg_focus = "#4CB7DB" theme.tasklist_fg_focus = "#4CB7DB"
theme.menu_height = 20 theme.menu_height = dpi(20)
theme.menu_width = 160 theme.menu_width = dpi(160)
theme.menu_icon_size = 32 theme.menu_icon_size = dpi(32)
theme.awesome_icon = theme.icon_dir .. "/awesome_icon_white.png" theme.awesome_icon = theme.icon_dir .. "/awesome_icon_white.png"
theme.awesome_icon_launcher = theme.icon_dir .. "/awesome_icon.png" theme.awesome_icon_launcher = theme.icon_dir .. "/awesome_icon.png"
theme.taglist_squares_sel = theme.icon_dir .. "/square_sel.png" theme.taglist_squares_sel = theme.icon_dir .. "/square_sel.png"
@ -71,7 +72,7 @@ theme.layout_magnifier = theme.icon_dir .. "/magnifier.
theme.layout_floating = theme.icon_dir .. "/floating.png" theme.layout_floating = theme.icon_dir .. "/floating.png"
theme.tasklist_plain_task_name = true theme.tasklist_plain_task_name = true
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.useless_gap = 4 theme.useless_gap = dpi(4)
theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png" theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png"
theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png" theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png"
theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png" theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png"
@ -104,13 +105,13 @@ local mytextclock = wibox.widget.textclock(markup("#FFFFFF", space3 .. "%H:%M
mytextclock.font = theme.font mytextclock.font = theme.font
local clock_icon = wibox.widget.imagebox(theme.clock) local clock_icon = wibox.widget.imagebox(theme.clock)
local clockbg = wibox.container.background(mytextclock, theme.bg_focus, gears.shape.rectangle) local clockbg = wibox.container.background(mytextclock, theme.bg_focus, gears.shape.rectangle)
local clockwidget = wibox.container.margin(clockbg, 0, 3, 5, 5) local clockwidget = wibox.container.margin(clockbg, dpi(0), dpi(3), dpi(5), dpi(5))
-- Calendar -- Calendar
local mytextcalendar = wibox.widget.textclock(markup.fontfg(theme.font, "#FFFFFF", space3 .. "%d %b " .. markup.font("Roboto 5", " "))) local mytextcalendar = wibox.widget.textclock(markup.fontfg(theme.font, "#FFFFFF", space3 .. "%d %b " .. markup.font("Roboto 5", " ")))
local calendar_icon = wibox.widget.imagebox(theme.calendar) local calendar_icon = wibox.widget.imagebox(theme.calendar)
local calbg = wibox.container.background(mytextcalendar, theme.bg_focus, gears.shape.rectangle) local calbg = wibox.container.background(mytextcalendar, theme.bg_focus, gears.shape.rectangle)
local calendarwidget = wibox.container.margin(calbg, 0, 0, 5, 5) local calendarwidget = wibox.container.margin(calbg, dpi(0), dpi(0), dpi(5), dpi(5))
theme.cal = lain.widget.cal({ theme.cal = lain.widget.cal({
attach_to = { mytextclock, mytextcalendar }, attach_to = { mytextclock, mytextcalendar },
notification_preset = { notification_preset = {
@ -173,7 +174,7 @@ theme.mpd = lain.widget.mpd({
end end
}) })
local musicbg = wibox.container.background(theme.mpd.widget, theme.bg_focus, gears.shape.rectangle) local musicbg = wibox.container.background(theme.mpd.widget, theme.bg_focus, gears.shape.rectangle)
local musicwidget = wibox.container.margin(musicbg, 0, 0, 5, 5) local musicwidget = wibox.container.margin(musicbg, dpi(0), dpi(0), dpi(5), dpi(5))
musicwidget:buttons(my_table.join(awful.button({ }, 1, musicwidget:buttons(my_table.join(awful.button({ }, 1,
function () awful.spawn(theme.musicplr) end))) function () awful.spawn(theme.musicplr) end)))
@ -222,17 +223,17 @@ theme.fs = lain.widget.fs({
theme.volume = lain.widget.alsabar({ theme.volume = lain.widget.alsabar({
notification_preset = { font = "Monospace 9"}, notification_preset = { font = "Monospace 9"},
--togglechannel = "IEC958,3", --togglechannel = "IEC958,3",
width = 80, height = 10, border_width = 0, width = dpi(80), height = dpi(10), border_width = dpi(0),
colors = { colors = {
background = "#383838", background = "#383838",
unmute = "#80CCE6", unmute = "#80CCE6",
mute = "#FF9F9F" mute = "#FF9F9F"
}, },
}) })
theme.volume.bar.paddings = 0 theme.volume.bar.paddings = dpi(0)
theme.volume.bar.margins = 5 theme.volume.bar.margins = dpi(5)
local volumewidget = wibox.container.background(theme.volume.bar, theme.bg_focus, gears.shape.rectangle) local volumewidget = wibox.container.background(theme.volume.bar, theme.bg_focus, gears.shape.rectangle)
volumewidget = wibox.container.margin(volumewidget, 0, 0, 5, 5) volumewidget = wibox.container.margin(volumewidget, dpi(0), dpi(0), dpi(5), dpi(5))
-- CPU -- CPU
local cpu_icon = wibox.widget.imagebox(theme.cpu) local cpu_icon = wibox.widget.imagebox(theme.cpu)
@ -243,7 +244,7 @@ local cpu = lain.widget.cpu({
end end
}) })
local cpubg = wibox.container.background(cpu.widget, theme.bg_focus, gears.shape.rectangle) local cpubg = wibox.container.background(cpu.widget, theme.bg_focus, gears.shape.rectangle)
local cpuwidget = wibox.container.margin(cpubg, 0, 0, 5, 5) local cpuwidget = wibox.container.margin(cpubg, dpi(0), dpi(0), dpi(5), dpi(5))
-- Net -- Net
local netdown_icon = wibox.widget.imagebox(theme.net_down) local netdown_icon = wibox.widget.imagebox(theme.net_down)
@ -255,7 +256,7 @@ local net = lain.widget.net({
end end
}) })
local netbg = wibox.container.background(net.widget, theme.bg_focus, gears.shape.rectangle) local netbg = wibox.container.background(net.widget, theme.bg_focus, gears.shape.rectangle)
local networkwidget = wibox.container.margin(netbg, 0, 0, 5, 5) local networkwidget = wibox.container.margin(netbg, dpi(0), dpi(0), dpi(5), dpi(5))
-- Weather -- Weather
theme.weather = lain.widget.weather({ theme.weather = lain.widget.weather({
@ -279,8 +280,8 @@ local bottom_bar = wibox.widget.imagebox(theme.bottom_bar)
local barcolor = gears.color({ local barcolor = gears.color({
type = "linear", type = "linear",
from = { 32, 0 }, from = { dpi(32), 0 },
to = { 32, 32 }, to = { dpi(32), dpi(32) },
stops = { {0, theme.bg_focus}, {0.25, "#505050"}, {1, theme.bg_focus} } stops = { {0, theme.bg_focus}, {0.25, "#505050"}, {1, theme.bg_focus} }
}) })
@ -313,13 +314,13 @@ function theme.at_screen_connect(s)
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons, { bg_focus = barcolor }) s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons, { bg_focus = barcolor })
mytaglistcont = wibox.container.background(s.mytaglist, theme.bg_focus, gears.shape.rectangle) mytaglistcont = wibox.container.background(s.mytaglist, theme.bg_focus, gears.shape.rectangle)
s.mytag = wibox.container.margin(mytaglistcont, 0, 0, 5, 5) s.mytag = wibox.container.margin(mytaglistcont, dpi(0), dpi(0), dpi(5), dpi(5))
-- Create a tasklist widget -- Create a tasklist widget
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons, { bg_focus = theme.bg_focus, shape = gears.shape.rectangle, shape_border_width = 5, shape_border_color = theme.tasklist_bg_normal, align = "center" }) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons, { bg_focus = theme.bg_focus, shape = gears.shape.rectangle, shape_border_width = 5, shape_border_color = theme.tasklist_bg_normal, align = "center" })
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 32 }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(32) })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {
@ -356,8 +357,8 @@ function theme.at_screen_connect(s)
} }
-- Create the bottom wibox -- Create the bottom wibox
s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = 0, height = 32 }) s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = dpi(0), height = dpi(32) })
s.borderwibox = awful.wibar({ position = "bottom", screen = s, height = 1, bg = theme.fg_focus, x = 0, y = 33}) s.borderwibox = awful.wibar({ position = "bottom", screen = s, height = dpi(1), bg = theme.fg_focus, x = dpi(0), y = dpi(33)})
-- Add widgets to the bottom wibox -- Add widgets to the bottom wibox
s.mybottomwibox:setup { s.mybottomwibox:setup {

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local os = os local os = os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -26,12 +27,12 @@ theme.fg_normal = "#aaaaaa"
theme.fg_focus = "#ff8c00" theme.fg_focus = "#ff8c00"
theme.fg_urgent = "#af1d18" theme.fg_urgent = "#af1d18"
theme.fg_minimize = "#ffffff" theme.fg_minimize = "#ffffff"
theme.border_width = 1 theme.border_width = dpi(1)
theme.border_normal = "#1c2022" theme.border_normal = "#1c2022"
theme.border_focus = "#606060" theme.border_focus = "#606060"
theme.border_marked = "#3ca4d8" theme.border_marked = "#3ca4d8"
theme.menu_border_width = 0 theme.menu_border_width = 0
theme.menu_width = 130 theme.menu_width = dpi(130)
theme.menu_submenu_icon = theme.confdir .. "/icons/submenu.png" theme.menu_submenu_icon = theme.confdir .. "/icons/submenu.png"
theme.menu_fg_normal = "#aaaaaa" theme.menu_fg_normal = "#aaaaaa"
theme.menu_fg_focus = "#ff8c00" theme.menu_fg_focus = "#ff8c00"
@ -282,7 +283,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 20, bg = theme.bg_normal, fg = theme.fg_normal }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(20), bg = theme.bg_normal, fg = theme.fg_normal })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {
@ -326,7 +327,7 @@ function theme.at_screen_connect(s)
} }
-- Create the bottom wibox -- Create the bottom wibox
s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = 0, height = 20, bg = theme.bg_normal, fg = theme.fg_normal }) s.mybottomwibox = awful.wibar({ position = "bottom", screen = s, border_width = 0, height = dpi(20), bg = theme.bg_normal, fg = theme.fg_normal })
-- Add widgets to the bottom wibox -- Add widgets to the bottom wibox
s.mybottomwibox:setup { s.mybottomwibox:setup {

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local os = os local os = os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -23,7 +24,7 @@ theme.fg_urgent = "#CC9393"
theme.bg_normal = "#1A1A1A" theme.bg_normal = "#1A1A1A"
theme.bg_focus = "#313131" theme.bg_focus = "#313131"
theme.bg_urgent = "#1A1A1A" theme.bg_urgent = "#1A1A1A"
theme.border_width = 1 theme.border_width = dpi(1)
theme.border_normal = "#3F3F3F" theme.border_normal = "#3F3F3F"
theme.border_focus = "#7F7F7F" theme.border_focus = "#7F7F7F"
theme.border_marked = "#CC9393" theme.border_marked = "#CC9393"
@ -31,8 +32,8 @@ theme.tasklist_bg_focus = "#1A1A1A"
theme.titlebar_bg_focus = theme.bg_focus theme.titlebar_bg_focus = theme.bg_focus
theme.titlebar_bg_normal = theme.bg_normal theme.titlebar_bg_normal = theme.bg_normal
theme.titlebar_fg_focus = theme.fg_focus theme.titlebar_fg_focus = theme.fg_focus
theme.menu_height = 16 theme.menu_height = dpi(16)
theme.menu_width = 140 theme.menu_width = dpi(140)
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
@ -67,7 +68,7 @@ theme.widget_mail = theme.dir .. "/icons/mail.png"
theme.widget_mail_on = theme.dir .. "/icons/mail_on.png" theme.widget_mail_on = theme.dir .. "/icons/mail_on.png"
theme.tasklist_plain_task_name = true theme.tasklist_plain_task_name = true
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.useless_gap = 0 theme.useless_gap = dpi(0)
theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png"
theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png"
theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png"
@ -289,7 +290,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 18, bg = theme.bg_normal, fg = theme.fg_normal }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = theme.bg_normal, fg = theme.fg_normal })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {

View File

@ -8,6 +8,7 @@
local gears = require("gears") local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local date = os.date local date = os.date
local ipairs = ipairs local ipairs = ipairs
local math = math local math = math
@ -42,8 +43,8 @@ end
local function factory(args) local function factory(args)
local args = args or {} local args = args or {}
binclock.width = args.width or 42 binclock.width = args.width or dpi(42)
binclock.height = args.height or 18 binclock.height = args.height or dpi(18)
binclock.show_seconds = args.show_seconds or false binclock.show_seconds = args.show_seconds or false
binclock.color_active = args.color_active or "#CCCCCC" binclock.color_active = args.color_active or "#CCCCCC"
binclock.color_inactive = args.color_inactive or "#444444" binclock.color_inactive = args.color_inactive or "#444444"

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local math, string, os = math, string, os local math, string, os = math, string, os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -26,7 +27,7 @@ theme.bg_urgent = "#3F3F3F"
theme.taglist_fg_focus = "#00CCFF" theme.taglist_fg_focus = "#00CCFF"
theme.tasklist_bg_focus = "#222222" theme.tasklist_bg_focus = "#222222"
theme.tasklist_fg_focus = "#00CCFF" theme.tasklist_fg_focus = "#00CCFF"
theme.border_width = 1 theme.border_width = dpi(2)
theme.border_normal = "#3F3F3F" theme.border_normal = "#3F3F3F"
theme.border_focus = "#6F6F6F" theme.border_focus = "#6F6F6F"
theme.border_marked = "#CC9393" theme.border_marked = "#CC9393"
@ -35,8 +36,8 @@ theme.titlebar_bg_normal = "#3F3F3F"
theme.titlebar_bg_focus = theme.bg_focus theme.titlebar_bg_focus = theme.bg_focus
theme.titlebar_bg_normal = theme.bg_normal theme.titlebar_bg_normal = theme.bg_normal
theme.titlebar_fg_focus = theme.fg_focus theme.titlebar_fg_focus = theme.fg_focus
theme.menu_height = 16 theme.menu_height = dpi(16)
theme.menu_width = 140 theme.menu_width = dpi(140)
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
theme.awesome_icon = theme.dir .. "/icons/awesome.png" theme.awesome_icon = theme.dir .. "/icons/awesome.png"
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
@ -102,7 +103,7 @@ local separators = lain.util.separators
-- Binary clock -- Binary clock
local binclock = require("themes.powerarrow.binclock"){ local binclock = require("themes.powerarrow.binclock"){
height = 16, height = dpi(32),
show_seconds = true, show_seconds = true,
color_active = theme.fg_normal, color_active = theme.fg_normal,
color_inactive = theme.bg_focus color_inactive = theme.bg_focus
@ -304,7 +305,7 @@ function theme.powerline_rl(cr, width, height)
end end
local function pl(widget, bgcolor, padding) local function pl(widget, bgcolor, padding)
return wibox.container.background(wibox.container.margin(widget, 16, 16), bgcolor, theme.powerline_rl) return wibox.container.background(wibox.container.margin(widget, dpi(16), dpi(16)), bgcolor, theme.powerline_rl)
end end
function theme.at_screen_connect(s) function theme.at_screen_connect(s)
@ -339,7 +340,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 16, bg = theme.bg_normal, fg = theme.fg_normal }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(16), bg = theme.bg_normal, fg = theme.fg_normal })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {
@ -355,7 +356,7 @@ function theme.at_screen_connect(s)
{ -- Right widgets { -- Right widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
wibox.widget.systray(), wibox.widget.systray(),
wibox.container.margin(scissors, 4, 8), wibox.container.margin(scissors, dpi(4), dpi(8)),
--[[ using shapes --[[ using shapes
pl(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, "#343434"), pl(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, "#343434"),
pl(task, "#343434"), pl(task, "#343434"),
@ -370,25 +371,25 @@ function theme.at_screen_connect(s)
--]] --]]
-- using separators -- using separators
arrow(theme.bg_normal, "#343434"), arrow(theme.bg_normal, "#343434"),
wibox.container.background(wibox.container.margin(wibox.widget { mailicon, theme.mail and theme.mail.widget, layout = wibox.layout.align.horizontal }, 4, 7), "#343434"), wibox.container.background(wibox.container.margin(wibox.widget { mailicon, theme.mail and theme.mail.widget, layout = wibox.layout.align.horizontal }, dpi(4), dpi(7)), "#343434"),
arrow("#343434", theme.bg_normal), arrow("#343434", theme.bg_normal),
wibox.container.background(wibox.container.margin(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, 3, 6), theme.bg_focus), wibox.container.background(wibox.container.margin(wibox.widget { mpdicon, theme.mpd.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(6)), theme.bg_focus),
arrow(theme.bg_normal, "#343434"), arrow(theme.bg_normal, "#343434"),
wibox.container.background(wibox.container.margin(task, 3, 7), "#343434"), wibox.container.background(wibox.container.margin(task, dpi(3), dpi(7)), "#343434"),
arrow("#343434", "#777E76"), arrow("#343434", "#777E76"),
wibox.container.background(wibox.container.margin(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, 2, 3), "#777E76"), wibox.container.background(wibox.container.margin(wibox.widget { memicon, mem.widget, layout = wibox.layout.align.horizontal }, dpi(2), dpi(3)), "#777E76"),
arrow("#777E76", "#4B696D"), arrow("#777E76", "#4B696D"),
wibox.container.background(wibox.container.margin(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, 3, 4), "#4B696D"), wibox.container.background(wibox.container.margin(wibox.widget { cpuicon, cpu.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(4)), "#4B696D"),
arrow("#4B696D", "#4B3B51"), arrow("#4B696D", "#4B3B51"),
wibox.container.background(wibox.container.margin(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, 4, 4), "#4B3B51"), wibox.container.background(wibox.container.margin(wibox.widget { tempicon, temp.widget, layout = wibox.layout.align.horizontal }, dpi(4), dpi(4)), "#4B3B51"),
arrow("#4B3B51", "#CB755B"), arrow("#4B3B51", "#CB755B"),
wibox.container.background(wibox.container.margin(wibox.widget { fsicon, theme.fs and theme.fs.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#CB755B"), wibox.container.background(wibox.container.margin(wibox.widget { fsicon, theme.fs and theme.fs.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#CB755B"),
arrow("#CB755B", "#8DAA9A"), arrow("#CB755B", "#8DAA9A"),
wibox.container.background(wibox.container.margin(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#8DAA9A"), wibox.container.background(wibox.container.margin(wibox.widget { baticon, bat.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#8DAA9A"),
arrow("#8DAA9A", "#C0C0A2"), arrow("#8DAA9A", "#C0C0A2"),
wibox.container.background(wibox.container.margin(wibox.widget { nil, neticon, net.widget, layout = wibox.layout.align.horizontal }, 3, 3), "#C0C0A2"), wibox.container.background(wibox.container.margin(wibox.widget { nil, neticon, net.widget, layout = wibox.layout.align.horizontal }, dpi(3), dpi(3)), "#C0C0A2"),
arrow("#C0C0A2", "#777E76"), arrow("#C0C0A2", "#777E76"),
wibox.container.background(wibox.container.margin(binclock.widget, 4, 8), "#777E76"), wibox.container.background(wibox.container.margin(binclock.widget, dpi(4), dpi(8)), "#777E76"),
arrow("#777E76", "alpha"), arrow("#777E76", "alpha"),
--]] --]]
s.mylayoutbox, s.mylayoutbox,

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local os = os local os = os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -24,13 +25,13 @@ theme.bg_normal = "#242424"
theme.bg_focus = "#242424" theme.bg_focus = "#242424"
theme.fg_urgent = "#000000" theme.fg_urgent = "#000000"
theme.bg_urgent = "#FFFFFF" theme.bg_urgent = "#FFFFFF"
theme.border_width = 1 theme.border_width = dpi(1)
theme.border_normal = "#242424" theme.border_normal = "#242424"
theme.border_focus = "#EBEBFF" theme.border_focus = "#EBEBFF"
theme.taglist_fg_focus = "#EDEFFF" theme.taglist_fg_focus = "#EDEFFF"
theme.taglist_bg_focus = "#242424" theme.taglist_bg_focus = "#242424"
theme.menu_height = 16 theme.menu_height = dpi(16)
theme.menu_width = 140 theme.menu_width = dpi(140)
theme.ocol = "<span color='" .. theme.fg_normal .. "'>" theme.ocol = "<span color='" .. theme.fg_normal .. "'>"
theme.tasklist_sticky = theme.ocol .. "[S]</span>" theme.tasklist_sticky = theme.ocol .. "[S]</span>"
theme.tasklist_ontop = theme.ocol .. "[T]</span>" theme.tasklist_ontop = theme.ocol .. "[T]</span>"
@ -42,7 +43,7 @@ theme.awesome_icon = theme.dir .."/icons/awesome.pn
theme.menu_submenu_icon = theme.dir .."/icons/submenu.png" theme.menu_submenu_icon = theme.dir .."/icons/submenu.png"
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
theme.useless_gap = 8 theme.useless_gap = dpi(8)
theme.layout_txt_tile = "[t]" theme.layout_txt_tile = "[t]"
theme.layout_txt_tileleft = "[l]" theme.layout_txt_tileleft = "[l]"
theme.layout_txt_tilebottom = "[b]" theme.layout_txt_tilebottom = "[b]"
@ -163,7 +164,7 @@ theme.fs = lain.widget.fs({
-- ALSA volume bar -- ALSA volume bar
theme.volume = lain.widget.alsabar({ theme.volume = lain.widget.alsabar({
ticks = true, width = 67, ticks = true, width = dpi(67),
notification_preset = { font = theme.font } notification_preset = { font = theme.font }
}) })
theme.volume.tooltip.wibox.fg = theme.fg_focus theme.volume.tooltip.wibox.fg = theme.fg_focus
@ -190,7 +191,7 @@ theme.volume.bar:buttons(my_table.join (
end) end)
)) ))
local volumebg = wibox.container.background(theme.volume.bar, "#585858", gears.shape.rectangle) local volumebg = wibox.container.background(theme.volume.bar, "#585858", gears.shape.rectangle)
local volumewidget = wibox.container.margin(volumebg, 7, 7, 5, 5) local volumewidget = wibox.container.margin(volumebg, dpi(7), dpi(7), dpi(5), dpi(5))
-- Weather -- Weather
theme.weather = lain.widget.weather({ theme.weather = lain.widget.weather({
@ -243,7 +244,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 18, bg = theme.bg_normal, fg = theme.fg_normal }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = theme.bg_normal, fg = theme.fg_normal })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local os = os local os = os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -24,7 +25,7 @@ theme.fg_urgent = "#CC9393"
theme.bg_normal = "#140c0b" theme.bg_normal = "#140c0b"
theme.bg_focus = "#140c0b" theme.bg_focus = "#140c0b"
theme.bg_urgent = "#2a1f1e" theme.bg_urgent = "#2a1f1e"
theme.border_width = 1 theme.border_width = dpi(1)
theme.border_normal = "#302627" theme.border_normal = "#302627"
theme.border_focus = "#c2745b" theme.border_focus = "#c2745b"
theme.border_marked = "#CC9393" theme.border_marked = "#CC9393"
@ -33,8 +34,8 @@ theme.tasklist_bg_focus = "#140c0b"
theme.tasklist_fg_focus = "#d88166" theme.tasklist_fg_focus = "#d88166"
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
theme.menu_height = 16 theme.menu_height = dpi(16)
theme.menu_width = 140 theme.menu_width = dpi(140)
theme.awesome_icon = theme.dir .."/icons/awesome.png" theme.awesome_icon = theme.dir .."/icons/awesome.png"
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
theme.layout_txt_tile = "[t]" theme.layout_txt_tile = "[t]"
@ -51,7 +52,7 @@ theme.layout_txt_magnifier = "[M]"
theme.layout_txt_floating = "[|]" theme.layout_txt_floating = "[|]"
theme.tasklist_plain_task_name = true theme.tasklist_plain_task_name = true
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.useless_gap = 0 theme.useless_gap = dpi(0)
theme.titlebar_close_button_normal = theme.zenburn_dir.."/titlebar/close_normal.png" theme.titlebar_close_button_normal = theme.zenburn_dir.."/titlebar/close_normal.png"
theme.titlebar_close_button_focus = theme.zenburn_dir.."/titlebar/close_focus.png" theme.titlebar_close_button_focus = theme.zenburn_dir.."/titlebar/close_focus.png"
theme.titlebar_minimize_button_normal = theme.zenburn_dir.."/titlebar/minimize_normal.png" theme.titlebar_minimize_button_normal = theme.zenburn_dir.."/titlebar/minimize_normal.png"
@ -239,7 +240,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons)
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 18 }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18) })
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {

View File

@ -9,6 +9,7 @@ local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox") local wibox = require("wibox")
local dpi = require("beautiful.xresources").apply_dpi
local math, string, tag, tonumber, type, os = math, string, tag, tonumber, type, os local math, string, tag, tonumber, type, os = math, string, tag, tonumber, type, os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -26,16 +27,16 @@ theme.bg_focus2 = "#3762B8"
theme.bg_normal = "#242424" theme.bg_normal = "#242424"
theme.fg_urgent = "#CC9393" theme.fg_urgent = "#CC9393"
theme.bg_urgent = "#006B8E" theme.bg_urgent = "#006B8E"
theme.border_width = 4 theme.border_width = dpi(4)
theme.border_normal = "#252525" theme.border_normal = "#252525"
theme.border_focus = "#7CA2EE" theme.border_focus = "#7CA2EE"
theme.tooltip_border_color = theme.fg_focus theme.tooltip_border_color = theme.fg_focus
theme.tooltip_border_width = theme.border_width theme.tooltip_border_width = theme.border_width
theme.menu_height = 24 theme.menu_height = dpi(24)
theme.menu_width = 140 theme.menu_width = dpi(140)
theme.awesome_icon = theme.icon_dir .. "/awesome.png" theme.awesome_icon = theme.icon_dir .. "/awesome.png"
theme.taglist_squares_sel = gears.surface.load_from_shape(3, 30, gears.shape.rectangle, theme.fg_focus) theme.taglist_squares_sel = gears.surface.load_from_shape(dpi(3), dpi(30), gears.shape.rectangle, theme.fg_focus)
theme.taglist_squares_unsel = gears.surface.load_from_shape(3, 30, gears.shape.rectangle, theme.bg_focus2) theme.taglist_squares_unsel = gears.surface.load_from_shape(dpi(3), dpi(30), gears.shape.rectangle, theme.bg_focus2)
theme.panelbg = theme.icon_dir .. "/panel.png" theme.panelbg = theme.icon_dir .. "/panel.png"
theme.bat000charging = theme.icon_dir .. "/bat-000-charging.png" theme.bat000charging = theme.icon_dir .. "/bat-000-charging.png"
theme.bat000 = theme.icon_dir .. "/bat-000.png" theme.bat000 = theme.icon_dir .. "/bat-000.png"
@ -82,7 +83,7 @@ theme.layout_cornersw = theme.default_dir.."/layouts/c
theme.layout_cornerse = theme.default_dir.."/layouts/cornersew.png" theme.layout_cornerse = theme.default_dir.."/layouts/cornersew.png"
theme.tasklist_plain_task_name = true theme.tasklist_plain_task_name = true
theme.tasklist_disable_icon = true theme.tasklist_disable_icon = true
theme.useless_gap = 10 theme.useless_gap = dpi(10)
theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png" theme.titlebar_close_button_normal = theme.default_dir.."/titlebar/close_normal.png"
theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png" theme.titlebar_close_button_focus = theme.default_dir.."/titlebar/close_focus.png"
theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png" theme.titlebar_minimize_button_normal = theme.default_dir.."/titlebar/minimize_normal.png"
@ -127,14 +128,14 @@ theme.cal = lain.widget.cal({
local baticon = wibox.widget.imagebox(theme.bat000) local baticon = wibox.widget.imagebox(theme.bat000)
local battooltip = awful.tooltip({ local battooltip = awful.tooltip({
objects = { baticon }, objects = { baticon },
margin_leftright = 15, margin_leftright = dpi(15),
margin_topbottom = 12 margin_topbottom = dpi(12)
}) })
battooltip.wibox.fg = theme.fg_normal battooltip.wibox.fg = theme.fg_normal
battooltip.textbox.font = theme.font battooltip.textbox.font = theme.font
battooltip.timeout = 0 battooltip.timeout = 0
battooltip:set_shape(function(cr, width, height) battooltip:set_shape(function(cr, width, height)
gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 35) gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - dpi(35))
end) end)
local bat = lain.widget.bat({ local bat = lain.widget.bat({
settings = function() settings = function()
@ -233,14 +234,14 @@ volicon:buttons(my_table.join (
local wificon = wibox.widget.imagebox(theme.wifidisc) local wificon = wibox.widget.imagebox(theme.wifidisc)
local wifitooltip = awful.tooltip({ local wifitooltip = awful.tooltip({
objects = { wificon }, objects = { wificon },
margin_leftright = 15, margin_leftright = dpi(15),
margin_topbottom = 15 margin_topbottom = dpi(15)
}) })
wifitooltip.wibox.fg = theme.fg_normal wifitooltip.wibox.fg = theme.fg_normal
wifitooltip.textbox.font = theme.font wifitooltip.textbox.font = theme.font
wifitooltip.timeout = 0 wifitooltip.timeout = 0
wifitooltip:set_shape(function(cr, width, height) wifitooltip:set_shape(function(cr, width, height)
gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - 120) gears.shape.infobubble(cr, width, height, corner_radius, arrow_size, width - dpi(120))
end) end)
local mywifisig = awful.widget.watch( local mywifisig = awful.widget.watch(
{ awful.util.shell, "-c", "awk 'NR==3 {printf(\"%d-%.0f\\n\",$2, $3*10/7)}' /proc/net/wireless; iw dev wlan0 link" }, { awful.util.shell, "-c", "awk 'NR==3 {printf(\"%d-%.0f\\n\",$2, $3*10/7)}' /proc/net/wireless; iw dev wlan0 link" },
@ -292,30 +293,30 @@ local rspace0 = wibox.widget.textbox()
local rspace2 = wibox.widget.textbox() local rspace2 = wibox.widget.textbox()
local rspace3 = wibox.widget.textbox() local rspace3 = wibox.widget.textbox()
local tspace1 = wibox.widget.textbox() local tspace1 = wibox.widget.textbox()
tspace1.forced_width = 18 tspace1.forced_width = dpi(18)
rspace1.forced_width = 16 rspace1.forced_width = dpi(16)
rspace0.forced_width = 18 rspace0.forced_width = dpi(18)
rspace2.forced_width = 19 rspace2.forced_width = dpi(19)
rspace3.forced_width = 21 rspace3.forced_width = dpi(21)
local lspace1 = wibox.widget.textbox() local lspace1 = wibox.widget.textbox()
local lspace2 = wibox.widget.textbox() local lspace2 = wibox.widget.textbox()
local lspace3 = wibox.widget.textbox() local lspace3 = wibox.widget.textbox()
lspace1.forced_height = 18 lspace1.forced_height = dpi(18)
lspace2.forced_height = 10 lspace2.forced_height = dpi(10)
lspace3.forced_height = 16 lspace3.forced_height = dpi(16)
local barcolor = gears.color({ local barcolor = gears.color({
type = "linear", type = "linear",
from = { 0, 46 }, from = { 0, dpi(46) },
to = { 46, 46 }, to = { dpi(46), dpi(46) },
stops = { {0, theme.bg_focus}, {0.9, theme.bg_focus2} } stops = { {0, theme.bg_focus}, {0.9, theme.bg_focus2} }
}) })
local barcolor2 = gears.color({ local barcolor2 = gears.color({
type = "linear", type = "linear",
from = { 0, 46 }, from = { 0, dpi(46) },
to = { 46, 46 }, to = { dpi(46), dpi(46) },
stops = { {0, "#323232"}, {1, theme.bg_normal} } stops = { {0, "#323232"}, {1, theme.bg_normal} }
}) })
@ -327,7 +328,7 @@ function theme.vertical_wibox(s)
-- Create the vertical wibox -- Create the vertical wibox
s.dockheight = (35 * s.workarea.height)/100 s.dockheight = (35 * s.workarea.height)/100
s.myleftwibox = wibox({ screen = s, x=0, y=s.workarea.height/2 - s.dockheight/2, width = 6, height = s.dockheight, fg = theme.fg_normal, bg = barcolor2, ontop = true, visible = true, type = "dock" }) s.myleftwibox = wibox({ screen = s, x=0, y=s.workarea.height/2 - s.dockheight/2, width = dpi(6), height = s.dockheight, fg = theme.fg_normal, bg = barcolor2, ontop = true, visible = true, type = "dock" })
if s.index > 1 and s.myleftwibox.y == 0 then if s.index > 1 and s.myleftwibox.y == 0 then
s.myleftwibox.y = screen[1].myleftwibox.y s.myleftwibox.y = screen[1].myleftwibox.y
@ -342,7 +343,7 @@ function theme.vertical_wibox(s)
s.mytaglist, s.mytaglist,
lspace2, lspace2,
s.layoutb, s.layoutb,
wibox.container.margin(mylauncher, 5, 8, 13, 0), wibox.container.margin(mylauncher, dpi(5), dpi(8), dpi(13), dpi(0)),
}, },
} }
@ -350,7 +351,7 @@ function theme.vertical_wibox(s)
s.docktimer = gears.timer{ timeout = 2 } s.docktimer = gears.timer{ timeout = 2 }
s.docktimer:connect_signal("timeout", function() s.docktimer:connect_signal("timeout", function()
local s = awful.screen.focused() local s = awful.screen.focused()
s.myleftwibox.width = 9 s.myleftwibox.width = dpi(9)
s.layoutb.visible = false s.layoutb.visible = false
mylauncher.visible = false mylauncher.visible = false
if s.docktimer.started then if s.docktimer.started then
@ -359,7 +360,7 @@ function theme.vertical_wibox(s)
end) end)
tag.connect_signal("property::selected", function(t) tag.connect_signal("property::selected", function(t)
local s = t.screen or awful.screen.focused() local s = t.screen or awful.screen.focused()
s.myleftwibox.width = 38 s.myleftwibox.width = dpi(38)
s.layoutb.visible = true s.layoutb.visible = true
mylauncher.visible = true mylauncher.visible = true
gears.surface.apply_shape_bounding(s.myleftwibox, dockshape) gears.surface.apply_shape_bounding(s.myleftwibox, dockshape)
@ -370,14 +371,14 @@ function theme.vertical_wibox(s)
s.myleftwibox:connect_signal("mouse::leave", function() s.myleftwibox:connect_signal("mouse::leave", function()
local s = awful.screen.focused() local s = awful.screen.focused()
s.myleftwibox.width = 9 s.myleftwibox.width = dpi(9)
s.layoutb.visible = false s.layoutb.visible = false
mylauncher.visible = false mylauncher.visible = false
end) end)
s.myleftwibox:connect_signal("mouse::enter", function() s.myleftwibox:connect_signal("mouse::enter", function()
local s = awful.screen.focused() local s = awful.screen.focused()
s.myleftwibox.width = 38 s.myleftwibox.width = dpi(38)
s.layoutb.visible = true s.layoutb.visible = true
mylauncher.visible = true mylauncher.visible = true
gears.surface.apply_shape_bounding(s.myleftwibox, dockshape) gears.surface.apply_shape_bounding(s.myleftwibox, dockshape)
@ -412,13 +413,13 @@ function theme.at_screen_connect(s)
awful.button({}, 3, function () awful.layout.inc(-1) end), awful.button({}, 3, function () awful.layout.inc(-1) end),
awful.button({}, 4, function () awful.layout.inc( 1) end), awful.button({}, 4, function () awful.layout.inc( 1) end),
awful.button({}, 5, function () awful.layout.inc(-1) end))) awful.button({}, 5, function () awful.layout.inc(-1) end)))
s.layoutb = wibox.container.margin(s.mylayoutbox, 8, 11, 3, 3) s.layoutb = wibox.container.margin(s.mylayoutbox, dpi(8), dpi(11), dpi(3), dpi(3))
-- Create a taglist widget -- Create a taglist widget
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons, { s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons, {
font = theme.taglist_font, font = theme.taglist_font,
shape = gears.shape.rectangle, shape = gears.shape.rectangle,
spacing = 10, spacing = dpi(10),
square_unsel = theme.square_unsel, square_unsel = theme.square_unsel,
bg_focus = barcolor bg_focus = barcolor
}, nil, wibox.layout.fixed.vertical()) }, nil, wibox.layout.fixed.vertical())
@ -427,7 +428,7 @@ function theme.at_screen_connect(s)
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.focused, awful.util.tasklist_buttons, { bg_focus = "#00000000" }) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.focused, awful.util.tasklist_buttons, { bg_focus = "#00000000" })
-- Create the wibox -- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s, height = 25, bg = gears.color.create_png_pattern(theme.panelbg) }) s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(25), bg = gears.color.create_png_pattern(theme.panelbg) })
local wiboxlayout = wibox.layout.align.horizontal() local wiboxlayout = wibox.layout.align.horizontal()
wiboxlayout.expand = "none" wiboxlayout.expand = "none"