Stuff and things

This commit is contained in:
Daan Vanoverloop 2019-10-12 09:49:51 +02:00
parent 0fa7253059
commit b54c6e6ea7
7 changed files with 85 additions and 12 deletions

View File

@ -11,3 +11,7 @@ function run {
#run ~/.config/awesome/autohidewibox.py ~/.config/awesome/autohidewibox.conf
run ~/setbg.sh
run dunst
run pulseeffects --gapplication-service
xsetwacom set "Wacom HID 50DB Finger touch" Gesture off
run touchegg
#run music_wake.sh

View File

@ -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)

15
.config/awesome/music_wake.sh Executable file
View File

@ -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

View File

@ -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

15
.vimrc
View File

@ -17,11 +17,21 @@ call plug#begin()
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
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
filetype plugin indent on " required
let g:LanguageClient_serverCommands = {
\ 'r': ['R', '--slave', '-e', 'languageserver::run()'],
\ }
let g:deoplete#enable_at_startup = 1
set tags+=./.tags
@ -92,7 +102,6 @@ setlocal spell spelllang=en_us
" 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
@ -113,7 +122,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