From ee7df6df54d2233a6066b2d7e5cf18002dd6788e Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Sun, 15 Jan 2023 00:49:40 +0200 Subject: Added some blurring to terminal windows + cleaned up some stuff in rc.lua and add a fuzzy finder function to quickly cd into directories --- awesome/.config/awesome/picom.conf | 21 ++++++++++----- awesome/.config/awesome/rc.lua | 13 ++++++++-- .../awesome/themes/powerarrow-black/theme.lua | 30 ++++++++++------------ nvim/.config/nvim/init.lua | 21 ++++++++------- nvim/.config/nvim/lua/user/keymaps.lua | 10 +++++--- nvim/.config/nvim/lua/user/options.lua | 5 ++-- nvim/.config/nvim/lua/user/plugins.lua | 19 +++++++++++--- nvim/.config/nvim/plugin/packer_compiled.lua | 20 +++++++++++++++ zsh/.zshrc | 17 ++++++++++++ 9 files changed, 112 insertions(+), 44 deletions(-) diff --git a/awesome/.config/awesome/picom.conf b/awesome/.config/awesome/picom.conf index 6fa6368..96fd824 100644 --- a/awesome/.config/awesome/picom.conf +++ b/awesome/.config/awesome/picom.conf @@ -172,12 +172,21 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ]; # opacity-rule = [ "80:class_g = 'URxvt'" ]; # #opacity-rule = [ "80:class_g = 'Alacritty'" ] +opacity-rule = [ + "90:class_g = 'kitty'", + "90:class_g = 'alacritty'", +]; ################################# # Background-Blurring # ################################# +blur: +{ + method = "dual_kawase"; + strength = 4; +}; # Parameters for background blurring, see the *BLUR* section for more information. # blur-method = @@ -229,12 +238,12 @@ blur-background-exclude = [ # Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. # `xrender` is the default one. # -# backend = "glx" +backend = "glx" # backend = "xr_glx_hybrid" -backend = "xrender"; +# backend = "xrender"; # Enable/disable VSync. -vsync = false +vsync = true #vsync = true # Enable remote control via D-Bus. See the *D-BUS API* section below for more details. @@ -436,9 +445,9 @@ log-level = "warn"; # wintypes: { - tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; }; + tooltip = { fade = true; shadow = true; opacity = 1.0; focus = true; full-shadow = false; }; dock = { shadow = false; } dnd = { shadow = false; } - popup_menu = { opacity = 0.9; } - dropdown_menu = { opacity = 0.9; } + popup_menu = { opacity = 1.0; } + dropdown_menu = { opacity = 1.0; } }; diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index ec80afe..437ecae 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -288,7 +288,7 @@ awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) -- {{{ Key bindings globalkeys = my_table.join( -- super + ... function keys - awful.key({ modkey }, "r", + awful.key({ modkey }, "d", function () awful.spawn(string.format("dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn NotoMonoRegular:bold:pixelsize=14", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) @@ -296,6 +296,8 @@ globalkeys = my_table.join( {description = "show dmenu", group = "hotkeys"}), awful.key({ modkey }, "b", function () awful.util.spawn( browser1 ) end, {description = browser1, group = "function keys"}), + awful.key({ modkey }, "r", function () awful.util.spawn( "kitty -e ranger" ) end, + {description = "launch ranger", group = "function keys"}), awful.key({ modkey }, "f", function() awful.util.spawn( filemanager ) end, {description = filemanager, group = "alt+ctrl"}), awful.key({ altkey }, "c", function () awful.spawn( "/home/peng/.scripts/pscontests.sh" ) end, @@ -304,6 +306,8 @@ globalkeys = my_table.join( {description = "set random wallpaper" , group = "hotkeys"}), awful.key({ altkey }, "d", function () awful.spawn( "/home/peng/.scripts/dmenuscripts.sh" ) end, {description = "books" , group = "hotkeys"}), + awful.key({ altkey }, "p", function () awful.spawn( "/home/peng/.scripts/power.sh" ) end, + {description = "books" , group = "hotkeys"}), awful.key({ modkey }, "o", function () awful.util.spawn( "rofi -show drun" ) end, {description = "rofi" , group = "function keys" }), @@ -315,6 +319,11 @@ globalkeys = my_table.join( -- super + shift + ... awful.key({ modkey, "Shift" }, "Return", function() awful.util.spawn( filemanager ) end), + awful.key({ modkey, "Shift" }, "t", function () awful.util.spawn( "kitty -e nvim /tmp/temp.txt" ) end, + {description = "launch a temp file in nvim", group = "super+shift"}), + awful.key({ modkey, "Shift" }, "c", function () awful.util.spawn( "/home/peng/.scripts/config_files.sh" ) end, + {description = "dmenu with config files", group = "super+shift"}), + -- ctrl+alt + ... @@ -345,7 +354,6 @@ globalkeys = my_table.join( -- Hotkeys Awesome awful.key({ modkey, }, "s", hotkeys_popup.show_help, {description = "show help", group="awesome"}), - -- Tag browsing with modkey awful.key({ modkey, }, "Left", awful.tag.viewprev, {description = "view previous", group = "tag"}), @@ -458,6 +466,7 @@ globalkeys = my_table.join( {description = "focus right", group = "client"}), + -- Layout manipulation awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, {description = "swap with next client by index", group = "client"}), diff --git a/awesome/.config/awesome/themes/powerarrow-black/theme.lua b/awesome/.config/awesome/themes/powerarrow-black/theme.lua index 8372746..8ea5d87 100644 --- a/awesome/.config/awesome/themes/powerarrow-black/theme.lua +++ b/awesome/.config/awesome/themes/powerarrow-black/theme.lua @@ -22,11 +22,11 @@ theme.fg_blue = "#ffffff" theme.fg_magenta = "#cc998d" theme.fg_focus = "#6200C4" theme.fg_urgent = "#b74822" -theme.bg_normal = "#000000" -- Bar color +theme.bg_normal = "#111111" -- Bar color theme.bg_focus = "#ecebe4" theme.bg_urgent = "#3F3F3F" theme.taglist_fg_focus = "#153b50" -theme.tasklist_bg_focus = "#2E4AA9" +theme.tasklist_bg_focus = "#3B3B3B" theme.tasklist_fg_focus = "#FAFFD8" theme.border_width = 2 theme.border_normal = "#000000" @@ -95,7 +95,7 @@ theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/ theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" -theme.bg_systray = "#000000" +theme.bg_systray = "#111111" theme.clock_fontfg = "#ffffff" theme.clock_font = "DejaVu Sans Mono Bold 12" theme.arch_fontfg = "#ffffff" @@ -267,11 +267,11 @@ function theme.at_screen_connect(s) buttons = tasklist_buttons, style = { shape_border_width = 0, - shape_border_color = theme.tasklist_fg_focus, + shape_border_color = "#777777", shape = gears.shape.rectangle, }, layout = { - spacing = 25, + spacing = 0, spacing_widget = { { forced_width = 0, @@ -320,7 +320,7 @@ function theme.at_screen_connect(s) awful.button({ }, 5, function () awful.layout.inc(-1) end))) - --tbox_separator = wibox.widget.textbox(" | ") + tbox_separator = wibox.widget.textbox(" ") local vert_sep = wibox.widget { widget = wibox.widget.separator, @@ -329,11 +329,11 @@ function theme.at_screen_connect(s) color = "#c7fffc", } - local arch_logo = wibox.widget { - markup = "", + local allah = wibox.widget { + markup = "", widget = wibox.widget.textbox, color = "#ffffff", - font = "DejaVu Sans Mono Bold 18", + font = "DejaVu Sans Mono Bold 10", } -- Add widgets to the wibox @@ -342,17 +342,15 @@ function theme.at_screen_connect(s) { -- Left widgets layout = wibox.layout.fixed.horizontal, --spr, - wibox.container.background(wibox.container.margin(arch_logo, 15, 10, 1, 1)), - s.mypromptbox, - wibox.container.background(wibox.container.margin(s.mytaglist, 10, 0, 2, 2)), + wibox.container.background(wibox.container.margin(allah, 10, 10, 1, 1)), + -- s.mypromptbox, + wibox.container.background(wibox.container.margin(s.mytaglist, 0, 0, 2, 2)), + tbox_separator, }, - -- { - -- layout = wibox.layout.align.horizontal, - -- wibox.container.background(wibox.container.margin(s.mytaglist, 10, 0, 2, 2)), - -- }, s.mytasklist, -- Middle widget { -- Right widgets layout = wibox.layout.fixed.horizontal, + tbox_separator, wibox.widget.systray(), wibox.widget { theme.volume.widget, layout = wibox.layout.align.horizontal }, vert_sep, diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 3778a50..17ddae3 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,4 +1,3 @@ - -- Set colorscheme vim.cmd [[colorscheme catppuccin-mocha]] @@ -19,20 +18,20 @@ vim.api.nvim_create_autocmd('TextYankPost', { require('Comment').setup() -- Enable `lukas-reineke/indent-blankline.nvim` -require('indent_blankline').setup { - char = '|', - show_trailing_blankline_indent = false, -} + require('indent_blankline').setup { + char = '|', + show_trailing_blankline_indent = false, + } +require "user.options" +require "user.keymaps" require "user.plugins" require "user.competitest" -require "user.bufferline" -require "user.treesitter" -require "user.lualine" +require "user.cmp" require "user.lsp" require "user.telescope" -require "user.keymaps" -require "user.options" require "user.gitsigns" +require "user.bufferline" +require "user.treesitter" +require "user.lualine" require "user.nvim-tree" -require "user.cmp" diff --git a/nvim/.config/nvim/lua/user/keymaps.lua b/nvim/.config/nvim/lua/user/keymaps.lua index 0f35410..9857005 100644 --- a/nvim/.config/nvim/lua/user/keymaps.lua +++ b/nvim/.config/nvim/lua/user/keymaps.lua @@ -26,9 +26,15 @@ vim.keymap.set('n', 'b', builtin.buffers, {}) vim.keymap.set('n', 'of', builtin.oldfiles, opts) vim.keymap.set('n', 'ch', builtin.command_history, opts) +-- undoteree +vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) + + -- nohlsearch keymap("n", "h", ":noh", opts) +-- lsp +vim.keymap.set('n', 'lf', vim.lsp.buf.format, opts) -- Normal -- -- Better window navigation @@ -51,10 +57,6 @@ keymap("n", "", ":bprevious", opts) keymap("n", "", ":m .+1==gi", opts) keymap("n", "", ":m .-2==gi", opts) --- Insert -- --- Press jk fast to enter -keymap("i", "jk", "", opts) - -- Visual -- -- Stay in indent mode keymap("v", "<", "