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
|
||||
|
||||
|
|
@ -25,12 +25,6 @@ require("awful.hotkeys_popup.keys")
|
|||
|
||||
local function round(x)
|
||||
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)
|
||||
end
|
||||
return x-0.5
|
||||
|
@ -477,6 +471,8 @@ awful.screen.connect_for_each_screen(function(s)
|
|||
{ -- Left widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
|
||||
wibox.widget.systray(),
|
||||
|
||||
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::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::leave", function() switcher_timer:again() end)
|
||||
end)
|
||||
|
@ -564,7 +562,7 @@ function end_switcher ()
|
|||
s.bottomwibox.visible = false
|
||||
end
|
||||
|
||||
rofi_kill()
|
||||
--rofi_kill()
|
||||
end
|
||||
|
||||
function toggle_switcher ()
|
||||
|
@ -1006,5 +1004,26 @@ client.connect_signal("mouse::enter", function(c)
|
|||
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
|
11
.vimrc
11
.vimrc
|
@ -18,10 +18,18 @@ call plug#begin()
|
|||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
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
|
||||
|
||||
filetype plugin indent on " required
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
|
||||
set tags+=./.tags
|
||||
|
||||
"----------------------
|
||||
|
@ -84,7 +92,6 @@ cmap w!! w !sudo tee > /dev/null %
|
|||
" where it should get the dictionary files
|
||||
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
|
||||
|
||||
|
||||
set laststatus=2
|
||||
let g:nord_uniform_diff_background = 1
|
||||
let g:nord_cursor_line_number_background = 1
|
||||
|
@ -105,7 +112,7 @@ set expandtab
|
|||
:command W w
|
||||
:command Q q
|
||||
|
||||
let g:C_MapLeader = ','
|
||||
let g:C_Mapfeader = ','
|
||||
nnoremap <cr> :noh<CR><CR>:<backspace>
|
||||
|
||||
let g:deoplete#enable_smart_case = 1
|
||||
|
|
Loading…
Reference in New Issue