From f4dd8e0784f094883caa259115e62300fab3b6a7 Mon Sep 17 00:00:00 2001 From: Daan Vanoverloop Date: Wed, 25 Nov 2020 09:55:40 +0100 Subject: [PATCH 1/2] vim and zsh --- .config/nvim/init.vim | 22 ++++++++++++++++------ .zshrc | 3 ++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 01c59d2..6b881d1 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -132,6 +132,8 @@ endfunction :command Restoresess call RestoreSess() :command Removesess call RemoveSess() +nnoremap :Restoresess + " Save session on quitting Vim autocmd VimLeave * call AutoSaveSess() @@ -141,8 +143,8 @@ autocmd VimLeave * call AutoSaveSess() "---------------------- " move between tabs -nnoremap :tabprevious -nnoremap :tabnext +nnoremap :tabprevious +nnoremap :tabnext map :NERDTreeMirrorToggle @@ -221,6 +223,10 @@ set expandtab :command WQa wqa :command Wqa wqa +" Terminal stuff +:tnoremap +:set ma + let g:C_Mapfeader = ',' nnoremap :noh: @@ -235,10 +241,6 @@ smap neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" \: "\" -let g:deoplete#enable_smart_case = 1 -imap pumvisible() ? deoplete#close_popup() : "\" -:tnoremap - inoremap \ pumvisible() ? coc#_select_confirm() : \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : @@ -253,6 +255,14 @@ endfunction let g:coc_snippet_next = '' nnoremap :Files +nnoremap :Buffers +nnoremap ,s :split +nnoremap .s :vsplit + +nnoremap +nnoremap +nnoremap +nnoremap set completeopt=menu,noinsert diff --git a/.zshrc b/.zshrc index 9aa8288..790afed 100644 --- a/.zshrc +++ b/.zshrc @@ -70,7 +70,7 @@ alias nodeindex="node lib/index.js" plugins=( git archlinux - tig gitfast colorize command-not-found cp dirhistory sudo zsh-syntax-highlighting + tig gitfast colorize command-not-found cp dirhistory sudo ) ZSH_COMPDUMP=/tmp/zcompdump-$USER @@ -213,6 +213,7 @@ alias polybarc="$EDITOR ~/.config/polybar/config" alias i3c="$EDITOR ~/.config/i3/config" alias termitec="$EDITOR ~/.config/termite/config" alias rofic="$EDITOR ~/.config/rofi/config.rasi" +alias vimrc="$EDITOR ~/.config/nvim/init.vim" alias vim="nvim" alias vi="vim" From 2fbe1bf1951fd5c9389fc54e050720f3875fe8c4 Mon Sep 17 00:00:00 2001 From: Daan Vanoverloop Date: Sun, 7 Feb 2021 16:18:39 +0100 Subject: [PATCH 2/2] Awesome config update --- .config/awesome/rc.lua | 71 ++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index a2e5ec1..98f47cb 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -16,7 +16,7 @@ local menubar = require("menubar") local hotkeys_popup = require("awful.hotkeys_popup") local vicious = require("vicious") local timer = require("gears.timer") -local config = require("config_laptop") +local config = require("config_desktop") local quake = require("quake") -- Enable hotkeys help widget for VIM and other apps @@ -396,6 +396,33 @@ local function load_widget_config(conf) return t end +bar_timer = timer({ timeout = 0.2 }) +bar_timer:connect_signal("timeout", function () disable_bars() end) +bar_mode = false + +function enable_bars () + if bar_timer.started then bar_timer:stop() end + if bar_mode == true then return else bar_mode = true end + + for s in screen do + s.topwibox.visible = true + s.bottomwibox.visible = true + end +end + +function disable_bars () + --[[ + if bar_timer.started then bar_timer:stop() end + if bar_mode == false then return else bar_mode = false end + + for s in screen do + s.topwibox.visible = false + s.bottomwibox.visible = false + end + --]] +end + + -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) screen.connect_signal("property::geometry", set_wallpaper) @@ -404,6 +431,8 @@ awful.screen.connect_for_each_screen(function(s) -- Wallpaper set_wallpaper(s) + beautiful.useless_gap = 3 + -- Each screen has its own tag table. awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) @@ -502,12 +531,13 @@ awful.screen.connect_for_each_screen(function(s) s.dock_trigger = wibox({ bg = "#00000000", opacity = 0, ontop = true, visible = true }) s.dock_trigger:geometry({ width = 3, height = 3 }) - s.topwibox:connect_signal("mouse::enter", function() enable_bars() end) - s.topwibox:connect_signal("mouse::leave", function() bar_timer:again() end) - s.bottomwibox:connect_signal("mouse::enter", function() enable_bars() end) - s.bottomwibox:connect_signal("mouse::leave", function() bar_timer:again() end) - s.dock_trigger:connect_signal("mouse::enter", function() enable_bars() end) - s.dock_trigger:connect_signal("mouse::leave", function() bar_timer:again() end) + enable_bars() + --s.topwibox:connect_signal("mouse::enter", function() enable_bars() end) + --s.topwibox:connect_signal("mouse::leave", function() bar_timer:again() end) + --s.bottomwibox:connect_signal("mouse::enter", function() enable_bars() end) + --s.bottomwibox:connect_signal("mouse::leave", function() bar_timer:again() end) + --s.dock_trigger:connect_signal("mouse::enter", function() enable_bars() end) + --s.dock_trigger:connect_signal("mouse::leave", function() bar_timer:again() end) end) -- }}} @@ -530,9 +560,6 @@ switcher_layout = awful.layout.suit.fair switcher_mode = false switcher_timer = timer({ timeout = 1 }) switcher_timer:connect_signal("timeout", function () end_switcher() end) -bar_timer = timer({ timeout = 0.2 }) -bar_timer:connect_signal("timeout", function () disable_bars() end) -bar_mode = false layout_table = {} previous_tags = {} @@ -564,7 +591,7 @@ function end_switcher () if switcher_timer.started then switcher_timer:stop() end if switcher_mode == false then return else switcher_mode = false end - beautiful.useless_gap = 0 + beautiful.useless_gap = 3 -- Restore layout of all tags for _, tag in ipairs(root.tags()) do @@ -596,26 +623,6 @@ function toggle_switcher () if switcher_mode then end_switcher() else start_switcher() end end -function enable_bars () - if bar_timer.started then bar_timer:stop() end - if bar_mode == true then return else bar_mode = true end - - for s in screen do - s.topwibox.visible = true - s.bottomwibox.visible = true - end -end - -function disable_bars () - if bar_timer.started then bar_timer:stop() end - if bar_mode == false then return else bar_mode = false end - - for s in screen do - s.topwibox.visible = false - s.bottomwibox.visible = false - end -end - function set_borders (c) c.border_width = beautiful.border_width awful.titlebar.show(c) @@ -809,6 +816,8 @@ globalkeys = gears.table.join( {description = "show the menubar", group = "launcher"}), awful.key({ modkey }, "d", function() rofi_spawn("rofi -show drun -me-select-entry '' -me-accept-entry 'MousePrimary'") end, {description = "launch rofi", group = "launcher"}), + awful.key({ modkey }, "c", function() rofi_spawn("rofi-pass") end, + {description = "launch rofi-pass", group = "launcher"}), awful.key({ modkey, "Shift" }, "g", function (c) rofi_spawn("dmenu_script lutris.sh")