diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index f74b42a..f71bc30 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) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 9ec7915..de5576a 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -131,6 +131,8 @@ endfunction :command Restoresess call RestoreSess() :command Removesess call RemoveSess() +nnoremap :Restoresess + " Save session on quitting Vim autocmd VimLeave * call AutoSaveSess() @@ -140,8 +142,8 @@ autocmd VimLeave * call AutoSaveSess() "---------------------- " move between tabs -nnoremap :tabprevious -nnoremap :tabnext +nnoremap :tabprevious +nnoremap :tabnext map :NERDTreeMirrorToggle @@ -220,6 +222,10 @@ set expandtab :command WQa wqa :command Wqa wqa +" Terminal stuff +:tnoremap +:set ma + let g:C_Mapfeader = ',' nnoremap :noh: @@ -248,6 +254,14 @@ endfunction let g:coc_snippet_next = '' nnoremap :Files +nnoremap :Buffers +nnoremap ,s :split +nnoremap .s :vsplit + +nnoremap +nnoremap +nnoremap +nnoremap " Disable arrow keys map diff --git a/.zshrc b/.zshrc index 419882f..dc034fc 100644 --- a/.zshrc +++ b/.zshrc @@ -216,6 +216,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"