From c7f0380f1dcd7a79b73240757f88f97685397a3b Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 7 Sep 2022 08:37:16 +0200 Subject: [PATCH 1/6] merge: work --- .config/nvim/init.lua | 6 ------ .config/zsh/.docker_aliases | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index cf9e0c4..ec52b28 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -46,12 +46,6 @@ vim.wo.cc = "80" -- terminal escape key vim.keymap.set("t", "", "" ) --- movement keys -vim.keymap.set("n", "", "h" ) -vim.keymap.set("n", "", "j" ) -vim.keymap.set("n", "", "k" ) -vim.keymap.set("n", "", "l" ) - -- go to file:line instead of just file vim.keymap.set("n", "gf", "gF" ) diff --git a/.config/zsh/.docker_aliases b/.config/zsh/.docker_aliases index 4064b4d..b13bf73 100644 --- a/.config/zsh/.docker_aliases +++ b/.config/zsh/.docker_aliases @@ -11,8 +11,8 @@ alias dkcpf='docker container prune -f' alias dkcrm='docker container rm' alias dkcrmf='docker container rm -f' alias dkex='docker container exec -i -t' -alias dklo='docker container logs -f' -alias dkr='docker container run -i -t' +alias dklo='docker logs -f' +alias dkr='docker run -i -t' # images alias dkb='docker build .' From 5f03208b6b7c2a44ad2fecaba7a0d616c2dde0be Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 7 Sep 2022 08:40:57 +0200 Subject: [PATCH 2/6] feat: guicursor, cleanup --- .config/nvim/init.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index ec52b28..e4663c5 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -23,21 +23,31 @@ vim.keymap.set("x", "ga", "(EasyAlign)") -- variables vim.g.mapleader = " " + vim.o.path = vim.o.path .. ",**" + vim.o.expandtab = true -vim.o.smartindent = true vim.o.shiftwidth = 4 +vim.o.smartindent = true vim.o.tabstop = 4 + +vim.o.list = true vim.o.number = true vim.o.relativenumber = true + vim.o.ignorecase = true vim.o.smartcase = true -vim.o.list = true + +vim.o.guicursor = "" vim.o.mouse = "a" + vim.o.suffixes = vim.o.suffixes .. ",.pyc" + vim.o.foldmethod = "indent" vim.o.foldlevel = 99 + vim.o.grepprg = "grep -rn" + vim.wo.cc = "80" -- keybindings @@ -50,4 +60,4 @@ vim.keymap.set("t", "", "" ) vim.keymap.set("n", "gf", "gF" ) -- remove trailing whitespaces -vim.keymap.set("n", "w", ":%s/\\s\\+$//e") +vim.keymap.set("n", "w", "%s/\\s\\+$//e") From 31a83d322c86641697876d2600b0ccedc4d0c3d0 Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 7 Sep 2022 08:41:17 +0200 Subject: [PATCH 3/6] fix: command consistency --- bin/dkpurge | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dkpurge b/bin/dkpurge index a13c4e6..b088631 100755 --- a/bin/dkpurge +++ b/bin/dkpurge @@ -1,6 +1,6 @@ #!/bin/bash -PS="$(docker ps -aq 2> /dev/null)" +PS="$(docker container ls -aq 2> /dev/null)" if [ "$?" != 0 ] && [ "$EUID" != 0 ]; then 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 - docker ps -a + docker container ls -a echo -n "Prune Containers? [Y/n/a] " read -r ANS From 825352ca87b29e5c6bedef23999fef191e1ed442 Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 7 Sep 2022 08:41:56 +0200 Subject: [PATCH 4/6] fix: mic mute shortcut --- .config/sway/config.d/40-hotkeys.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/sway/config.d/40-hotkeys.conf b/.config/sway/config.d/40-hotkeys.conf index f8b55e1..6596605 100644 --- a/.config/sway/config.d/40-hotkeys.conf +++ b/.config/sway/config.d/40-hotkeys.conf @@ -11,7 +11,7 @@ bindsym XF86AudioRaiseVolume exec $raise_volume bindsym XF86AudioLowerVolume exec $lower_volume 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 XF86AudioPrev exec playerctl previous bindsym XF86AudioNext exec playerctl next From c3b9f6e625b95e7533018c4b112bd5e6bb6d6f19 Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 7 Sep 2022 08:43:55 +0200 Subject: [PATCH 5/6] feat: awesome mic mute shortcut --- .config/awesome/rc.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 07c2926..004937b 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -332,7 +332,15 @@ globalkeys = gears.table.join( {}, "XF86AudioMute", function() - awful.spawn("pactl set-sink-mute 0 toggle") + awful.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle") + end, + {description = "mute volume", group = "shortcut"} + ), + awful.key( + {"Control"}, + "XF86AudioMute", + function() + awful.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle") end, {description = "mute volume", group = "shortcut"} ), From ed4e76f6914d46bf4da54556a8cbcc0bed9c18c4 Mon Sep 17 00:00:00 2001 From: AngeD Date: Wed, 7 Sep 2022 08:47:38 +0200 Subject: [PATCH 6/6] style: shortcut button and modifier on same line --- .config/awesome/rc.lua | 129 ++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 86 deletions(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 004937b..475aece 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -80,15 +80,13 @@ mytextclock = wibox.widget.textclock() -- Create a wibox for each screen and add it local taglist_buttons = gears.table.join( awful.button( - {}, - 1, + {}, 1, function(t) t:view_only() end ), awful.button( - {modkey}, - 1, + {modkey}, 1, function(t) if client.focus then client.focus:move_to_tag(t) @@ -99,16 +97,14 @@ local taglist_buttons = gears.table.join( local tasklist_buttons = gears.table.join( awful.button( - {}, - 1, + {}, 1, function(c) c.minimized = false c:emit_signal("request::activate", "tasklist", {raise = true}) end ), awful.button( - {}, - 3, + {}, 3, function() awful.menu.client_list({theme = {width = 250}}) end @@ -181,22 +177,19 @@ awful.screen.connect_for_each_screen( -- {{{ Key bindings globalkeys = gears.table.join( awful.key( - {modkey}, - "s", + {modkey}, "s", hotkeys_popup.show_help, {description = "show help", group = "awesome"} ), awful.key( - {modkey}, - "j", + {modkey}, "j", function() awful.client.focus.byidx(1) end, {description = "focus next by index", group = "client"} ), awful.key( - {modkey}, - "k", + {modkey}, "k", function() awful.client.focus.byidx(-1) end, @@ -204,99 +197,86 @@ globalkeys = gears.table.join( ), -- Layout manipulation awful.key( - {modkey, "Shift"}, - "j", + {modkey, "Shift"}, "j", function() awful.client.swap.byidx(1) end, {description = "swap with next client by index", group = "client"} ), awful.key( - {modkey, "Shift"}, - "k", + {modkey, "Shift"}, "k", function() awful.client.swap.byidx(-1) end, {description = "swap with previous client by index", group = "client"} ), awful.key( - {modkey, "Control"}, - "j", + {modkey, "Control"}, "j", function() awful.screen.focus_relative(1) end, {description = "focus the next screen", group = "screen"} ), awful.key( - {modkey, "Control"}, - "k", + {modkey, "Control"}, "k", function() awful.screen.focus_relative(-1) end, {description = "focus the previous screen", group = "screen"} ), awful.key( - {modkey}, - "u", + {modkey}, "u", awful.client.urgent.jumpto, {description = "jump to urgent client", group = "client"} ), -- Standard program awful.key( - {modkey}, - "Return", + {modkey}, "Return", function() awful.spawn(terminal, {tag = mouse.screen.selected_tag}) end, {description = "open a terminal", group = "launcher"} ), awful.key( - {modkey}, - "e", + {modkey}, "e", function() awful.spawn(files, {tag = mouse.screen.selected_tag}) end, {description = "open file manager", group = "launcher"} ), awful.key( - {modkey}, - "b", + {modkey}, "b", function() awful.spawn(browser, {tag = mouse.screen.selected_tag}) end, {description = "open browser", group = "launcher"} ), awful.key( - {modkey}, - "l", + {modkey}, "l", function() awful.spawn(lock) end, {description = "lock screen", group = "awesome"} ), awful.key( - {modkey, "Shift"}, - "r", + {modkey, "Shift"}, "r", awesome.restart, {description = "reload awesome", group = "awesome"} ), awful.key( - {modkey, "Shift"}, - "q", + {modkey, "Shift"}, "q", awesome.quit, {description = "quit awesome", group = "awesome"} ), awful.key( - {modkey}, - "t", + {modkey}, "t", function() awful.layout.set(awful.layout.layouts[1]) end, {description = "set tiling layout", group = "layout"} ), awful.key( - {modkey}, - "m", + {modkey}, "m", function() awful.layout.set(awful.layout.layouts[2]) end, @@ -304,8 +284,7 @@ globalkeys = gears.table.join( ), -- Menubar awful.key( - {modkey}, - "r", + {modkey}, "r", function() menubar.show() end, @@ -313,88 +292,77 @@ globalkeys = gears.table.join( ), -- Shortcuts awful.key( - {}, - "XF86AudioRaiseVolume", + {}, "XF86AudioRaiseVolume", function() awful.spawn("set-vol +5") end, {description = "raise volume", group = "shortcut"} ), awful.key( - {}, - "XF86AudioLowerVolume", + {}, "XF86AudioLowerVolume", function() awful.spawn("set-vol -5") end, {description = "lower volume", group = "shortcut"} ), awful.key( - {}, - "XF86AudioMute", + {}, "XF86AudioMute", function() awful.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle") end, {description = "mute volume", group = "shortcut"} ), awful.key( - {"Control"}, - "XF86AudioMute", + {"Control"}, "XF86AudioMute", function() awful.spawn("pactl set-source-mute @DEFAULT_SOURCE@ toggle") end, {description = "mute volume", group = "shortcut"} ), awful.key( - {}, - "XF86AudioPlay", + {}, "XF86AudioPlay", function() awful.spawn("playerctl play-pause") end, {description = "play/pause media", group = "shortcut"} ), awful.key( - {}, - "XF86AudioPrev", + {}, "XF86AudioPrev", function() awful.spawn("playerctl previous") end, {description = "previous media", group = "shortcut"} ), awful.key( - {}, - "XF86AudioNext", + {}, "XF86AudioNext", function() awful.spawn("playerctl next") end, {description = "next media", group = "shortcut"} ), awful.key( - {}, - "XF86MonBrightnessUp", + {}, "XF86MonBrightnessUp", function() awful.spawn("set-light +10") end, {description = "raise brightness", group = "shortcut"} ), awful.key( - {}, - "XF86MonBrightnessDown", + {}, "XF86MonBrightnessDown", function() awful.spawn("set-light -10") end, {description = "lower brightness", group = "shortcut"} ), awful.key( - {}, - "Print", + {}, "Print", function() awful.spawn("flameshot full -c") end, {description = "take a screenshot", group = "shortcut"} ), awful.key( - {"Shift"}, - "Print", + {"Shift"}, "Print", function() awful.spawn("flameshot gui") end, @@ -406,8 +374,7 @@ globalkeys = gears.table.join( clientkeys = gears.table.join( awful.key( - {modkey}, - "f", + {modkey}, "f", function(c) c.fullscreen = not c.fullscreen c:raise() @@ -415,22 +382,19 @@ clientkeys = {description = "toggle fullscreen", group = "client"} ), awful.key( - {modkey, "Shift"}, - "c", + {modkey, "Shift"}, "c", function(c) c:kill() end, {description = "close", group = "client"} ), awful.key( - {modkey}, - "space", + {modkey}, "space", awful.client.floating.toggle, {description = "toggle floating", group = "client"} ), awful.key( - {modkey}, - "o", + {modkey}, "o", function(c) c:move_to_screen() end, @@ -446,8 +410,7 @@ for i = 1, 9 do globalkeys, -- View tag only. awful.key( - {modkey}, - "#" .. i + 9, + {modkey}, "#" .. i + 9, function() local screen = awful.screen.focused() local tag = screen.tags[i] @@ -459,8 +422,7 @@ for i = 1, 9 do ), -- Move client to tag. awful.key( - {modkey, "Shift"}, - "#" .. i + 9, + {modkey, "Shift"}, "#" .. i + 9, function() if client.focus then local tag = client.focus.screen.tags[i] @@ -476,23 +438,20 @@ end clientbuttons = gears.table.join( awful.button( - {}, - 1, + {}, 1, function(c) c:emit_signal("request::activate", "mouse_click", {raise = true}) end ), awful.button( - {modkey}, - 1, + {modkey}, 1, function(c) c:emit_signal("request::activate", "mouse_click", {raise = true}) awful.mouse.client.move(c) end ), awful.button( - {modkey}, - 3, + {modkey}, 3, function(c) c:emit_signal("request::activate", "mouse_click", {raise = true}) awful.mouse.client.resize(c) @@ -595,16 +554,14 @@ client.connect_signal( local buttons = gears.table.join( awful.button( - {}, - 1, + {}, 1, function() c:emit_signal("request::activate", "titlebar", {raise = true}) awful.mouse.client.move(c) end ), awful.button( - {}, - 3, + {}, 3, function() c:emit_signal("request::activate", "titlebar", {raise = true}) awful.mouse.client.resize(c)