merge: main

This commit is contained in:
AngeD 2022-09-07 08:50:24 +02:00
commit a474934957
4 changed files with 66 additions and 91 deletions

View File

@ -80,15 +80,13 @@ mytextclock = wibox.widget.textclock()
-- Create a wibox for each screen and add it -- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join( local taglist_buttons = gears.table.join(
awful.button( awful.button(
{}, {}, 1,
1,
function(t) function(t)
t:view_only() t:view_only()
end end
), ),
awful.button( awful.button(
{modkey}, {modkey}, 1,
1,
function(t) function(t)
if client.focus then if client.focus then
client.focus:move_to_tag(t) client.focus:move_to_tag(t)
@ -99,16 +97,14 @@ local taglist_buttons = gears.table.join(
local tasklist_buttons = gears.table.join( local tasklist_buttons = gears.table.join(
awful.button( awful.button(
{}, {}, 1,
1,
function(c) function(c)
c.minimized = false c.minimized = false
c:emit_signal("request::activate", "tasklist", {raise = true}) c:emit_signal("request::activate", "tasklist", {raise = true})
end end
), ),
awful.button( awful.button(
{}, {}, 3,
3,
function() function()
awful.menu.client_list({theme = {width = 250}}) awful.menu.client_list({theme = {width = 250}})
end end
@ -181,22 +177,19 @@ awful.screen.connect_for_each_screen(
-- {{{ Key bindings -- {{{ Key bindings
globalkeys = gears.table.join( globalkeys = gears.table.join(
awful.key( awful.key(
{modkey}, {modkey}, "s",
"s",
hotkeys_popup.show_help, hotkeys_popup.show_help,
{description = "show help", group = "awesome"} {description = "show help", group = "awesome"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "j",
"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( awful.key(
{modkey}, {modkey}, "k",
"k",
function() function()
awful.client.focus.byidx(-1) awful.client.focus.byidx(-1)
end, end,
@ -204,99 +197,86 @@ globalkeys = gears.table.join(
), ),
-- Layout manipulation -- Layout manipulation
awful.key( awful.key(
{modkey, "Shift"}, {modkey, "Shift"}, "j",
"j",
function() function()
awful.client.swap.byidx(1) awful.client.swap.byidx(1)
end, end,
{description = "swap with next client by index", group = "client"} {description = "swap with next client by index", group = "client"}
), ),
awful.key( awful.key(
{modkey, "Shift"}, {modkey, "Shift"}, "k",
"k",
function() function()
awful.client.swap.byidx(-1) awful.client.swap.byidx(-1)
end, end,
{description = "swap with previous client by index", group = "client"} {description = "swap with previous client by index", group = "client"}
), ),
awful.key( awful.key(
{modkey, "Control"}, {modkey, "Control"}, "j",
"j",
function() function()
awful.screen.focus_relative(1) awful.screen.focus_relative(1)
end, end,
{description = "focus the next screen", group = "screen"} {description = "focus the next screen", group = "screen"}
), ),
awful.key( awful.key(
{modkey, "Control"}, {modkey, "Control"}, "k",
"k",
function() function()
awful.screen.focus_relative(-1) awful.screen.focus_relative(-1)
end, end,
{description = "focus the previous screen", group = "screen"} {description = "focus the previous screen", group = "screen"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "u",
"u",
awful.client.urgent.jumpto, awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"} {description = "jump to urgent client", group = "client"}
), ),
-- Standard program -- Standard program
awful.key( awful.key(
{modkey}, {modkey}, "Return",
"Return",
function() function()
awful.spawn(terminal, {tag = mouse.screen.selected_tag}) awful.spawn(terminal, {tag = mouse.screen.selected_tag})
end, end,
{description = "open a terminal", group = "launcher"} {description = "open a terminal", group = "launcher"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "e",
"e",
function() function()
awful.spawn(files, {tag = mouse.screen.selected_tag}) awful.spawn(files, {tag = mouse.screen.selected_tag})
end, end,
{description = "open file manager", group = "launcher"} {description = "open file manager", group = "launcher"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "b",
"b",
function() function()
awful.spawn(browser, {tag = mouse.screen.selected_tag}) awful.spawn(browser, {tag = mouse.screen.selected_tag})
end, end,
{description = "open browser", group = "launcher"} {description = "open browser", group = "launcher"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "l",
"l",
function() function()
awful.spawn(lock) awful.spawn(lock)
end, end,
{description = "lock screen", group = "awesome"} {description = "lock screen", group = "awesome"}
), ),
awful.key( awful.key(
{modkey, "Shift"}, {modkey, "Shift"}, "r",
"r",
awesome.restart, awesome.restart,
{description = "reload awesome", group = "awesome"} {description = "reload awesome", group = "awesome"}
), ),
awful.key( awful.key(
{modkey, "Shift"}, {modkey, "Shift"}, "q",
"q",
awesome.quit, awesome.quit,
{description = "quit awesome", group = "awesome"} {description = "quit awesome", group = "awesome"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "t",
"t",
function() function()
awful.layout.set(awful.layout.layouts[1]) awful.layout.set(awful.layout.layouts[1])
end, end,
{description = "set tiling layout", group = "layout"} {description = "set tiling layout", group = "layout"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "m",
"m",
function() function()
awful.layout.set(awful.layout.layouts[2]) awful.layout.set(awful.layout.layouts[2])
end, end,
@ -304,8 +284,7 @@ globalkeys = gears.table.join(
), ),
-- Menubar -- Menubar
awful.key( awful.key(
{modkey}, {modkey}, "r",
"r",
function() function()
menubar.show() menubar.show()
end, end,
@ -313,80 +292,77 @@ globalkeys = gears.table.join(
), ),
-- Shortcuts -- Shortcuts
awful.key( awful.key(
{}, {}, "XF86AudioRaiseVolume",
"XF86AudioRaiseVolume",
function() function()
awful.spawn("set-vol +5") awful.spawn("set-vol +5")
end, end,
{description = "raise volume", group = "shortcut"} {description = "raise volume", group = "shortcut"}
), ),
awful.key( awful.key(
{}, {}, "XF86AudioLowerVolume",
"XF86AudioLowerVolume",
function() function()
awful.spawn("set-vol -5") awful.spawn("set-vol -5")
end, end,
{description = "lower volume", group = "shortcut"} {description = "lower volume", group = "shortcut"}
), ),
awful.key( awful.key(
{}, {}, "XF86AudioMute",
"XF86AudioMute",
function() function()
awful.spawn("pactl set-sink-mute 0 toggle") awful.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")
end, end,
{description = "mute volume", group = "shortcut"} {description = "mute volume", group = "shortcut"}
), ),
awful.key( awful.key(
{}, {"Control"}, "XF86AudioMute",
"XF86AudioPlay", function()
awful.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle")
end,
{description = "mute volume", group = "shortcut"}
),
awful.key(
{}, "XF86AudioPlay",
function() function()
awful.spawn("playerctl play-pause") awful.spawn("playerctl play-pause")
end, end,
{description = "play/pause media", group = "shortcut"} {description = "play/pause media", group = "shortcut"}
), ),
awful.key( awful.key(
{}, {}, "XF86AudioPrev",
"XF86AudioPrev",
function() function()
awful.spawn("playerctl previous") awful.spawn("playerctl previous")
end, end,
{description = "previous media", group = "shortcut"} {description = "previous media", group = "shortcut"}
), ),
awful.key( awful.key(
{}, {}, "XF86AudioNext",
"XF86AudioNext",
function() function()
awful.spawn("playerctl next") awful.spawn("playerctl next")
end, end,
{description = "next media", group = "shortcut"} {description = "next media", group = "shortcut"}
), ),
awful.key( awful.key(
{}, {}, "XF86MonBrightnessUp",
"XF86MonBrightnessUp",
function() function()
awful.spawn("set-light +10") awful.spawn("set-light +10")
end, end,
{description = "raise brightness", group = "shortcut"} {description = "raise brightness", group = "shortcut"}
), ),
awful.key( awful.key(
{}, {}, "XF86MonBrightnessDown",
"XF86MonBrightnessDown",
function() function()
awful.spawn("set-light -10") awful.spawn("set-light -10")
end, end,
{description = "lower brightness", group = "shortcut"} {description = "lower brightness", group = "shortcut"}
), ),
awful.key( awful.key(
{}, {}, "Print",
"Print",
function() function()
awful.spawn("flameshot full -c") awful.spawn("flameshot full -c")
end, end,
{description = "take a screenshot", group = "shortcut"} {description = "take a screenshot", group = "shortcut"}
), ),
awful.key( awful.key(
{"Shift"}, {"Shift"}, "Print",
"Print",
function() function()
awful.spawn("flameshot gui") awful.spawn("flameshot gui")
end, end,
@ -398,8 +374,7 @@ globalkeys = gears.table.join(
clientkeys = clientkeys =
gears.table.join( gears.table.join(
awful.key( awful.key(
{modkey}, {modkey}, "f",
"f",
function(c) function(c)
c.fullscreen = not c.fullscreen c.fullscreen = not c.fullscreen
c:raise() c:raise()
@ -407,22 +382,19 @@ clientkeys =
{description = "toggle fullscreen", group = "client"} {description = "toggle fullscreen", group = "client"}
), ),
awful.key( awful.key(
{modkey, "Shift"}, {modkey, "Shift"}, "c",
"c",
function(c) function(c)
c:kill() c:kill()
end, end,
{description = "close", group = "client"} {description = "close", group = "client"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "space",
"space",
awful.client.floating.toggle, awful.client.floating.toggle,
{description = "toggle floating", group = "client"} {description = "toggle floating", group = "client"}
), ),
awful.key( awful.key(
{modkey}, {modkey}, "o",
"o",
function(c) function(c)
c:move_to_screen() c:move_to_screen()
end, end,
@ -438,8 +410,7 @@ for i = 1, 9 do
globalkeys, globalkeys,
-- View tag only. -- View tag only.
awful.key( awful.key(
{modkey}, {modkey}, "#" .. i + 9,
"#" .. i + 9,
function() function()
local screen = awful.screen.focused() local screen = awful.screen.focused()
local tag = screen.tags[i] local tag = screen.tags[i]
@ -451,8 +422,7 @@ for i = 1, 9 do
), ),
-- Move client to tag. -- Move client to tag.
awful.key( awful.key(
{modkey, "Shift"}, {modkey, "Shift"}, "#" .. i + 9,
"#" .. i + 9,
function() function()
if client.focus then if client.focus then
local tag = client.focus.screen.tags[i] local tag = client.focus.screen.tags[i]
@ -468,23 +438,20 @@ end
clientbuttons = gears.table.join( clientbuttons = gears.table.join(
awful.button( awful.button(
{}, {}, 1,
1,
function(c) function(c)
c:emit_signal("request::activate", "mouse_click", {raise = true}) c:emit_signal("request::activate", "mouse_click", {raise = true})
end end
), ),
awful.button( awful.button(
{modkey}, {modkey}, 1,
1,
function(c) function(c)
c:emit_signal("request::activate", "mouse_click", {raise = true}) c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.move(c) awful.mouse.client.move(c)
end end
), ),
awful.button( awful.button(
{modkey}, {modkey}, 3,
3,
function(c) function(c)
c:emit_signal("request::activate", "mouse_click", {raise = true}) c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.resize(c) awful.mouse.client.resize(c)
@ -587,16 +554,14 @@ client.connect_signal(
local buttons = local buttons =
gears.table.join( gears.table.join(
awful.button( awful.button(
{}, {}, 1,
1,
function() function()
c:emit_signal("request::activate", "titlebar", {raise = true}) c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.move(c) awful.mouse.client.move(c)
end end
), ),
awful.button( awful.button(
{}, {}, 3,
3,
function() function()
c:emit_signal("request::activate", "titlebar", {raise = true}) c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.resize(c) awful.mouse.client.resize(c)

View File

@ -23,21 +23,31 @@ vim.keymap.set("x", "ga", "<Plug>(EasyAlign)<C-x>")
-- variables -- variables
vim.g.mapleader = " " vim.g.mapleader = " "
vim.o.path = vim.o.path .. ",**" vim.o.path = vim.o.path .. ",**"
vim.o.expandtab = true vim.o.expandtab = true
vim.o.smartindent = true
vim.o.shiftwidth = 4 vim.o.shiftwidth = 4
vim.o.smartindent = true
vim.o.tabstop = 4 vim.o.tabstop = 4
vim.o.list = true
vim.o.number = true vim.o.number = true
vim.o.relativenumber = true vim.o.relativenumber = true
vim.o.ignorecase = true vim.o.ignorecase = true
vim.o.smartcase = true vim.o.smartcase = true
vim.o.list = true
vim.o.guicursor = ""
vim.o.mouse = "a" vim.o.mouse = "a"
vim.o.suffixes = vim.o.suffixes .. ",.pyc" vim.o.suffixes = vim.o.suffixes .. ",.pyc"
vim.o.foldmethod = "indent" vim.o.foldmethod = "indent"
vim.o.foldlevel = 99 vim.o.foldlevel = 99
vim.o.grepprg = "grep -rn" vim.o.grepprg = "grep -rn"
vim.wo.cc = "80" vim.wo.cc = "80"
-- keybindings -- keybindings
@ -50,4 +60,4 @@ vim.keymap.set("t", "<Esc>", "<C-\\><C-n>" )
vim.keymap.set("n", "gf", "gF" ) vim.keymap.set("n", "gf", "gF" )
-- remove trailing whitespaces -- remove trailing whitespaces
vim.keymap.set("n", "<Leader>w", ":%s/\\s\\+$//e<CR>") vim.keymap.set("n", "<Leader>w", "<cmd>%s/\\s\\+$//e<CR>")

View File

@ -11,7 +11,7 @@
bindsym XF86AudioRaiseVolume exec $raise_volume bindsym XF86AudioRaiseVolume exec $raise_volume
bindsym XF86AudioLowerVolume exec $lower_volume bindsym XF86AudioLowerVolume exec $lower_volume
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym Ctrl+XF86AudioMute exec pactl set-source-mute @DEFAULT_SINK@ toggle bindsym Ctrl+XF86AudioMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86AudioPlay exec playerctl play-pause bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPrev exec playerctl previous bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioNext exec playerctl next bindsym XF86AudioNext exec playerctl next

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
PS="$(docker ps -aq 2> /dev/null)" PS="$(docker container ls -aq 2> /dev/null)"
if [ "$?" != 0 ] && [ "$EUID" != 0 ]; then if [ "$?" != 0 ] && [ "$EUID" != 0 ]; then
sudo -- "$0" "$@" sudo -- "$0" "$@"
@ -15,7 +15,7 @@ DEFAULT_NET="$(docker network ls -q -f name=bridge -f name=host -f name=none)"
if [ -n "$PS" ]; then if [ -n "$PS" ]; then
docker ps -a docker container ls -a
echo -n "Prune Containers? [Y/n/a] " echo -n "Prune Containers? [Y/n/a] "
read -r ANS read -r ANS