Misc cleanup

This commit is contained in:
2022-07-16 17:41:00 -07:00
parent 7d1a0b6155
commit ea62dabfc1
21 changed files with 143 additions and 175 deletions

View File

@ -1,4 +1,22 @@
local hotkeys = require("awful.hotkeys_popup")
return gears.table.join(
awful.key( {"Mod4"}, "s",
hotkeys.show_help,
{
description = "Show help",
group = "Desktop"
}
),
awful.key( {"Mod4", "Control", "Shift"}, "r",
awesome.restart,
{
description = "Restart awesome",
group = "Desktop"
}
),
awful.key( {"Mod4"}, "r",
function ()
awful.screen.focused().mypromptbox:run()
@ -9,6 +27,16 @@ return gears.table.join(
}
),
awful.key( {"Mod4"}, "x",
function ()
awful.screen.focused().mypromptbox:run()
end,
{
description = "Run prompt",
group = "Launcher"
}
),
awful.key( {"Mod4", "Shift", "Control"}, "1",
function ()
awful.spawn(conf.app_1)
@ -37,6 +65,7 @@ return gears.table.join(
group = "Launcher"
}
),
awful.key( {"Mod4", "Shift", "Control"}, "4",
function ()
awful.spawn(conf.app_4)
@ -47,19 +76,9 @@ return gears.table.join(
}
),
awful.key( {"Mod4"}, "x",
function ()
awful.screen.focused().mypromptbox:run()
end,
{
description = "Run prompt",
group = "Launcher"
}
),
awful.key( {"Mod4"}, "Return",
function ()
awful.spawn(terminal)
awful.spawn(conf.terminal)
end,
{
@ -68,28 +87,6 @@ return gears.table.join(
}
),
awful.key( {"Mod4"}, "]",
function ()
awful.spawn(terminal .. " ranger /home/mark")
end,
{
description = "Launch ranger in kitty",
group = "Launcher"
}
),
awful.key( {"Mod4", "Control"}, "Return",
function ()
awful.spawn("kitty --class \"kitty-noblur\" --override background_opacity=0.5 --override hide_window_decorations=yes")
end,
{
description = "Open a floating kitty terminal",
group = "Launcher"
}
),
awful.key( {"Mod4"}, "\\",
function ()
awful.spawn(conf.browser)

View File

@ -1,19 +0,0 @@
local hotkeys = require("awful.hotkeys_popup")
return gears.table.join(
awful.key( {"Mod4"}, "s",
hotkeys.show_help,
{
description = "Show help",
group = "Desktop"
}
),
awful.key( {"Mod4", "Control", "Shift"}, "r",
awesome.restart,
{
description = "Restart awesome",
group = "Desktop"
}
)
)

View File

@ -1,23 +0,0 @@
return gears.table.join(
awful.key( {"Control"}, "Print",
function ()
bin.capture("region", "ocr")
end,
{
description = "OCR a region to the clipboard",
group = "Desktop"
}
),
awful.key( {}, "Print",
function ()
bin.flameshot.gui()
end,
{
description = "Take a screenshot",
group = "Desktop"
}
)
)

View File

@ -1,14 +1,12 @@
return {
keys = gears.table.join(
require("binds.system.system"),
require("binds.system"),
require("binds.window.client"),
require("binds.window.layout"),
require("binds.window.tags"),
require("binds.client"),
require("binds.layout"),
require("binds.tags"),
require("binds.desktop.awesome"),
require("binds.desktop.launcher"),
require("binds.desktop.screenshot")
require("binds.awesome")
),
buttons = {}

View File

@ -1,10 +1,19 @@
local function shutdown(confirm_prompt)
if (string.lower(confirm_prompt) == "y") or (string.lower(confirm_prompt) == "yes") then
awful.spawn("shutdown now", false)
elseif (string.lower(confirm_prompt) == "r") or (string.lower(confirm_prompt) == "reset") then
awful.spawn("shutdown -r now", false)
end
end
return gears.table.join(
awful.key( {"Mod4"}, "p",
function ()
awful.prompt.run {
prompt = "<b>Really shutdown? (y/n/r) </b>",
textbox = awful.screen.focused().mypromptbox.widget,
exe_callback = bin.system.shutdown
exe_callback = shutdown
}
end,
{
@ -13,16 +22,7 @@ return gears.table.join(
}
),
awful.key( {"Mod4"}, "a",
function ()
bin.system.lock()
end,
{
description = "Lock screen",
group = "System"
}
),
awful.key( {"Mod4", "Control"}, "x",
function ()