Merged
This commit is contained in:
commit
f168b1a166
|
@ -0,0 +1,25 @@
|
||||||
|
local tonumber = tonumber
|
||||||
|
local string = { match = string.match }
|
||||||
|
local table = { concat = table.concat }
|
||||||
|
|
||||||
|
local helpers = require("vicious.helpers")
|
||||||
|
local spawn = require("vicious.spawn")
|
||||||
|
|
||||||
|
|
||||||
|
-- xbacklight: provides backlight level
|
||||||
|
-- vicious.contrib.xbacklight
|
||||||
|
local xbacklight = {}
|
||||||
|
|
||||||
|
local function parse(stdout, stderr, exitreason, exitcode)
|
||||||
|
return math.floor(tonumber(stdout))
|
||||||
|
end
|
||||||
|
|
||||||
|
function xbacklight.async(format, warg, callback)
|
||||||
|
if not warg then return callback{} end
|
||||||
|
if type(warg) ~= "table" then warg = { warg } end
|
||||||
|
spawn.easy_async("xbacklight" .. table.concat(warg, " "),
|
||||||
|
function (...) callback(parse(...)) end)
|
||||||
|
end
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
return helpers.setasyncall(xbacklight)
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
get_status() {
|
||||||
|
mpc status | tr '\n' '\r' | sed 's/.*\[\(.*\)\].*/\1/'
|
||||||
|
}
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
if [ $(get_status) == "playing" ]; then
|
||||||
|
systemd-inhibit --who="Me, the one and only" --why="Because I say so" --what=handle-lid-switch sleep 10
|
||||||
|
sleep 5
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ function quake:toggle()
|
||||||
c:move_to_tag(current_tag)
|
c:move_to_tag(current_tag)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.visible = not self.visible
|
self.visible = not self.visible
|
||||||
self:display()
|
self:display()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,12 +25,6 @@ require("awful.hotkeys_popup.keys")
|
||||||
|
|
||||||
local function round(x)
|
local function round(x)
|
||||||
if x%2 ~= 0.5 then
|
if x%2 ~= 0.5 then
|
||||||
|
|
||||||
client.connect_signal("mouse::move", function(c)
|
|
||||||
if switcher_mode and switcher_timer.started then
|
|
||||||
switcher_timer:again()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
return math.floor(x+0.5)
|
return math.floor(x+0.5)
|
||||||
end
|
end
|
||||||
return x-0.5
|
return x-0.5
|
||||||
|
@ -476,6 +470,8 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
layout = wibox.layout.align.horizontal,
|
layout = wibox.layout.align.horizontal,
|
||||||
{ -- Left widgets
|
{ -- Left widgets
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
|
||||||
|
wibox.widget.systray(),
|
||||||
|
|
||||||
table.unpack(load_widget_config(config.widgets.bottom.left))
|
table.unpack(load_widget_config(config.widgets.bottom.left))
|
||||||
},
|
},
|
||||||
|
@ -496,6 +492,8 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
|
|
||||||
s.topwibox:connect_signal("mouse::enter", function() start_switcher() end)
|
s.topwibox:connect_signal("mouse::enter", function() start_switcher() end)
|
||||||
s.topwibox:connect_signal("mouse::leave", function() switcher_timer:again() end)
|
s.topwibox:connect_signal("mouse::leave", function() switcher_timer:again() end)
|
||||||
|
s.bottomwibox:connect_signal("mouse::enter", function() start_switcher() end)
|
||||||
|
s.bottomwibox:connect_signal("mouse::leave", function() switcher_timer:again() end)
|
||||||
s.dock_trigger:connect_signal("mouse::enter", function() start_switcher() end)
|
s.dock_trigger:connect_signal("mouse::enter", function() start_switcher() end)
|
||||||
s.dock_trigger:connect_signal("mouse::leave", function() switcher_timer:again() end)
|
s.dock_trigger:connect_signal("mouse::leave", function() switcher_timer:again() end)
|
||||||
end)
|
end)
|
||||||
|
@ -564,7 +562,7 @@ function end_switcher ()
|
||||||
s.bottomwibox.visible = false
|
s.bottomwibox.visible = false
|
||||||
end
|
end
|
||||||
|
|
||||||
rofi_kill()
|
--rofi_kill()
|
||||||
end
|
end
|
||||||
|
|
||||||
function toggle_switcher ()
|
function toggle_switcher ()
|
||||||
|
@ -1006,5 +1004,26 @@ client.connect_signal("mouse::enter", function(c)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
function dump(o)
|
||||||
|
if type(o) == 'table' then
|
||||||
|
local s = ''
|
||||||
|
for k,v in pairs(o) do
|
||||||
|
if type(k) ~= 'number' then k = '"'..k..'"' end
|
||||||
|
s = s .. dump(v) .. ','
|
||||||
|
end
|
||||||
|
return s:sub(0, -2)
|
||||||
|
else
|
||||||
|
return tostring(type(o) == "tag" and o.name or o)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function get_tag()
|
||||||
|
return awful.screen.focused().selected_tag.name
|
||||||
|
end
|
||||||
|
|
||||||
|
function get_tags()
|
||||||
|
return dump(awful.screen.focused().tags)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 76949631dcf79c3f5efdd1d47dd850390123f42a
|
13
.vimrc
13
.vimrc
|
@ -18,9 +18,17 @@ call plug#begin()
|
||||||
Plug 'roxma/nvim-yarp'
|
Plug 'roxma/nvim-yarp'
|
||||||
Plug 'roxma/vim-hug-neovim-rpc'
|
Plug 'roxma/vim-hug-neovim-rpc'
|
||||||
Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
|
Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
|
||||||
|
Plug 'jpalardy/vim-slime'
|
||||||
|
Plug 'autozimu/LanguageClient-neovim', {
|
||||||
|
\ 'branch': 'next',
|
||||||
|
\ 'do': 'bash install.sh',
|
||||||
|
\ }
|
||||||
|
Plug 'calviken/vim-gdscript3'
|
||||||
call plug#end() " required
|
call plug#end() " required
|
||||||
|
|
||||||
filetype plugin indent on " required
|
filetype plugin indent on " required
|
||||||
|
|
||||||
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
|
||||||
set tags+=./.tags
|
set tags+=./.tags
|
||||||
|
|
||||||
|
@ -68,7 +76,7 @@ nnoremap K :Man <cword>
|
||||||
noremap <C-S> :update<CR><CR>
|
noremap <C-S> :update<CR><CR>
|
||||||
vnoremap <C-S> <C-C>:update<CR><CR>
|
vnoremap <C-S> <C-C>:update<CR><CR>
|
||||||
inoremap <C-S> <C-O>:update<CR><CR>
|
inoremap <C-S> <C-O>:update<CR><CR>
|
||||||
|
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set nu
|
set nu
|
||||||
|
|
||||||
|
@ -84,7 +92,6 @@ cmap w!! w !sudo tee > /dev/null %
|
||||||
" where it should get the dictionary files
|
" where it should get the dictionary files
|
||||||
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
|
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
|
||||||
|
|
||||||
|
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
let g:nord_uniform_diff_background = 1
|
let g:nord_uniform_diff_background = 1
|
||||||
let g:nord_cursor_line_number_background = 1
|
let g:nord_cursor_line_number_background = 1
|
||||||
|
@ -105,7 +112,7 @@ set expandtab
|
||||||
:command W w
|
:command W w
|
||||||
:command Q q
|
:command Q q
|
||||||
|
|
||||||
let g:C_MapLeader = ','
|
let g:C_Mapfeader = ','
|
||||||
nnoremap <cr> :noh<CR><CR>:<backspace>
|
nnoremap <cr> :noh<CR><CR>:<backspace>
|
||||||
|
|
||||||
let g:deoplete#enable_smart_case = 1
|
let g:deoplete#enable_smart_case = 1
|
||||||
|
|
Loading…
Reference in New Issue