mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2026-03-22 21:45:11 +00:00
minimized/maximized windows on key press
This commit is contained in:
parent
88cf64a3fb
commit
3d04f87baf
|
|
@ -302,19 +302,17 @@ awful.key({modkey, "Ctrl"}, "Left", awful.tag.viewprev, {
|
|||
description = "go back",
|
||||
group = "tag"
|
||||
}), -- Non-empty tag browsing
|
||||
-- awful.key({altkey}, "Left", function()
|
||||
-- lain.util.tag_view_nonempty(-1)
|
||||
-- end, {
|
||||
-- description = "view previous nonempty",
|
||||
-- group = "tag"
|
||||
-- }),
|
||||
-- awful.key({altkey}, "Right", function()
|
||||
-- lain.util.tag_view_nonempty(1)
|
||||
-- end, {
|
||||
-- description = "view previous nonempty",
|
||||
-- group = "tag"
|
||||
-- }),
|
||||
-- Default client focus
|
||||
awful.key({altkey}, "Left", function()
|
||||
lain.util.tag_view_nonempty(-1)
|
||||
end, {
|
||||
description = "view previous nonempty",
|
||||
group = "tag"
|
||||
}), awful.key({altkey}, "Right", function()
|
||||
lain.util.tag_view_nonempty(1)
|
||||
end, {
|
||||
description = "view previous nonempty",
|
||||
group = "tag"
|
||||
}), -- Default client focus
|
||||
awful.key({altkey}, "j", function()
|
||||
awful.client.focus.byidx(1)
|
||||
end, {
|
||||
|
|
@ -618,50 +616,7 @@ end, {
|
|||
end, {
|
||||
description = "volume 0%",
|
||||
group = "hotkeys"
|
||||
}), -- MPD control
|
||||
-- awful.key({altkey, "Control"}, "Up", function()
|
||||
-- os.execute("mpc toggle")
|
||||
-- beautiful.mpd.update()
|
||||
-- end, {
|
||||
-- description = "mpc toggle",
|
||||
-- group = "widgets"
|
||||
-- }), awful.key({altkey, "Control"}, "Down", function()
|
||||
-- os.execute("mpc stop")
|
||||
-- beautiful.mpd.update()
|
||||
-- end, {
|
||||
-- description = "mpc stop",
|
||||
-- group = "widgets"
|
||||
-- }), awful.key({altkey, "Control"}, "Left", function()
|
||||
-- os.execute("mpc prev")
|
||||
-- beautiful.mpd.update()
|
||||
-- end, {
|
||||
-- description = "mpc prev",
|
||||
-- group = "widgets"
|
||||
-- }), awful.key({altkey, "Control"}, "Right", function()
|
||||
-- os.execute("mpc next")
|
||||
-- beautiful.mpd.update()
|
||||
-- end, {
|
||||
-- description = "mpc next",
|
||||
-- group = "widgets"
|
||||
-- }), awful.key({altkey}, "0", function()
|
||||
-- local common = {
|
||||
-- text = "MPD widget ",
|
||||
-- position = "top_middle",
|
||||
-- timeout = 2
|
||||
-- }
|
||||
-- if beautiful.mpd.timer.started then
|
||||
-- beautiful.mpd.timer:stop()
|
||||
-- common.text = common.text .. lain.util.markup.bold("OFF")
|
||||
-- else
|
||||
-- beautiful.mpd.timer:start()
|
||||
-- common.text = common.text .. lain.util.markup.bold("ON")
|
||||
-- end
|
||||
-- naughty.notify(common)
|
||||
-- end, {
|
||||
-- description = "mpc on/off",
|
||||
-- group = "widgets"
|
||||
-- }),
|
||||
-- Copy primary to clipboard (terminals to gtk)
|
||||
}), -- Copy primary to clipboard (terminals to gtk)
|
||||
awful.key({modkey}, "c", function()
|
||||
awful.spawn.with_shell("xsel | xsel -i -b")
|
||||
end, {
|
||||
|
|
@ -673,12 +628,40 @@ awful.key({modkey}, "v", function()
|
|||
end, {
|
||||
description = "copy gtk to terminal",
|
||||
group = "hotkeys"
|
||||
}), -- User programs
|
||||
awful.key({modkey}, "d", function()
|
||||
awful.spawn(browser)
|
||||
}), awful.key({modkey}, 'd', function()
|
||||
for _, cl in ipairs(mouse.screen.selected_tag:clients()) do
|
||||
local c = cl
|
||||
if c then
|
||||
if _G.client.focus then
|
||||
c.minimized = true
|
||||
else
|
||||
c.minimized = false
|
||||
end
|
||||
end
|
||||
end
|
||||
end, {
|
||||
description = "run browser",
|
||||
group = "launcher"
|
||||
description = "min/max all windows",
|
||||
group = "client"
|
||||
}), awful.key({altkey, "Control"}, "m", function()
|
||||
for _, cl in ipairs(mouse.screen.selected_tag:clients()) do
|
||||
local c = cl
|
||||
if c then
|
||||
c.minimized = true
|
||||
end
|
||||
end
|
||||
end, {
|
||||
description = "minimize all windows in current tag",
|
||||
group = "client"
|
||||
}), awful.key({altkey, "Control"}, "n", function()
|
||||
for _, cl in ipairs(mouse.screen.selected_tag:clients()) do
|
||||
local c = cl
|
||||
if c then
|
||||
c.minimized = false
|
||||
end
|
||||
end
|
||||
end, {
|
||||
description = "maximize all windows in current tag",
|
||||
group = "client"
|
||||
}), -- Default
|
||||
--[[ Menubar
|
||||
awful.key({ modkey }, "p", function() menubar.show() end,
|
||||
|
|
|
|||
|
|
@ -108,13 +108,14 @@ theme.widget_cpu = theme.icon_dir .. "/cpu.png"
|
|||
theme.widget_mem = theme.icon_dir .. "/mem.png"
|
||||
|
||||
-- http://fontawesome.io/cheatsheet
|
||||
awful.util.tagnames = {"", "", "", "", "", ""}
|
||||
awful.util.tagnames = {"", "", "", "", "", ""}
|
||||
|
||||
local markup = lain.util.markup
|
||||
|
||||
-- Clock
|
||||
-- os.setlocale(os.getenv("LANG")) -- to localize the clock
|
||||
local mytextclock = wibox.widget.textclock(markup("#FFFFFF", "| %a %d %b | %H:%M |"))
|
||||
-- local mytextclock = wibox.widget.textclock(markup("#FFFFFF", "| %a %d %b | %H:%M |"))
|
||||
local mytextclock = wibox.widget.textclock(markup("#FFFFFF", "| %H:%M |"))
|
||||
mytextclock.font = theme.font
|
||||
theme.cal = lain.widget.cal({
|
||||
attach_to = {mytextclock},
|
||||
|
|
@ -494,8 +495,7 @@ function theme.at_screen_connect(s)
|
|||
hspace,
|
||||
s.mypromptbox,
|
||||
hspace,
|
||||
s.mytasklist,
|
||||
hspace
|
||||
s.mytasklist
|
||||
},
|
||||
{ -- Middle widgets
|
||||
layout = wibox.layout.flex.horizontal,
|
||||
|
|
|
|||
Loading…
Reference in a new issue