Merge gitlab.com:Danacus/dotfiles-new
This commit is contained in:
commit
4fbe2fe9f5
|
@ -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)
|
||||
|
|
|
@ -131,6 +131,8 @@ endfunction
|
|||
:command Restoresess call RestoreSess()
|
||||
:command Removesess call RemoveSess()
|
||||
|
||||
nnoremap <A-r> :Restoresess<cr>
|
||||
|
||||
" Save session on quitting Vim
|
||||
autocmd VimLeave * call AutoSaveSess()
|
||||
|
||||
|
@ -140,8 +142,8 @@ autocmd VimLeave * call AutoSaveSess()
|
|||
"----------------------
|
||||
|
||||
" move between tabs
|
||||
nnoremap <A-Left> :tabprevious<CR>
|
||||
nnoremap <A-Right> :tabnext<CR>
|
||||
nnoremap <A-h> :tabprevious<CR>
|
||||
nnoremap <A-l> :tabnext<CR>
|
||||
|
||||
|
||||
map <C-n> :NERDTreeMirrorToggle<CR>
|
||||
|
@ -220,6 +222,10 @@ set expandtab
|
|||
:command WQa wqa
|
||||
:command Wqa wqa
|
||||
|
||||
" Terminal stuff
|
||||
:tnoremap <Esc> <C-\><C-n>
|
||||
:set ma
|
||||
|
||||
let g:C_Mapfeader = ','
|
||||
nnoremap <cr> :noh<CR><CR>:<backspace>
|
||||
|
||||
|
@ -248,6 +254,14 @@ endfunction
|
|||
let g:coc_snippet_next = '<tab>'
|
||||
|
||||
nnoremap <C-f> :Files<cr>
|
||||
nnoremap <C-b> :Buffers<cr>
|
||||
nnoremap ,s :split<cr>
|
||||
nnoremap .s :vsplit<cr>
|
||||
|
||||
nnoremap <C-J> <C-W><C-J>
|
||||
nnoremap <C-K> <C-W><C-K>
|
||||
nnoremap <C-L> <C-W><C-L>
|
||||
nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
" Disable arrow keys
|
||||
map <Up> <Esc>
|
||||
|
|
1
.zshrc
1
.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"
|
||||
|
|
Loading…
Reference in New Issue