diff --git a/.config/awesome/contrib/xbacklight.lua b/.config/awesome/contrib/xbacklight.lua new file mode 100644 index 0000000..dcbc4a4 --- /dev/null +++ b/.config/awesome/contrib/xbacklight.lua @@ -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) diff --git a/.config/awesome/music_wake.sh b/.config/awesome/music_wake.sh new file mode 100755 index 0000000..20f26ee --- /dev/null +++ b/.config/awesome/music_wake.sh @@ -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 + + diff --git a/.config/awesome/quake.lua b/.config/awesome/quake.lua index 01891b0..3f6708d 100644 --- a/.config/awesome/quake.lua +++ b/.config/awesome/quake.lua @@ -160,7 +160,7 @@ function quake:toggle() c:move_to_tag(current_tag) end else - self.visible = not self.visible + self.visible = not self.visible self:display() end end diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index eef996b..32821c2 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -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 @@ -476,6 +470,8 @@ awful.screen.connect_for_each_screen(function(s) layout = wibox.layout.align.horizontal, { -- 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 + -- }}} diff --git a/.config/awesome/vicious b/.config/awesome/vicious new file mode 160000 index 0000000..7694963 --- /dev/null +++ b/.config/awesome/vicious @@ -0,0 +1 @@ +Subproject commit 76949631dcf79c3f5efdd1d47dd850390123f42a diff --git a/.vimrc b/.vimrc index 5b2822c..511e641 100644 --- a/.vimrc +++ b/.vimrc @@ -18,9 +18,17 @@ 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 @@ -68,7 +76,7 @@ nnoremap K :Man noremap :update vnoremap :update inoremap :update - + set mouse=a set nu @@ -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 :noh: let g:deoplete#enable_smart_case = 1