8 changed files with 114 additions and 42 deletions
Binary file not shown.
@ -0,0 +1,25 @@ |
|||||||
|
local awful = require('awful') |
||||||
|
local wibox = require('wibox') |
||||||
|
local gears = require('gears') |
||||||
|
local timer = require("gears.timer") |
||||||
|
local beautiful = require('beautiful') |
||||||
|
local dpi = beautiful.xresources.apply_dpi |
||||||
|
|
||||||
|
screen.connect_signal("appdrawer::open", function(s) |
||||||
|
|
||||||
|
local drawer = wibox({ |
||||||
|
position = "left", |
||||||
|
ontop = true, |
||||||
|
stretch = false, |
||||||
|
width = dpi(64), |
||||||
|
height = s.workarea.height, |
||||||
|
visible = true, |
||||||
|
y = 48 |
||||||
|
}) |
||||||
|
|
||||||
|
drawer:setup { |
||||||
|
expand = "none", |
||||||
|
layout = wibox.layout.align.vertical, |
||||||
|
} |
||||||
|
|
||||||
|
end) |
||||||
@ -1,33 +1,91 @@ |
|||||||
local awful = require('awful') |
local awful = require('awful') |
||||||
local wibox = require('wibox') |
local wibox = require('wibox') |
||||||
|
local gears = require('gears') |
||||||
local timer = require("gears.timer") |
local timer = require("gears.timer") |
||||||
local beautiful = require('beautiful') |
local beautiful = require('beautiful') |
||||||
local dpi = beautiful.xresources.apply_dpi |
local dpi = beautiful.xresources.apply_dpi |
||||||
|
|
||||||
screen.connect_signal("request::desktop_decoration", function(s) |
screen.connect_signal("request::desktop_decoration", function(s) |
||||||
local dock = awful.wibox({ |
|
||||||
x = s.workarea.width, |
local dock = wibox({ |
||||||
y = 0, |
position = "left", |
||||||
ontop = true, |
ontop = true, |
||||||
stretch = false, |
stretch = false, |
||||||
width = dpi(64), |
width = dpi(64), |
||||||
height = s.workarea.height, |
height = s.workarea.height, |
||||||
visible = false |
visible = false, |
||||||
}) |
y = 48 |
||||||
local dock_trigger = awful.wibox({ |
}) |
||||||
|
s.mytasklist = awful.widget.tasklist { |
||||||
|
screen = s, |
||||||
|
filter = awful.widget.tasklist.filter.allscreen, |
||||||
|
buttons = { |
||||||
|
awful.button({ }, 1, function (c) |
||||||
|
c:activate { context = "tasklist", action = "toggle_minimization" } |
||||||
|
local t = c.first_tag |
||||||
|
t:view_only() |
||||||
|
end), |
||||||
|
awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end), |
||||||
|
awful.button({ }, 4, function() awful.client.focus.byidx( 1) end), |
||||||
|
awful.button({ }, 5, function() awful.client.focus.byidx(-1) end), |
||||||
|
}, |
||||||
|
layout = { |
||||||
|
layout = wibox.layout.fixed.vertical |
||||||
|
}, |
||||||
|
widget_template = { |
||||||
|
{ |
||||||
|
wibox.widget.base.make_widget(), |
||||||
|
forced_height = 5, |
||||||
|
id = 'background_role', |
||||||
|
widget = wibox.container.background, |
||||||
|
}, |
||||||
|
{ |
||||||
|
{ |
||||||
|
id = 'clienticon', |
||||||
|
widget = awful.widget.clienticon, |
||||||
|
}, |
||||||
|
margins = 10, |
||||||
|
widget = wibox.container.margin |
||||||
|
}, |
||||||
|
nil, |
||||||
|
create_callback = function(self, c, index, objects) |
||||||
|
self:get_children_by_id('clienticon')[1].client = c |
||||||
|
local tooltip = awful.tooltip({ |
||||||
|
objects = { self }, |
||||||
|
timer_function = function() |
||||||
|
return c.name |
||||||
|
end, |
||||||
|
}) |
||||||
|
|
||||||
|
-- Then you can set tooltip props if required (should work as is) |
||||||
|
tooltip.align = "left" |
||||||
|
tooltip.mode = "outside" |
||||||
|
tooltip.preferred_positions = {"left"} |
||||||
|
tooltip.preferred_alignments = {"middle"} |
||||||
|
end, |
||||||
|
layout = wibox.layout.align.vertical, |
||||||
|
}, |
||||||
|
} |
||||||
|
|
||||||
|
dock:setup { |
||||||
|
expand = "none", |
||||||
|
layout = wibox.layout.align.vertical, |
||||||
|
s.mytasklist, |
||||||
|
} |
||||||
|
local dock_trigger = awful.wibox({ |
||||||
position = "left", |
position = "left", |
||||||
width = 1, |
width = 1, |
||||||
bg = "#00000000", |
bg = "#00000000", |
||||||
opacity = 0, |
opacity = 0, |
||||||
ontop = true, |
ontop = true, |
||||||
visible = true |
visible = true |
||||||
}) |
}) |
||||||
local dock_hide_timer = timer({ timeout = 1}) |
|
||||||
|
local dock_hide_timer = timer({ timeout = 1}) |
||||||
dock_trigger:geometry({ width = 5, height = s.workarea.height }) |
|
||||||
dock_hide_timer:connect_signal("timeout", function() dock.visible = false; dock_hide_timer:stop() end ) |
dock_trigger:geometry({ width = 5, height = s.workarea.height }) |
||||||
|
dock_hide_timer:connect_signal("timeout", function() dock.visible = false; dock_hide_timer:stop() end ) |
||||||
dock_trigger:connect_signal("mouse::enter", function() dock.visible = true end) |
dock_trigger:connect_signal("mouse::enter", function() dock.visible = true end) |
||||||
dock:connect_signal("mouse::enter", function() if dock_hide_timer.started then dock_hide_timer:stop() end end) |
dock:connect_signal("mouse::enter", function() if dock_hide_timer.started then dock_hide_timer:stop() end end) |
||||||
dock:connect_signal("mouse::leave", function() dock_hide_timer:again() end) |
dock:connect_signal("mouse::leave", function() dock_hide_timer:again() end) |
||||||
end) |
end) |
||||||
|
|||||||
Loading…
Reference in new issue