diff --git a/.gitmodules b/.gitmodules index 72ba64a..bf6741b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "common/.config/awesome/json"] path = common/.config/awesome/json url = https://github.com/rxi/json.lua +[submodule "common/.config/awesome/plugins/bling"] + path = common/.config/awesome/plugins/bling + url = https://github.com/BlingCorp/bling diff --git a/common/.config/awesome/TODO.md b/common/.config/awesome/TODO.md new file mode 100644 index 0000000..ec9565d --- /dev/null +++ b/common/.config/awesome/TODO.md @@ -0,0 +1,9 @@ +[-] Fix keybindings + [ ] Vomume / play / pause + [x] Resize bindings + [x] hjkl in vim + [x] Printscreen +[?] Fix layouting +[ ] Fix the brightness popup + [ ] Use white icons in both popups +[x] Fix annoying fullscreen shit diff --git a/common/.config/awesome/ben/init.lua b/common/.config/awesome/ben/init.lua index ea7dcb3..73da70a 100644 --- a/common/.config/awesome/ben/init.lua +++ b/common/.config/awesome/ben/init.lua @@ -8,6 +8,7 @@ Ben = { }, keys = { mod = "Mod4", + alt = "Mod1", shift = "Shift", ctrl = "Control", space = "space", diff --git a/common/.config/awesome/ben/keymaps.lua b/common/.config/awesome/ben/keymaps.lua index c72bc9d..e392071 100644 --- a/common/.config/awesome/ben/keymaps.lua +++ b/common/.config/awesome/ben/keymaps.lua @@ -27,324 +27,346 @@ awful.keyboard.append_global_keybindings({ end), --[[awful.key({ keys.mod }, "m", function()]] - --[[local rofi_beats = os.getenv("HOME") .. "/.local/bin/scripts/rofi-beats.sh"]] - --[[awesome.spawn(rofi_beats)]] - --[[end),]] + --[[local rofi_beats = os.getenv("HOME") .. "/.local/bin/scripts/rofi-beats.sh"]] + --[[awesome.spawn(rofi_beats)]] + --[[end),]] - --[[ window management ]] -- - awful.key({ keys.mod }, "h", function() - awful.client.focus.global_bydirection("left") - end), + --[[ window management ]] -- + awful.key({ keys.mod }, "h", function() + awful.client.focus.global_bydirection("left") + end), - awful.key({ keys.mod }, "j", function() - awful.client.focus.global_bydirection("down") - end), + awful.key({ keys.mod }, "j", function() + awful.client.focus.global_bydirection("down") + end), - awful.key({ keys.mod }, "k", function() - awful.client.focus.global_bydirection("up") - end), + awful.key({ keys.mod }, "k", function() + awful.client.focus.global_bydirection("up") + end), - awful.key({ keys.mod }, "l", function() - awful.client.focus.global_bydirection("right") - end), + awful.key({ keys.mod }, "l", function() + awful.client.focus.global_bydirection("right") + end), - awful.key({ keys.mod, keys.shift }, "h", function() - awful.client.swap.global_bydirection("left") - end), + awful.key({ keys.mod, keys.ctrl }, "h", function() + awful.client.swap.global_bydirection("left") + end), - awful.key({ keys.mod, keys.shift }, "j", function() - awful.client.swap.global_bydirection("down") - end), + awful.key({ keys.mod, keys.ctrl }, "j", function() + awful.client.swap.global_bydirection("down") + end), - awful.key({ keys.mod, keys.shift }, "k", function() - awful.client.swap.global_bydirection("up") - end), + awful.key({ keys.mod, keys.ctrl }, "k", function() + awful.client.swap.global_bydirection("up") + end), - awful.key({ keys.mod, keys.shift }, "l", function() - awful.client.swap.global_bydirection("right") - end), + awful.key({ keys.mod, keys.ctrl }, "l", function() + awful.client.swap.global_bydirection("right") + end), - --[[ Switching between tags ]] -- + awful.key({ keys.mod, keys.shift }, "h", function() + awful.tag.incmwfact(-0.05) + end), - awful.key({ keys.mod }, "#10", function() - local tag = awful.screen.focused().tags[1] - if tag then - tag:view_only() - end - end), + awful.key({ keys.mod, keys.shift }, "l", function() + awful.tag.incmwfact(0.05) + end), - awful.key({ keys.mod }, "#11", function() - local tag = awful.screen.focused().tags[2] - if tag then - tag:view_only() - end - end), + awful.key({ keys.mod, keys.shift }, "j", function() + awful.client.incwfact(0.05) + end), - awful.key({ keys.mod }, "#12", function() - local tag = awful.screen.focused().tags[3] - if tag then - tag:view_only() - end - end), + awful.key({ keys.mod, keys.shift }, "k", function() + awful.client.incwfact(-0.05) + end), - awful.key({ keys.mod }, "#13", function() - local tag = awful.screen.focused().tags[4] - if tag then - tag:view_only() - end - end), + awful.key({ keys.mod }, "u", function() + awful.client.urgent.jumpto() + end), - awful.key({ keys.mod }, "#14", function() - local tag = awful.screen.focused().tags[5] - if tag then - tag:view_only() - end - end), - awful.key({ keys.mod }, "#15", function() - local tag = awful.screen.focused().tags[6] - if tag then - tag:view_only() - end - end), - awful.key({ keys.mod }, "#16", function() - local tag = awful.screen.focused().tags[7] - if tag then - tag:view_only() - end - end), + --[[ Switching between tags ]] -- - awful.key({ keys.mod }, "#17", function() - local tag = awful.screen.focused().tags[8] - if tag then - tag:view_only() - end - end), + awful.key({ keys.mod }, "#10", function() + local tag = awful.screen.focused().tags[1] + if tag then + tag:view_only() + end + end), - awful.key({ keys.mod }, "#18", function() - local tag = awful.screen.focused().tags[9] - if tag then - tag:view_only() - end - end), + awful.key({ keys.mod }, "#11", function() + local tag = awful.screen.focused().tags[2] + if tag then + tag:view_only() + end + end), - awful.key({ keys.mod }, "#19", function() - local tag = awful.screen.focused().tags[10] - if tag then - tag:view_only() - end - end), + awful.key({ keys.mod }, "#12", function() + local tag = awful.screen.focused().tags[3] + if tag then + tag:view_only() + end + end), - awful.key({ keys.mod, keys.shift }, "#10", function() - if not client.focus then - return - end + awful.key({ keys.mod }, "#13", function() + local tag = awful.screen.focused().tags[4] + if tag then + tag:view_only() + end + end), - local tag = client.focus.screen.tags[1] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod }, "#14", function() + local tag = awful.screen.focused().tags[5] + if tag then + tag:view_only() + end + end), - awful.key({ keys.mod, keys.shift }, "#11", function() - if not client.focus then - return - end + awful.key({ keys.mod }, "#15", function() + local tag = awful.screen.focused().tags[6] + if tag then + tag:view_only() + end + end), - local tag = client.focus.screen.tags[2] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod }, "#16", function() + local tag = awful.screen.focused().tags[7] + if tag then + tag:view_only() + end + end), - awful.key({ keys.mod, keys.shift }, "#12", function() - if not client.focus then - return - end + awful.key({ keys.mod }, "#17", function() + local tag = awful.screen.focused().tags[8] + if tag then + tag:view_only() + end + end), - local tag = client.focus.screen.tags[3] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod }, "#18", function() + local tag = awful.screen.focused().tags[9] + if tag then + tag:view_only() + end + end), - awful.key({ keys.mod, keys.shift }, "#13", function() - if not client.focus then - return - end + awful.key({ keys.mod }, "#19", function() + local tag = awful.screen.focused().tags[10] + if tag then + tag:view_only() + end + end), - local tag = client.focus.screen.tags[4] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod, keys.shift }, "#10", function() + if not client.focus then + return + end - awful.key({ keys.mod, keys.shift }, "#14", function() - if not client.focus then - return - end + local tag = client.focus.screen.tags[1] + if tag then + client.focus:move_to_tag(tag) + end + end), - local tag = client.focus.screen.tags[5] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod, keys.shift }, "#11", function() + if not client.focus then + return + end - awful.key({ keys.mod, keys.shift }, "#15", function() - if not client.focus then - return - end + local tag = client.focus.screen.tags[2] + if tag then + client.focus:move_to_tag(tag) + end + end), - local tag = client.focus.screen.tags[6] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod, keys.shift }, "#12", function() + if not client.focus then + return + end - awful.key({ keys.mod, keys.shift }, "#16", function() - if not client.focus then - return - end + local tag = client.focus.screen.tags[3] + if tag then + client.focus:move_to_tag(tag) + end + end), - local tag = client.focus.screen.tags[7] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod, keys.shift }, "#13", function() + if not client.focus then + return + end - awful.key({ keys.mod, keys.shift }, "#17", function() - if not client.focus then - return - end + local tag = client.focus.screen.tags[4] + if tag then + client.focus:move_to_tag(tag) + end + end), - local tag = client.focus.screen.tags[8] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod, keys.shift }, "#14", function() + if not client.focus then + return + end - awful.key({ keys.mod, keys.shift }, "#18", function() - if not client.focus then - return - end + local tag = client.focus.screen.tags[5] + if tag then + client.focus:move_to_tag(tag) + end + end), - local tag = client.focus.screen.tags[9] - if tag then - client.focus:move_to_tag(tag) - end - end), + awful.key({ keys.mod, keys.shift }, "#15", function() + if not client.focus then + return + end - awful.key({ keys.mod, keys.shift }, "#19", function() - if not client.focus then - return - end + local tag = client.focus.screen.tags[6] + if tag then + client.focus:move_to_tag(tag) + end + end), - local tag = client.focus.screen.tags[10] - if tag then - client.focus:move_to_tag(tag) - end - end), - awful.key({}, "XF86MonBrightnessUp", + awful.key({ keys.mod, keys.shift }, "#16", function() + if not client.focus then + return + end + + local tag = client.focus.screen.tags[7] + if tag then + client.focus:move_to_tag(tag) + end + end), + + awful.key({ keys.mod, keys.shift }, "#17", function() + if not client.focus then + return + end + + local tag = client.focus.screen.tags[8] + if tag then + client.focus:move_to_tag(tag) + end + end), + + awful.key({ keys.mod, keys.shift }, "#18", function() + if not client.focus then + return + end + + local tag = client.focus.screen.tags[9] + if tag then + client.focus:move_to_tag(tag) + end + end), + + awful.key({ keys.mod, keys.shift }, "#19", function() + if not client.focus then + return + end + + local tag = client.focus.screen.tags[10] + if tag then + client.focus:move_to_tag(tag) + end + end), + awful.key({}, "XF86MonBrightnessUp", function() awful.spawn("xbacklight -inc 10", false) awesome.emit_signal("backlight_change") end - -- {description = "brightness up", group = "hotkeys"} - ), - awful.key({}, "XF86MonBrightnessDown", + -- {description = "brightness up", group = "hotkeys"} + ), + awful.key({}, "XF86MonBrightnessDown", function() awful.spawn("xbacklight -dec 10", false) awesome.emit_signal("backlight_change") end - --{description = "brightness down", group = "hotkeys"} - ), - -- ALSA volume control - awful.key({}, "XF86AudioRaiseVolume", + --{description = "brightness down", group = "hotkeys"} + ), + -- ALSA volume control + awful.key({}, "XF86AudioRaiseVolume", function() awful.spawn("amixer -D pulse sset Master 5%+", false) awesome.emit_signal("volume_change") end - --{description = "volume up", group = "hotkeys"} - ), - awful.key({}, "XF86AudioLowerVolume", + --{description = "volume up", group = "hotkeys"} + ), + awful.key({}, "XF86AudioLowerVolume", function() awful.spawn("amixer -D pulse sset Master 5%-", false) awesome.emit_signal("volume_change") end - --{description = "volume down", group = "hotkeys"} - ), - awful.key({}, "XF86AudioMute", + --{description = "volume down", group = "hotkeys"} + ), + awful.key({}, "XF86AudioMute", function() awful.spawn("amixer -D pulse set Master 1+ toggle", false) awesome.emit_signal("volume_change") end - --{description = "toggle mute", group = "hotkeys"} - ), - awful.key({}, "XF86AudioNext", + --{description = "toggle mute", group = "hotkeys"} + ), + awful.key({}, "XF86AudioNext", function() awful.spawn("mpc next", false) end - --{description = "next music", group = "hotkeys"} - ), - awful.key({}, "XF86AudioPrev", + --{description = "next music", group = "hotkeys"} + ), + awful.key({}, "XF86AudioPrev", function() awful.spawn("mpc prev", false) end - --{description = "previous music", group = "hotkeys"} - ), - awful.key({}, "XF86AudioPlay", + --{description = "previous music", group = "hotkeys"} + ), + awful.key({}, "XF86AudioPlay", function() awful.spawn("mpc toggle", false) end - --{description = "play/pause music", group = "hotkeys"} - ), - awful.key({}, "print", + --{description = "play/pause music", group = "hotkeys"} + ), + awful.key({}, "Print", function() awful.spawn("flameshot gui", false) end - ), -}) - - -client.connect_signal("request::default_keybindings", function() - awful.keyboard.append_client_keybindings({ - awful.key({ keys.mod }, "q", function(c) - c:kill() - end), - - awful.key({ keys.mod }, keys.space, function(c) - c.floating = not c.floating - c:raise() - end), - - awful.key({ keys.mod, keys.shift }, "f", function(c) - c.fullscreen = not c.fullscreen - c:raise() - end), + ), }) -end) -client.connect_signal("request::default_mousebindings", function() - awful.mouse.append_client_mousebindings({ - awful.button({}, 1, function(c) - c:activate({ context = "mouse_click" }) - end), - awful.button({ keys.mod }, 1, function(c) - c:activate({ - context = "mouse_click", - action = "mouse_move", - }) - end), + client.connect_signal("request::default_keybindings", function() + awful.keyboard.append_client_keybindings({ + awful.key({ keys.mod, keys.shift }, "q", function(c) + c:kill() + end), - awful.button({ keys.mod }, 3, function(c) - c:activate({ - context = "mouse_click", - action = "mouse_resize", - }) - end), - }) -end) + awful.key({ keys.mod }, keys.space, function(c) + c.floating = not c.floating + c:raise() + end), --- vim: filetype=lua:expandtab:shiftwidth=2:tabstop=2:softtabstop=2:textwidth=80 + awful.key({ keys.mod }, "f", function(c) + c.fullscreen = not c.fullscreen + c:raise() + end), + }) + end) + + client.connect_signal("request::default_mousebindings", function() + awful.mouse.append_client_mousebindings({ + awful.button({}, 1, function(c) + c:activate({ context = "mouse_click" }) + end), + + awful.button({ keys.mod }, 1, function(c) + c:activate({ + context = "mouse_click", + action = "mouse_move", + }) + end), + + awful.button({ keys.mod }, 3, function(c) + c:activate({ + context = "mouse_click", + action = "mouse_resize", + }) + end), + }) + end) + + -- vim: filetype=lua:expandtab:shiftwidth=2:tabstop=2:softtabstop=2:textwidth=80 diff --git a/common/.config/awesome/config/picom.conf b/common/.config/awesome/config/picom.conf index bea4dbf..35e779f 100644 --- a/common/.config/awesome/config/picom.conf +++ b/common/.config/awesome/config/picom.conf @@ -18,7 +18,7 @@ animation-for-workspace-switch-out = "zoom"; # Corners # ################################# # requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom -corner-radius = 10.0; +corner-radius = 0; rounded-corners-exclude = [ #"window_type = 'normal'", "class_g = 'awesome'", @@ -29,7 +29,7 @@ rounded-corners-exclude = [ "class_g = 'Polybar'", "class_g = 'rofi'", ]; -round-borders = 1; +round-borders = 0; round-borders-exclude = [ #"class_g = 'TelegramDesktop'", ]; @@ -421,7 +421,7 @@ use-damage = false # Do not use EWMH to detect fullscreen windows. # Reverts to checking if a window is fullscreen based only on its size and coordinates. # -# no-ewmh-fullscreen = false + #no-ewmh-fullscreen = false # Dimming bright windows so their brightness doesn't exceed this set value. # Brightness of a window is estimated by averaging all pixels in the window, diff --git a/common/.config/awesome/core/layouts.lua b/common/.config/awesome/core/layouts.lua index f8e1edf..77b1226 100644 --- a/common/.config/awesome/core/layouts.lua +++ b/common/.config/awesome/core/layouts.lua @@ -1,12 +1,11 @@ local layout = require("awful").layout layout.layouts = { - layout.suit.spiral.dwindle, - layout.suit.floating, layout.suit.tile, layout.suit.tile.left, layout.suit.tile.bottom, layout.suit.tile.top, + layout.suit.floating, layout.suit.fair, layout.suit.fair.horizontal, layout.suit.spiral, diff --git a/common/.config/awesome/core/theme.lua b/common/.config/awesome/core/theme.lua index 4260adf..459e87d 100644 --- a/common/.config/awesome/core/theme.lua +++ b/common/.config/awesome/core/theme.lua @@ -72,7 +72,7 @@ return { -- The client border width for the urgent maximized clients border_width_maximized_urgent = 0, -- The client border width for the new clients - border_width_new = 2, + border_width_new = 0, -- The client border width for the normal clients border_width_normal = 0, -- The client border width for the urgent clients diff --git a/common/.config/awesome/plugins/bling b/common/.config/awesome/plugins/bling new file mode 160000 index 0000000..6779170 --- /dev/null +++ b/common/.config/awesome/plugins/bling @@ -0,0 +1 @@ +Subproject commit 677917056d118d02feaa5c21ecf5a50375ef123d diff --git a/common/.config/awesome/rc.lua b/common/.config/awesome/rc.lua index ab7707c..4d22c00 100644 --- a/common/.config/awesome/rc.lua +++ b/common/.config/awesome/rc.lua @@ -2,6 +2,9 @@ pcall(require, "luarocks.loader") require("awful.autofocus") +local gears = require("gears") +local awful = require("awful") + -- Report potential errors require("core.error_report") @@ -57,3 +60,11 @@ nice({ maximize_color = Ben.colors.green, close_color = Ben.colors.red, }) + +-- fix annoying fullscreen stuff +client.connect_signal("property::fullscreen", function(c) + c.border_width = c.fullscreen and 0 or beautiful.border_width + c:geometry(c.screen.geometry) + awful.titlebar.hide(c) +end) + diff --git a/common/.config/nvim/lua/keymappings.lua b/common/.config/nvim/lua/keymappings.lua index cd5622b..26c75f1 100644 --- a/common/.config/nvim/lua/keymappings.lua +++ b/common/.config/nvim/lua/keymappings.lua @@ -11,10 +11,10 @@ vim.api.nvim_set_keymap('', 'p', '"_dP', opts) vim.api.nvim_set_keymap('n', '', ":NvimTreeToggle", { noremap = true }) -- make ctrl-shift arrows line movement -vim.api.nvim_set_keymap('n', '', 'ddkP', opts) -vim.api.nvim_set_keymap('v', '', ':m \'<-2gv=gv', opts) -vim.api.nvim_set_keymap('n', '', 'ddp', opts) -vim.api.nvim_set_keymap('v', '', ':m \'>+1gv=gv', opts) +vim.api.nvim_set_keymap('n', '', 'ddkP', opts) +vim.api.nvim_set_keymap('v', '', ':m \'<-2gv=gv', opts) +vim.api.nvim_set_keymap('n', '', 'ddp', opts) +vim.api.nvim_set_keymap('v', '', ':m \'>+1gv=gv', opts) -- Mapping U to Redo. vim.api.nvim_set_keymap('', 'U', '', opts) diff --git a/common/.config/nvim/lua/plugin-config/smart-splits.lua b/common/.config/nvim/lua/plugin-config/smart-splits.lua index 1fde5d4..b44eda7 100644 --- a/common/.config/nvim/lua/plugin-config/smart-splits.lua +++ b/common/.config/nvim/lua/plugin-config/smart-splits.lua @@ -47,22 +47,8 @@ require('smart-splits').setup({ }) -- resize splits -vim.keymap.set('', '', require('smart-splits').resize_left) -vim.keymap.set('', '', require('smart-splits').resize_down) -vim.keymap.set('', '', require('smart-splits').resize_up) -vim.keymap.set('', '', require('smart-splits').resize_right) - --- moving between splits -vim.keymap.set('', '', require('smart-splits').move_cursor_left) -vim.keymap.set('', '', require('smart-splits').move_cursor_down) -vim.keymap.set('', '', require('smart-splits').move_cursor_up) -vim.keymap.set('', '', require('smart-splits').move_cursor_right) - -local opts = { noremap = true, silent = true } - --- window movement -vim.api.nvim_set_keymap('', '', '', opts) -vim.api.nvim_set_keymap('', '', '', opts) -vim.api.nvim_set_keymap('', '', '', opts) -vim.api.nvim_set_keymap('', '', '', opts) +vim.keymap.set('', '', require('smart-splits').resize_left) +vim.keymap.set('', '', require('smart-splits').resize_down) +vim.keymap.set('', '', require('smart-splits').resize_up) +vim.keymap.set('', '', require('smart-splits').resize_right)