fix #9
This commit is contained in:
@@ -48,14 +48,6 @@ return gears.table.join(
|
|||||||
end,
|
end,
|
||||||
{ description = "Focus previous client by index", group = "Client" }
|
{ description = "Focus previous client by index", group = "Client" }
|
||||||
),
|
),
|
||||||
awful.key(
|
|
||||||
{ modkey },
|
|
||||||
"#25",
|
|
||||||
function()
|
|
||||||
user_vars.main_menu:show()
|
|
||||||
end,
|
|
||||||
{ description = "Show context menu", group = "Awesome" }
|
|
||||||
),
|
|
||||||
awful.key(
|
awful.key(
|
||||||
{ modkey, "Shift" },
|
{ modkey, "Shift" },
|
||||||
"#44",
|
"#44",
|
||||||
@@ -247,13 +239,13 @@ return gears.table.join(
|
|||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
"pkexec xfpm-power-backlight-helper --get-brightness",
|
"pkexec xfpm-power-backlight-helper --get-brightness",
|
||||||
function(stdout)
|
function(stdout)
|
||||||
awful.spawn.easy_async_with_shell("pkexec xfpm-power-backlight-helper --set-brightness " .. tostring(tonumber(stdout) + BACKLIGHT_SEPS), function(stdou2)
|
awful.spawn.easy_async_with_shell("pkexec xfpm-power-backlight-helper --set-brightness " .. tostring(tonumber(stdout) + BACKLIGHT_SEPS), function(stdou2)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
awesome.emit_signal("module::brightness_osd:show", true)
|
awesome.emit_signal("module::brightness_osd:show", true)
|
||||||
awesome.emit_signal("module::brightness_slider:update")
|
awesome.emit_signal("module::brightness_slider:update")
|
||||||
awesome.emit_signal("widget::brightness_osd:rerun")
|
awesome.emit_signal("widget::brightness_osd:rerun")
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
{ description = "Raise backlight brightness", group = "System" }
|
{ description = "Raise backlight brightness", group = "System" }
|
||||||
@@ -265,13 +257,13 @@ return gears.table.join(
|
|||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
"pkexec xfpm-power-backlight-helper --get-brightness",
|
"pkexec xfpm-power-backlight-helper --get-brightness",
|
||||||
function(stdout)
|
function(stdout)
|
||||||
awful.spawn.easy_async_with_shell("pkexec xfpm-power-backlight-helper --set-brightness " .. tostring(tonumber(stdout) - BACKLIGHT_SEPS), function(stdout2)
|
awful.spawn.easy_async_with_shell("pkexec xfpm-power-backlight-helper --set-brightness " .. tostring(tonumber(stdout) - BACKLIGHT_SEPS), function(stdout2)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
awesome.emit_signal("module::brightness_osd:show", true)
|
awesome.emit_signal("module::brightness_osd:show", true)
|
||||||
awesome.emit_signal("module::brightness_slider:update")
|
awesome.emit_signal("module::brightness_slider:update")
|
||||||
awesome.emit_signal("widget::brightness_osd:rerun")
|
awesome.emit_signal("widget::brightness_osd:rerun")
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
{ description = "Lower backlight brightness", group = "System" }
|
{ description = "Lower backlight brightness", group = "System" }
|
||||||
@@ -312,70 +304,70 @@ return gears.table.join(
|
|||||||
{ modkey },
|
{ modkey },
|
||||||
"#22",
|
"#22",
|
||||||
function()
|
function()
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
[[xprop | grep WM_CLASS | awk '{gsub(/"/, "", $4); print $4}']],
|
[[xprop | grep WM_CLASS | awk '{gsub(/"/, "", $4); print $4}']],
|
||||||
function(stdout)
|
function(stdout)
|
||||||
if stdout then
|
if stdout then
|
||||||
ruled.client.append_rule {
|
ruled.client.append_rule {
|
||||||
rule = { class = stdout:gsub("\n", "") },
|
rule = { class = stdout:gsub("\n", "") },
|
||||||
properties = {
|
properties = {
|
||||||
floating = true
|
floating = true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
"cat ~/.config/awesome/src/assets/rules.txt",
|
"cat ~/.config/awesome/src/assets/rules.txt",
|
||||||
function(stdout2)
|
function(stdout2)
|
||||||
for class in stdout2:gmatch("%a+") do
|
for class in stdout2:gmatch("%a+") do
|
||||||
if class:match(stdout:gsub("\n", "")) then
|
if class:match(stdout:gsub("\n", "")) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
awful.spawn.with_shell("echo -n '" .. stdout:gsub("\n", "") .. ";' >> ~/.config/awesome/src/assets/rules.txt")
|
awful.spawn.with_shell("echo -n '" .. stdout:gsub("\n", "") .. ";' >> ~/.config/awesome/src/assets/rules.txt")
|
||||||
local c = mouse.screen.selected_tag:clients()
|
local c = mouse.screen.selected_tag:clients()
|
||||||
for j, client in ipairs(c) do
|
for j, client in ipairs(c) do
|
||||||
if client.class:match(stdout:gsub("\n", "")) then
|
if client.class:match(stdout:gsub("\n", "")) then
|
||||||
client.floating = true
|
client.floating = true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
)
|
|
||||||
end
|
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{ modkey, "Shift" },
|
{ modkey, "Shift" },
|
||||||
"#22",
|
"#22",
|
||||||
function()
|
function()
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
[[xprop | grep WM_CLASS | awk '{gsub(/"/, "", $4); print $4}']],
|
[[xprop | grep WM_CLASS | awk '{gsub(/"/, "", $4); print $4}']],
|
||||||
function(stdout)
|
function(stdout)
|
||||||
if stdout then
|
if stdout then
|
||||||
ruled.client.append_rule {
|
ruled.client.append_rule {
|
||||||
rule = { class = stdout:gsub("\n", "") },
|
rule = { class = stdout:gsub("\n", "") },
|
||||||
properties = {
|
properties = {
|
||||||
floating = false
|
floating = false
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
[[
|
[[
|
||||||
REMOVE="]] .. stdout:gsub("\n", "") .. [[;"
|
REMOVE="]] .. stdout:gsub("\n", "") .. [[;"
|
||||||
STR=$(cat ~/.config/awesome/src/assets/rules.txt)
|
STR=$(cat ~/.config/awesome/src/assets/rules.txt)
|
||||||
echo -n ${STR//$REMOVE/} > ~/.config/awesome/src/assets/rules.txt
|
echo -n ${STR//$REMOVE/} > ~/.config/awesome/src/assets/rules.txt
|
||||||
]],
|
]],
|
||||||
function(stdout2)
|
function(stdout2)
|
||||||
local c = mouse.screen.selected_tag:clients()
|
local c = mouse.screen.selected_tag:clients()
|
||||||
for j, client in ipairs(c) do
|
for j, client in ipairs(c) do
|
||||||
if client.class:match(stdout:gsub("\n", "")) then
|
if client.class:match(stdout:gsub("\n", "")) then
|
||||||
client.floating = false
|
client.floating = false
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
)
|
|
||||||
end
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user