Highlight the client border when hovering in mod4+tab
This commit is contained in:
parent
f4e5f84c58
commit
7e4b6ef81e
|
@ -87,6 +87,11 @@ local function reload_highlight(i)
|
|||
hl[#hl+1] = v
|
||||
end
|
||||
tag_list.highlight(hl)
|
||||
|
||||
i._internal.border_color_back = i.client.border_color
|
||||
i.client.border_color = beautiful.bg_urgent
|
||||
elseif i._internal.border_color_back then
|
||||
i.client.border_color = i._internal.border_color_back
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -99,7 +104,7 @@ local function new(args)
|
|||
local t,auto_release = tag.selected(capi.client.focus and capi.client.focus.screen or capi.mouse.screen),args.auto_release
|
||||
local currentMenu = radical.box({filter = true, show_filter=not auto_release, autodiscard = true,
|
||||
disable_markup=true,fkeys_prefix=not auto_release,width=(((capi.screen[capi.client.focus and capi.client.focus.screen or capi.mouse.screen]).geometry.width)/2),
|
||||
icon_transformation = beautiful.alttab_icon_transformation,filter_underlay="Use [Shift] to toggle clients",filter_underlay_color=beautiful.menu_bg_normal,
|
||||
icon_transformation = beautiful.alttab_icon_transformation,filter_underlay="Use [Shift] and [Control] to toggle clients",filter_underlay_color=beautiful.menu_bg_normal,
|
||||
filter_placeholder="<span fgcolor='".. (beautiful.menu_fg_disabled or beautiful.fg_disabled or "#777777") .."'>Type to filter</span>"})
|
||||
|
||||
if not auto_release then
|
||||
|
@ -137,6 +142,15 @@ local function new(args)
|
|||
end
|
||||
return true
|
||||
end)
|
||||
currentMenu:add_key_hook({}, "Control_L", "press", function()
|
||||
currentMenu._current_item.checked = not currentMenu._current_item.checked
|
||||
client2.movetotag(t, currentMenu._current_item.client)
|
||||
reload_underlay(currentMenu._current_item.client,currentMenu._current_item)
|
||||
if not auto_release then
|
||||
reload_highlight(currentMenu._current_item)
|
||||
end
|
||||
return true
|
||||
end)
|
||||
|
||||
|
||||
if module.titlebar_path then
|
||||
|
@ -197,6 +211,9 @@ local function new(args)
|
|||
if not auto_release then
|
||||
tag_list.highlight()
|
||||
end
|
||||
if currentMenu._current_item and currentMenu._current_item._internal.border_color_back then
|
||||
currentMenu._current_item.client.border_color = currentMenu._current_item._internal.border_color_back
|
||||
end
|
||||
end
|
||||
end)
|
||||
return currentMenu
|
||||
|
|
|
@ -4,7 +4,7 @@ local awful = require( "awful" )
|
|||
local module = {}
|
||||
|
||||
local function createTagList(aScreen)
|
||||
local tagList = radical.context({autodiscard = true})
|
||||
local tagList = radical.context {}
|
||||
for _, v in ipairs(awful.tag.gettags(aScreen)) do
|
||||
tagList:add_item({text = v.name,icon=awful.tag.geticon(v)})
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ local function createTagList(aScreen,args)
|
|||
if not tag_list then
|
||||
tag_list = require("radical.impl.taglist")
|
||||
end
|
||||
local tagList = radical.context({autodiscard = true})
|
||||
local tagList = radical.context {}
|
||||
for _, v in ipairs(awful.tag.gettags(aScreen)) do
|
||||
args.text,args.icon = v.name,awful.tag.geticon(v)
|
||||
local i = tagList:add_item(args)
|
||||
|
@ -47,7 +47,7 @@ function module.listTags(args)
|
|||
if capi.screen.count() == 1 then
|
||||
return createTagList(1,args or {})
|
||||
else
|
||||
local screenSelect = radical.context(({autodiscard = true}))
|
||||
local screenSelect = radical.context {}
|
||||
for i=1, capi.screen.count() do
|
||||
screenSelect:add_item({text="Screen "..i , sub_menu = createTagList(i,args or {})})
|
||||
end
|
||||
|
@ -57,7 +57,7 @@ end
|
|||
|
||||
function module.layouts(menu,layouts)
|
||||
local cur = awful.layout.get(awful.tag.getscreen(awful.tag.selected(capi.client.focus and capi.client.focus.screen)))
|
||||
local screenSelect = menu or radical.context(({autodiscard = true}))
|
||||
local screenSelect = menu or radical.context {}
|
||||
local layouts = layouts or fallback_layouts
|
||||
for i, layout_real in ipairs(layouts) do
|
||||
local layout2 = awful.layout.getname(layout_real)
|
||||
|
|
|
@ -94,9 +94,9 @@ local function new(screen, args)
|
|||
itemMaximized.checked = module.client.fullscreen
|
||||
end
|
||||
}
|
||||
itemMoveToTag = mainMenu:add_item{text="Move to tag" , sub_menu = listTags ,}
|
||||
itemSendSignal = mainMenu:add_item{text="Send Signal" , sub_menu = singalMenu() ,}
|
||||
itemRenice = mainMenu:add_item{text="Renice" , checked = true , button1 = function() end}
|
||||
itemMoveToTag = mainMenu:add_item{text="Move to tag" , sub_menu = function() return listTags() end,}
|
||||
itemSendSignal = mainMenu:add_item{text="Send Signal" , sub_menu = singalMenu() ,}
|
||||
itemRenice = mainMenu:add_item{text="Renice" , checked = true , button1 = function() end,}
|
||||
itemNewTag = mainMenu:add_item{text="Move to a new Tag" , button1 = function()
|
||||
local t = createNewTag()
|
||||
module.client:tags({t})
|
||||
|
|
|
@ -233,7 +233,7 @@ local function new(screen)
|
|||
select_on=radical.base.event.NEVER,
|
||||
disable_markup = true,
|
||||
fg = beautiful.tasklist_fg or beautiful.fg_normal,
|
||||
bg = beautiful.tasklist_bg or beautiful.fg_normal,
|
||||
bg = beautiful.tasklist_bg or beautiful.bg_normal,
|
||||
underlay_style = beautiful.tasklist_underlay_style or radical.widgets.underlay.draw_arrow,
|
||||
icon_transformation = beautiful.tasklist_icon_transformation
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue