mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 19:22:32 +00:00
made dockheight screen based
This commit is contained in:
parent
9a041052b5
commit
ce53375917
2
lain
2
lain
|
@ -1 +1 @@
|
||||||
Subproject commit 83ad59e0e7df53d257f1d70d0fe623a3e3b5596b
|
Subproject commit 0dc66396376f4c96ec538415cca961015a045d98
|
|
@ -316,6 +316,10 @@ local barcolor2 = gears.color({
|
||||||
stops = { {0, "#323232"}, {1, theme.bg_normal} }
|
stops = { {0, "#323232"}, {1, theme.bg_normal} }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local dockshape = function(cr, width, height)
|
||||||
|
gears.shape.partially_rounded_rect(cr, width, height, false, true, true, false, 6)
|
||||||
|
end
|
||||||
|
|
||||||
function theme.at_screen_connect(s)
|
function theme.at_screen_connect(s)
|
||||||
-- Quake application
|
-- Quake application
|
||||||
s.quake = lain.util.quake({ app = awful.util.terminal, border = theme.border_width })
|
s.quake = lain.util.quake({ app = awful.util.terminal, border = theme.border_width })
|
||||||
|
@ -390,12 +394,13 @@ function theme.at_screen_connect(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Create the vertical wibox
|
-- Create the vertical wibox
|
||||||
local dockheight = (40 * s.workarea.height)/100
|
s.dockheight = (40 * s.workarea.height)/100
|
||||||
local dockshape = function(cr, width, height)
|
|
||||||
gears.shape.partially_rounded_rect(cr, width, height, false, true, true, false, 6)
|
|
||||||
end
|
|
||||||
|
|
||||||
s.myleftwibox = wibox({ screen = s, x=0, y=s.workarea.height/2 - dockheight/2, width = 6, height = 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 = 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
|
||||||
|
s.myleftwibox.y = screen[1].myleftwibox.y
|
||||||
|
end
|
||||||
|
|
||||||
-- Add widgets to the vertical wibox
|
-- Add widgets to the vertical wibox
|
||||||
s.myleftwibox:setup {
|
s.myleftwibox:setup {
|
||||||
|
@ -413,12 +418,14 @@ function theme.at_screen_connect(s)
|
||||||
-- Add toggling functionalities
|
-- Add toggling functionalities
|
||||||
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()
|
||||||
s.myleftwibox.width = 6
|
s.myleftwibox.width = 6
|
||||||
s.layoutb.visible = false
|
s.layoutb.visible = false
|
||||||
mylauncher.visible = false
|
mylauncher.visible = false
|
||||||
s.docktimer:stop()
|
s.docktimer:stop()
|
||||||
end)
|
end)
|
||||||
tag.connect_signal("property::selected", function(t)
|
tag.connect_signal("property::selected", function(t)
|
||||||
|
local s = t.screen or awful.screen.focused()
|
||||||
s.myleftwibox.width = 46
|
s.myleftwibox.width = 46
|
||||||
s.layoutb.visible = true
|
s.layoutb.visible = true
|
||||||
mylauncher.visible = true
|
mylauncher.visible = true
|
||||||
|
@ -429,12 +436,14 @@ function theme.at_screen_connect(s)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
s.myleftwibox:connect_signal("mouse::leave", function()
|
s.myleftwibox:connect_signal("mouse::leave", function()
|
||||||
|
local s = awful.screen.focused()
|
||||||
s.myleftwibox.width = 6
|
s.myleftwibox.width = 6
|
||||||
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()
|
||||||
s.myleftwibox.width = 46
|
s.myleftwibox.width = 46
|
||||||
s.layoutb.visible = true
|
s.layoutb.visible = true
|
||||||
mylauncher.visible = true
|
mylauncher.visible = true
|
||||||
|
|
Loading…
Reference in a new issue