Compare commits

...

2 Commits

Author SHA1 Message Date
214e9b3330 awesome: use only Mod4 2023-09-25 16:26:25 +02:00
f84f6b5012 remove .xmodmaprc 2023-09-25 16:08:42 +02:00
2 changed files with 32 additions and 34 deletions

View File

@ -67,8 +67,7 @@ end
local terminal = "alacritty" local terminal = "alacritty"
-- Default modkey. -- Default modkey.
local modkey = "Mod1" local modkey = "Mod4"
local modkey4 = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters. -- Table of layouts to cover with awful.layout.inc, order matters.
awful.layout.layouts = { awful.layout.layouts = {
@ -219,7 +218,7 @@ end
-- {{{ Key bindings -- {{{ Key bindings
globalkeys = gears.table.join( globalkeys = gears.table.join(
awful.key({ modkey4, }, "s", hotkeys_popup.show_help, awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{ description = "show help", group = "awesome" }), { description = "show help", group = "awesome" }),
awful.key({ modkey, }, "Left", awful.tag.viewprev, awful.key({ modkey, }, "Left", awful.tag.viewprev,
{ description = "view previous", group = "tag" }), { description = "view previous", group = "tag" }),
@ -228,13 +227,13 @@ globalkeys = gears.table.join(
awful.key({ modkey, }, "Tab", awful.tag.history.restore, awful.key({ modkey, }, "Tab", awful.tag.history.restore,
{ description = "go back", group = "tag" }), { description = "go back", group = "tag" }),
awful.key({ modkey4, }, "j", awful.key({ modkey, }, "j",
function() function()
awful.client.focus.byidx(1) awful.client.focus.byidx(1)
end, end,
{ description = "focus next by index", group = "client" } { description = "focus next by index", group = "client" }
), ),
awful.key({ modkey4, }, "k", awful.key({ modkey, }, "k",
function() function()
awful.client.focus.byidx(-1) awful.client.focus.byidx(-1)
end, end,
@ -242,17 +241,17 @@ globalkeys = gears.table.join(
), ),
-- Layout manipulation -- Layout manipulation
awful.key({ modkey4, "Shift" }, "j", function() awful.client.swap.byidx(1) end, awful.key({ modkey, "Shift" }, "j", function() awful.client.swap.byidx(1) end,
{ description = "swap with next client by index", group = "client" }), { description = "swap with next client by index", group = "client" }),
awful.key({ modkey4, "Shift" }, "k", function() awful.client.swap.byidx(-1) end, awful.key({ modkey, "Shift" }, "k", function() awful.client.swap.byidx(-1) end,
{ description = "swap with previous client by index", group = "client" }), { description = "swap with previous client by index", group = "client" }),
awful.key({ modkey4, }, ".", function() awful.screen.focus_relative(1) end, awful.key({ modkey, }, ".", function() awful.screen.focus_relative(1) end,
{ description = "focus the next screen", group = "screen" }), { description = "focus the next screen", group = "screen" }),
awful.key({ modkey4, }, ",", function() awful.screen.focus_relative(-1) end, awful.key({ modkey, }, ",", function() awful.screen.focus_relative(-1) end,
{ description = "focus the previous screen", group = "screen" }), { description = "focus the previous screen", group = "screen" }),
awful.key({ modkey4, }, "u", awful.client.urgent.jumpto, awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{ description = "jump to urgent client", group = "client" }), { description = "jump to urgent client", group = "client" }),
awful.key({ modkey4, }, "a", awful.key({ modkey, }, "a",
function() function()
awful.client.focus.history.previous() awful.client.focus.history.previous()
if client.focus then if client.focus then
@ -264,27 +263,27 @@ globalkeys = gears.table.join(
-- Standard program -- Standard program
awful.key({ modkey, "Shift" }, "Return", function() awful.spawn(terminal) end, awful.key({ modkey, "Shift" }, "Return", function() awful.spawn(terminal) end,
{ description = "open a terminal", group = "launcher" }), { description = "open a terminal", group = "launcher" }),
awful.key({ modkey, modkey4, "Shift" }, "l", function() awful.spawn("slock") end, awful.key({ modkey, "Control", "Shift" }, "l", function() awful.spawn("slock") end,
{ description = "open a terminal", group = "launcher" }), { description = "open a terminal", group = "launcher" }),
awful.key({ modkey, modkey4, "Shift" }, "s", function() awful.spawn("systemctl suspend") end, awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end,
{ description = "open a terminal", group = "launcher" }), { description = "open a terminal", group = "launcher" }),
awful.key({ modkey, "Shift" }, "F6", switch_theme, awful.key({ modkey, "Shift" }, "F6", switch_theme,
{ description = "switch theme", group = "launcher" }), { description = "switch theme", group = "launcher" }),
awful.key({ modkey4, }, "q", awesome.restart, awful.key({ modkey, }, "q", awesome.restart,
{ description = "reload awesome", group = "awesome" }), { description = "reload awesome", group = "awesome" }),
awful.key({ modkey, modkey4, "Shift" }, "q", awesome.quit, awful.key({ modkey, "Control", "Shift" }, "q", awesome.quit,
{ description = "quit awesome", group = "awesome" }), { description = "quit awesome", group = "awesome" }),
awful.key({ modkey4, }, "l", function() awful.tag.incmwfact(0.05) end, awful.key({ modkey, }, "l", function() awful.tag.incmwfact(0.05) end,
{ description = "increase master width factor", group = "layout" }), { description = "increase master width factor", group = "layout" }),
awful.key({ modkey4, }, "h", function() awful.tag.incmwfact(-0.05) end, awful.key({ modkey, }, "h", function() awful.tag.incmwfact(-0.05) end,
{ description = "decrease master width factor", group = "layout" }), { description = "decrease master width factor", group = "layout" }),
awful.key({ modkey4, "Shift" }, "h", function() awful.tag.incnmaster(1, nil, true) end, awful.key({ modkey, "Shift" }, "h", function() awful.tag.incnmaster(1, nil, true) end,
{ description = "increase the number of master clients", group = "layout" }), { description = "increase the number of master clients", group = "layout" }),
awful.key({ modkey4, "Shift" }, "l", function() awful.tag.incnmaster(-1, nil, true) end, awful.key({ modkey, "Shift" }, "l", function() awful.tag.incnmaster(-1, nil, true) end,
{ description = "decrease the number of master clients", group = "layout" }), { description = "decrease the number of master clients", group = "layout" }),
awful.key({ modkey4, }, "i", function() awful.tag.incncol(1, nil, true) end, awful.key({ modkey, }, "i", function() awful.tag.incncol(1, nil, true) end,
{ description = "increase the number of columns", group = "layout" }), { description = "increase the number of columns", group = "layout" }),
awful.key({ modkey4, }, "d", function() awful.tag.incncol(-1, nil, true) end, awful.key({ modkey, }, "d", function() awful.tag.incncol(-1, nil, true) end,
{ description = "decrease the number of columns", group = "layout" }), { description = "decrease the number of columns", group = "layout" }),
awful.key({ modkey, }, "space", function() awful.layout.inc(1) end, awful.key({ modkey, }, "space", function() awful.layout.inc(1) end,
{ description = "select next", group = "layout" }), { description = "select next", group = "layout" }),
@ -292,7 +291,7 @@ globalkeys = gears.table.join(
{ description = "select previous", group = "layout" }), { description = "select previous", group = "layout" }),
awful.key({ modkey, "Control", "Shift", }, "space", layout_menu, awful.key({ modkey, "Control", "Shift", }, "space", layout_menu,
{ description = "select layout from menu", group = "layout" }), { description = "select layout from menu", group = "layout" }),
awful.key({ modkey4, "Control" }, "n", awful.key({ modkey, "Control" }, "n",
function() function()
local c = awful.client.restore() local c = awful.client.restore()
-- Focus restored client -- Focus restored client
@ -305,10 +304,10 @@ globalkeys = gears.table.join(
{ description = "restore minimized", group = "client" }), { description = "restore minimized", group = "client" }),
-- Prompt -- Prompt
awful.key({ modkey4, }, "r", function() awful.screen.focused().mypromptbox:run() end, awful.key({ modkey, }, "r", function() awful.screen.focused().mypromptbox:run() end,
{ description = "run prompt", group = "launcher" }), { description = "run prompt", group = "launcher" }),
awful.key({ modkey4, }, "x", awful.key({ modkey, }, "x",
function() function()
awful.prompt.run { awful.prompt.run {
prompt = "Run Lua code: ", prompt = "Run Lua code: ",
@ -319,47 +318,47 @@ globalkeys = gears.table.join(
end, end,
{ description = "lua execute prompt", group = "awesome" }), { description = "lua execute prompt", group = "awesome" }),
-- Menubar -- Menubar
awful.key({ modkey4, }, "p", function() menubar.show() end, awful.key({ modkey, }, "p", function() menubar.show() end,
{ description = "show the menubar", group = "launcher" }) { description = "show the menubar", group = "launcher" })
) )
clientkeys = gears.table.join( clientkeys = gears.table.join(
awful.key({ modkey4, }, "f", awful.key({ modkey, }, "f",
function(c) function(c)
c.fullscreen = not c.fullscreen c.fullscreen = not c.fullscreen
c:raise() c:raise()
end, end,
{ description = "toggle fullscreen", group = "client" }), { description = "toggle fullscreen", group = "client" }),
awful.key({ modkey4, "Shift" }, "c", function(c) c:kill() end, awful.key({ modkey, "Shift" }, "c", function(c) c:kill() end,
{ description = "close", group = "client" }), { description = "close", group = "client" }),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle, awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle,
{ description = "toggle floating", group = "client" }), { description = "toggle floating", group = "client" }),
awful.key({ modkey, }, "Return", function(c) c:swap(awful.client.getmaster()) end, awful.key({ modkey, }, "Return", function(c) c:swap(awful.client.getmaster()) end,
{ description = "move to master", group = "client" }), { description = "move to master", group = "client" }),
awful.key({ modkey4, "Shift" }, ".", function(c) c:move_to_screen() end, awful.key({ modkey, "Shift" }, ".", function(c) c:move_to_screen() end,
{ description = "move to screen", group = "client" }), { description = "move to screen", group = "client" }),
awful.key({ modkey4, }, "t", function(c) c.ontop = not c.ontop end, awful.key({ modkey, }, "t", function(c) c.ontop = not c.ontop end,
{ description = "toggle keep on top", group = "client" }), { description = "toggle keep on top", group = "client" }),
awful.key({ modkey4, }, "n", awful.key({ modkey, }, "n",
function(c) function(c)
-- The client currently has the input focus, so it cannot be -- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus. -- minimized, since minimized clients can't have the focus.
c.minimized = true c.minimized = true
end, end,
{ description = "minimize", group = "client" }), { description = "minimize", group = "client" }),
awful.key({ modkey4, }, "m", awful.key({ modkey, }, "m",
function(c) function(c)
c.maximized = not c.maximized c.maximized = not c.maximized
c:raise() c:raise()
end, end,
{ description = "(un)maximize", group = "client" }), { description = "(un)maximize", group = "client" }),
awful.key({ modkey4, }, "v", awful.key({ modkey, }, "v",
function(c) function(c)
c.maximized_vertical = not c.maximized_vertical c.maximized_vertical = not c.maximized_vertical
c:raise() c:raise()
end, end,
{ description = "(un)maximize vertically", group = "client" }), { description = "(un)maximize vertically", group = "client" }),
awful.key({ modkey4, }, "b", awful.key({ modkey, }, "b",
function(c) function(c)
c.maximized_horizontal = not c.maximized_horizontal c.maximized_horizontal = not c.maximized_horizontal
c:raise() c:raise()

View File

@ -9,7 +9,6 @@ xrandr --auto
xrandr --output HDMI1 --right-of DP1 xrandr --output HDMI1 --right-of DP1
xrdb -merge ~/.Xresources xrdb -merge ~/.Xresources
setxkbmap pl -option ctrl:nocaps setxkbmap pl -option ctrl:nocaps
xmodmap ~/.xmodmaprc
if [ -x ~/.fehbg ]; then if [ -x ~/.fehbg ]; then
~/.fehbg & ~/.fehbg &