Reset old config
This commit is contained in:
19
binds/desktop/awesome.lua
Executable file
19
binds/desktop/awesome.lua
Executable file
@ -0,0 +1,19 @@
|
||||
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"
|
||||
}
|
||||
)
|
||||
)
|
76
binds/desktop/launcher.lua
Executable file
76
binds/desktop/launcher.lua
Executable file
@ -0,0 +1,76 @@
|
||||
return gears.table.join(
|
||||
awful.key( {"Mod4"}, "r",
|
||||
function ()
|
||||
awful.screen.focused().mypromptbox:run()
|
||||
end,
|
||||
{
|
||||
description = "Run prompt",
|
||||
group = "Launcher"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "x",
|
||||
function ()
|
||||
awful.screen.focused().mypromptbox:run()
|
||||
end,
|
||||
{
|
||||
description = "Run prompt",
|
||||
group = "Launcher"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "Tab",
|
||||
function ()
|
||||
bin.rofi.launcher()
|
||||
end,
|
||||
|
||||
{
|
||||
description = "Open Launcher",
|
||||
group = "Launcher"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "Return",
|
||||
function ()
|
||||
awful.spawn(terminal)
|
||||
end,
|
||||
|
||||
{
|
||||
description = "Open a terminal",
|
||||
group = "Launcher"
|
||||
}
|
||||
),
|
||||
|
||||
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)
|
||||
end,
|
||||
|
||||
{
|
||||
description = "Open a browser tab",
|
||||
group = "Launcher"
|
||||
}
|
||||
)
|
||||
)
|
24
binds/desktop/screenshot.lua
Executable file
24
binds/desktop/screenshot.lua
Executable file
@ -0,0 +1,24 @@
|
||||
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"
|
||||
}
|
||||
)
|
||||
)
|
||||
|
19
binds/init.lua
Executable file
19
binds/init.lua
Executable file
@ -0,0 +1,19 @@
|
||||
return {
|
||||
keys = gears.table.join(
|
||||
require("binds.system.backlight"),
|
||||
require("binds.system.mpd"),
|
||||
require("binds.system.volume"),
|
||||
require("binds.system.system"),
|
||||
require("binds.system.input"),
|
||||
|
||||
require("binds.window.client"),
|
||||
require("binds.window.layout"),
|
||||
require("binds.window.tags"),
|
||||
|
||||
require("binds.desktop.awesome"),
|
||||
require("binds.desktop.launcher"),
|
||||
require("binds.desktop.screenshot")
|
||||
),
|
||||
|
||||
buttons = {}
|
||||
}
|
56
binds/system/backlight.lua
Executable file
56
binds/system/backlight.lua
Executable file
@ -0,0 +1,56 @@
|
||||
return gears.table.join(
|
||||
awful.key( {}, "XF86MonBrightnessUp",
|
||||
function ()
|
||||
wrapper.backlight.up()
|
||||
end,
|
||||
{
|
||||
description = "Raise brightness",
|
||||
group = "System"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {}, "XF86MonBrightnessDown",
|
||||
function ()
|
||||
wrapper.backlight.down()
|
||||
end,
|
||||
{
|
||||
description = "Lower brightness",
|
||||
group = "System"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( { "Mod4" }, "o",
|
||||
function ()
|
||||
bin.backlight.redshift(5600)
|
||||
end,
|
||||
{
|
||||
description = "Default redshift",
|
||||
group = "System"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( { "Mod4", "Shift" }, "o",
|
||||
function ()
|
||||
bin.backlight.redshift_reset()
|
||||
end,
|
||||
{
|
||||
description = "Reset redshift",
|
||||
group = "System"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( { "Mod4", "Shift", "Control" }, "o",
|
||||
function ()
|
||||
bin.backlight.redshift_reset()
|
||||
awful.prompt.run {
|
||||
prompt = "<b>Color temperature: </b>",
|
||||
textbox = awful.screen.focused().mypromptbox.widget,
|
||||
exe_callback = bin.backlight.redshift
|
||||
}
|
||||
end,
|
||||
{
|
||||
description = "Set redshift",
|
||||
group = "System"
|
||||
}
|
||||
)
|
||||
)
|
11
binds/system/input.lua
Normal file
11
binds/system/input.lua
Normal file
@ -0,0 +1,11 @@
|
||||
return gears.table.join(
|
||||
awful.key( {"Mod4"}, "space",
|
||||
function()
|
||||
desktop.popup.language.next()
|
||||
end,
|
||||
{
|
||||
description = "Change input language",
|
||||
group = "System"
|
||||
}
|
||||
)
|
||||
)
|
51
binds/system/mpd.lua
Executable file
51
binds/system/mpd.lua
Executable file
@ -0,0 +1,51 @@
|
||||
return gears.table.join(
|
||||
awful.key( {}, "XF86AudioPrev",
|
||||
function ()
|
||||
bin.mpc.command("prev")
|
||||
end,
|
||||
{
|
||||
description = "Previous track",
|
||||
group = "MPD"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {}, "XF86AudioPlay",
|
||||
function ()
|
||||
bin.mpc.command("toggle")
|
||||
end,
|
||||
{
|
||||
description = "Play/Pause",
|
||||
group = "MPD"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {}, "XF86AudioNext",
|
||||
function ()
|
||||
bin.mpc.command("next")
|
||||
end,
|
||||
{
|
||||
description = "Next track",
|
||||
group = "MPD"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "XF86AudioRaiseVolume",
|
||||
function ()
|
||||
bin.mpc.command("vol +5")
|
||||
end,
|
||||
{
|
||||
description = "Volume up",
|
||||
group = "MPD"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "XF86AudioLowerVolume",
|
||||
function ()
|
||||
bin.mpc.command("vol -5")
|
||||
end,
|
||||
{
|
||||
description = "Volume down",
|
||||
group = "MPD"
|
||||
}
|
||||
)
|
||||
)
|
15
binds/system/system.lua
Normal file
15
binds/system/system.lua
Normal file
@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
||||
end,
|
||||
{
|
||||
description = "Shutdown",
|
||||
group = "System"
|
||||
}
|
||||
)
|
||||
)
|
31
binds/system/volume.lua
Executable file
31
binds/system/volume.lua
Executable file
@ -0,0 +1,31 @@
|
||||
return gears.table.join(
|
||||
awful.key( {}, "XF86AudioRaiseVolume",
|
||||
function ()
|
||||
wrapper.volume.up()
|
||||
end,
|
||||
{
|
||||
description = "Volume up",
|
||||
group = "System"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {}, "XF86AudioLowerVolume",
|
||||
function ()
|
||||
wrapper.volume.down()
|
||||
end,
|
||||
{
|
||||
description = "Volume down",
|
||||
group = "System"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {}, "XF86AudioMute",
|
||||
function ()
|
||||
wrapper.volume.togglemute()
|
||||
end,
|
||||
{
|
||||
description = "Mute",
|
||||
group = "System"
|
||||
}
|
||||
)
|
||||
)
|
83
binds/unused.lua
Executable file
83
binds/unused.lua
Executable file
@ -0,0 +1,83 @@
|
||||
--[[
|
||||
|
||||
|
||||
|
||||
|
||||
awful.key({"Mod4", "Control"}, "j",
|
||||
function ()
|
||||
awful.screen.focus_relative( 1)
|
||||
end,
|
||||
{
|
||||
description = "focus the next screen",
|
||||
group = "screen"
|
||||
}
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
awful.key({"Mod4", "Control"}, "k",
|
||||
function ()
|
||||
awful.screen.focus_relative(-1)
|
||||
end,
|
||||
{
|
||||
description = "focus the previous screen",
|
||||
group = "screen"
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- Bind all key numbers to tags.
|
||||
-- Be careful: we use keycodes to make it work on any keyboard layout.
|
||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||
for i = 1, 9 do
|
||||
globalkeys = gears.table.join(globalkeys,
|
||||
-- View tag only.
|
||||
awful.key({ "Mod4" }, "#" .. i + 9,
|
||||
function ()
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[i]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end,
|
||||
{description = "view tag #"..i, group = "tag"}),
|
||||
-- Toggle tag display.
|
||||
awful.key({ "Mod4", "Control" }, "#" .. i + 9,
|
||||
function ()
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[i]
|
||||
if tag then
|
||||
awful.tag.viewtoggle(tag)
|
||||
end
|
||||
end,
|
||||
{description = "toggle tag #" .. i, group = "tag"}),
|
||||
-- Move client to tag.
|
||||
awful.key({ "Mod4", "Shift" }, "#" .. i + 9,
|
||||
function ()
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[i]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end
|
||||
end,
|
||||
{description = "move focused client to tag #"..i, group = "tag"}),
|
||||
-- Toggle tag on focused client.
|
||||
awful.key({ "Mod4", "Control", "Shift" }, "#" .. i + 9,
|
||||
function ()
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[i]
|
||||
if tag then
|
||||
client.focus:toggle_tag(tag)
|
||||
end
|
||||
end
|
||||
end,
|
||||
{description = "toggle focused client on tag #" .. i, group = "tag"})
|
||||
)
|
||||
end
|
||||
--]]
|
78
binds/window/client.lua
Executable file
78
binds/window/client.lua
Executable file
@ -0,0 +1,78 @@
|
||||
return gears.table.join(
|
||||
awful.key( {"Mod4"}, "Left",
|
||||
function ()
|
||||
awful.client.focus.byidx( 1)
|
||||
end,
|
||||
{
|
||||
description = "Focus next",
|
||||
group = "Client"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "Right",
|
||||
function ()
|
||||
awful.client.focus.byidx(-1)
|
||||
end,
|
||||
{
|
||||
description = "Focus previous",
|
||||
group = "Client"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4", "Shift"}, "j",
|
||||
function ()
|
||||
awful.client.swap.byidx(1)
|
||||
end,
|
||||
{
|
||||
description = "Swap with next window",
|
||||
group = "Client"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4", "Shift"}, "k",
|
||||
function ()
|
||||
awful.client.swap.byidx(-1)
|
||||
end,
|
||||
{
|
||||
description = "Swap with previous window",
|
||||
group = "Client"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "u",
|
||||
awful.client.urgent.jumpto,
|
||||
{
|
||||
description = "Jump to urgent window",
|
||||
group = "Client"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "b",
|
||||
function ()
|
||||
awful.client.focus.history.previous()
|
||||
if client.focus then
|
||||
client.focus:raise()
|
||||
end
|
||||
end,
|
||||
{
|
||||
description = "Go back",
|
||||
group = "Client"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4", "Control"}, "n",
|
||||
function ()
|
||||
local c = awful.client.restore()
|
||||
-- Focus restored client
|
||||
if c then
|
||||
c:emit_signal(
|
||||
"request::activate", "key.unminimize", {raise = true}
|
||||
)
|
||||
end
|
||||
end,
|
||||
{
|
||||
description = "Restore minimized",
|
||||
group = "Client"
|
||||
}
|
||||
)
|
||||
)
|
81
binds/window/layout.lua
Executable file
81
binds/window/layout.lua
Executable file
@ -0,0 +1,81 @@
|
||||
return gears.table.join(
|
||||
awful.key( {"Mod4"}, "j",
|
||||
function ()
|
||||
awful.tag.incmwfact( 0.05)
|
||||
end,
|
||||
{
|
||||
description = "increase master width factor",
|
||||
group = "Layout"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key({"Mod4"}, "h",
|
||||
function ()
|
||||
awful.tag.incmwfact(-0.05)
|
||||
end,
|
||||
{
|
||||
description = "decrease master width factor",
|
||||
group = "Layout"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4", "Shift"}, "h",
|
||||
function ()
|
||||
awful.tag.incnmaster(1, nil, true)
|
||||
end,
|
||||
{
|
||||
description = "increase the number of master clients",
|
||||
group = "Layout"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4", "Shift"}, "l",
|
||||
function ()
|
||||
awful.tag.incnmaster(-1, nil, true)
|
||||
end,
|
||||
{
|
||||
description = "decrease the number of master clients",
|
||||
group = "Layout"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4", "Control"}, "h",
|
||||
function ()
|
||||
awful.tag.incncol(1, nil, true)
|
||||
end,
|
||||
{
|
||||
description = "increase the number of columns",
|
||||
group = "Layout"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4", "Control"}, "l",
|
||||
function ()
|
||||
awful.tag.incncol(-1, nil, true)
|
||||
end,
|
||||
{
|
||||
description = "decrease the number of columns",
|
||||
group = "Layout"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "l",
|
||||
function ()
|
||||
layoutmanager:next()
|
||||
end,
|
||||
{
|
||||
description = "select layouts",
|
||||
group = "Layout"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod4"}, "k",
|
||||
function ()
|
||||
layoutmanager:next_alt()
|
||||
end,
|
||||
{
|
||||
description = "cycle alt layouts",
|
||||
group = "Layout"
|
||||
}
|
||||
)
|
||||
)
|
41
binds/window/tags.lua
Executable file
41
binds/window/tags.lua
Executable file
@ -0,0 +1,41 @@
|
||||
return gears.table.join(
|
||||
awful.key( {"Mod1", "Control"}, "Left",
|
||||
function ()
|
||||
awful.screen.focused().tagger:left()
|
||||
end,
|
||||
{
|
||||
description = "Left",
|
||||
group = "Tags"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod1", "Control"}, "Right",
|
||||
function ()
|
||||
awful.screen.focused().tagger:right()
|
||||
end,
|
||||
{
|
||||
description = "Right",
|
||||
group = "Tags"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod1", "Control"}, "Up",
|
||||
function ()
|
||||
awful.screen.focused().tagger:up()
|
||||
end,
|
||||
{
|
||||
description = "Up",
|
||||
group = "Tags"
|
||||
}
|
||||
),
|
||||
|
||||
awful.key( {"Mod1", "Control"}, "Down",
|
||||
function ()
|
||||
awful.screen.focused().tagger:down()
|
||||
end,
|
||||
{
|
||||
description = "Down",
|
||||
group = "Tags"
|
||||
}
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user