diff --git a/LICENSE b/LICENSE
index be03f88..c128092 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2020 purhan
+Copyright (c) 2021 purhan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/src/.bash_profile b/src/.bash_profile
new file mode 120000
index 0000000..aa7da3a
--- /dev/null
+++ b/src/.bash_profile
@@ -0,0 +1 @@
+.profile
\ No newline at end of file
diff --git a/src/.bashrc b/src/.bashrc
index ad7153d..9f6800d 100644
--- a/src/.bashrc
+++ b/src/.bashrc
@@ -102,8 +102,13 @@ alias more=less
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
+alias nv='nvim'
# switch between shells
alias tobash="sudo chsh $USER -s /bin/bash && echo 'Now log out.'"
alias tozsh="sudo chsh $USER -s /bin/zsh && echo 'Now log out.'"
alias tofish="sudo chsh $USER -s /bin/fish && echo 'Now log out.'"
+source "$HOME/.cargo/env"
+
+[ -f ~/.fzf.bash ] && source ~/.fzf.bash
+
diff --git a/src/.config/awesome/configuration/apps.lua b/src/.config/awesome/configuration/apps.lua
index fd51585..4e28785 100644
--- a/src/.config/awesome/configuration/apps.lua
+++ b/src/.config/awesome/configuration/apps.lua
@@ -4,10 +4,7 @@ local beautiful = require('beautiful')
-- Thanks to jo148 on github for making rofi dpi aware!
local with_dpi = require('beautiful').xresources.apply_dpi
local get_dpi = require('beautiful').xresources.get_dpi
-local rofi_command = 'env /usr/bin/rofi -dpi ' .. get_dpi() .. ' -width ' .. with_dpi(100) ..
- ' -show drun -display-drun -theme ' .. filesystem.get_configuration_dir() ..
- '/configuration/rofi.rasi -icon-theme ' .. beautiful.icon_theme ..
- ' -run-command "/bin/bash -c -i \'shopt -s expand_aliases; {cmd}\'"'
+local rofi_command = 'env /usr/bin/rofi -show drun -display-drun -run-command "/bin/bash -c -i \'shopt -s expand_aliases; {cmd}\'"'
return {
-- List of apps to start by default on some actions
@@ -15,7 +12,7 @@ return {
terminal = 'kitty',
rofi = rofi_command,
lock = 'i3lock-fancy',
- quake = 'kitty',
+ splash = 'kitty -T SplashTerminal -o background_opacity=0.95',
power_command = '~/.config/awesome/configuration/utils/rofi-power',
screenshot = '~/.config/awesome/configuration/utils/screenshot -m',
region_screenshot = '~/.config/awesome/configuration/utils/screenshot -r',
@@ -26,13 +23,17 @@ return {
files = 'nautilus',
power_manager = 'gnome-power-statistics'
},
- -- List of apps to start once on start-up
- run_on_start_up = {'~/.config/awesome/configuration/awspawn',
- 'compton --config ' .. filesystem.get_configuration_dir() .. '/configuration/compton.conf',
- 'nm-applet --indicator', 'ibus-daemon --xim --daemonize', 'scream-start', 'numlockx on',
- '/usr/lib/xfce-polkit/xfce-polkit & eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg)', -- credential manager
- 'blueman-tray',
- 'xinput set-prop "ETPS/2 Elantech Touchpad" "libinput Natural Scrolling Enabled" 1',
- 'xinput set-prop "ETPS/2 Elantech Touchpad" "libinput Tapping Enabled" 1'}
+ -- List of commands to start once on start-up
+ run_on_start_up = {
+ '~/.config/awesome/configuration/awspawn',
+ 'compton',
+ 'nm-applet --indicator',
+ 'nitrogen --restore',
+ 'ibus-daemon --xim --daemonize',
+ 'scream-start',
+ 'numlockx on',
+ '/usr/lib/xfce-polkit/xfce-polkit & eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg)', -- credential manager
+ 'blueman-tray'
+ }
}
diff --git a/src/.config/awesome/configuration/client/rules.lua b/src/.config/awesome/configuration/client/rules.lua
index d09de97..fa85474 100644
--- a/src/.config/awesome/configuration/client/rules.lua
+++ b/src/.config/awesome/configuration/client/rules.lua
@@ -22,13 +22,6 @@ awful.rules.rules = {{
maximized_horizontal = false,
maximized_vertical = false
}
-}, {
- rule_any = {
- instance = {"QuakeTerminal"}
- },
- properties = {
- skip_decoration = true
- }
}, {
rule_any = {
type = {'dialog'},
diff --git a/src/.config/awesome/configuration/keys/global.lua b/src/.config/awesome/configuration/keys/global.lua
index 2127f02..5d9dccc 100644
--- a/src/.config/awesome/configuration/keys/global.lua
+++ b/src/.config/awesome/configuration/keys/global.lua
@@ -17,19 +17,22 @@ awful.key({modkey}, 'h', hotkeys_popup.show_help, {
description = 'show help',
group = 'awesome'
}), -- Tag browsing
-awful.key({modkey}, 'w', awful.tag.viewprev, {
- description = 'view previous',
+awful.key({modkey}, 'Left', function()
+ awful.tag.viewprev()
+ _G._splash_to_current_tag()
+end, {
+ description = 'go to previous workspace',
group = 'tag'
-}), awful.key({modkey}, 's', awful.tag.viewnext, {
- description = 'view next',
+}), awful.key({modkey}, 'Right', function()
+ awful.tag.viewnext()
+ _G._splash_to_current_tag()
+end, {
+ description = 'go to next workspace',
group = 'tag'
-}), awful.key({altkey, 'Control'}, 'Left', awful.tag.viewprev, {
- description = 'view previous',
- group = 'tag'
-}), awful.key({altkey, 'Control'}, 'Right', awful.tag.viewnext, {
- description = 'view next',
- group = 'tag'
-}), awful.key({modkey}, 'Escape', awful.tag.history.restore, {
+}), awful.key({modkey}, 'Escape', function()
+ awful.tag.history.restore()
+ _G._splash_to_current_tag()
+end, {
description = 'go back',
group = 'tag'
}), -- Default client focus
@@ -48,27 +51,13 @@ end, {
end, {
description = 'show rofi menu',
group = 'awesome'
-}), awful.key({modkey}, 'd', function()
- local flag = false
- for _, c in ipairs(mouse.screen.selected_tag:clients()) do
- if c.minimized == true then
- flag = true
- end
- c.minimized = true
- end
- for _, c in ipairs(mouse.screen.selected_tag:clients()) do
- if flag == true then
- c.minimized = false
- end
- end
+}), awful.key({modkey}, 'u', function()
+ awful.client.urgent.jumpto()
+ _G._splash_to_current_tag()
end, {
- description = 'minimize all clients',
- group = 'awesome'
-}), awful.key({modkey}, 'u', awful.client.urgent.jumpto, {
description = 'jump to urgent client',
group = 'client'
}), awful.key({altkey}, 'Tab', function()
- -- awful.client.focus.history.previous()
awful.client.focus.byidx(1)
if _G.client.focus then
_G.client.focus:raise()
@@ -76,8 +65,19 @@ end, {
end, {
description = 'switch to next window',
group = 'client'
+}), awful.key({modkey}, 'm', function()
+ focus = not _G.client.focus
+ if not focus then
+ _G.client.focus.minimized = true
+ else
+ for _, c in ipairs(mouse.screen.selected_tag:clients()) do
+ c.minimized = false
+ end
+ end
+end, {
+ description = 'minimize window in focus / unminimize all',
+ group = 'client'
}), awful.key({altkey, 'Shift'}, 'Tab', function()
- -- awful.client.focus.history.previous()
awful.client.focus.byidx(-1)
if _G.client.focus then
_G.client.focus:raise()
@@ -115,7 +115,7 @@ end, {
end, {
description = 'open a browser',
group = 'launcher'
-}), awful.key({modkey}, 't', function()
+}), awful.key({modkey}, 'Return', function()
awful.util.spawn_with_shell(apps.default.terminal)
end, {
description = 'open a terminal',
@@ -139,7 +139,7 @@ end, {
end, {
description = 'toggle gaps',
group = 'awesome'
-}), awful.key({modkey, 'Shift'}, 'p', function()
+}), awful.key({modkey}, 'p', function()
awful.util.spawn_with_shell(apps.default.power_command)
end, {
description = 'end session menu',
@@ -244,10 +244,15 @@ end, {
end, {
description = 'restore minimized',
group = 'client'
-}), awful.key({altkey, 'Control'}, 'k', function()
- _G.toggle_quake()
+}), awful.key({modkey}, 'k', function()
+ _G.toggle_splash()
end, {
- description = 'dropdown application',
+ description = 'toggle splash terminal',
+ group = 'launcher'
+}), awful.key({modkey}, 'j', function()
+ _G.toggle_splash_height()
+end, {
+ description = 'toggle splash terminal height',
group = 'launcher'
}), awful.key({}, 'XF86MonBrightnessUp', function()
awful.spawn('xbacklight -inc 10')
@@ -345,6 +350,7 @@ for i = 1, 9 do
local tag = screen.tags[i]
if tag then
tag:view_only()
+ _G._splash_to_current_tag()
end
end, descr_view), -- Toggle tag display.
awful.key({modkey, 'Control'}, '#' .. i + 9, function()
diff --git a/src/.config/awesome/configuration/rofi.rasi b/src/.config/awesome/configuration/rofi.rasi
index 4833f14..e158e40 100644
--- a/src/.config/awesome/configuration/rofi.rasi
+++ b/src/.config/awesome/configuration/rofi.rasi
@@ -118,7 +118,7 @@ element selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
padding: 16px;
- border: 0 0 0 5px solid;
+ border: 0 0 0 0 solid;
border-color: @active-background;
}
@@ -145,4 +145,4 @@ element alternate.urgent {
element alternate.active {
background-color: @active-background;
text-color: @active-foreground;
-}
\ No newline at end of file
+}
diff --git a/src/.config/awesome/configuration/tags.lua b/src/.config/awesome/configuration/tags.lua
new file mode 100644
index 0000000..0d700f6
--- /dev/null
+++ b/src/.config/awesome/configuration/tags.lua
@@ -0,0 +1,37 @@
+local awful = require('awful')
+local beautiful = require('beautiful')
+local gears = require('gears')
+local apps = require('configuration.apps')
+local dpi = require('beautiful').xresources.apply_dpi
+
+local tags = {
+ {text = 'web', type = 'web', defaultApp = apps.default.browser, screen = 1},
+ {text = 'dev', type = 'dev', defaultApp = apps.default.editor, screen = 1},
+ {
+ text = 'term',
+ type = 'term',
+ defaultApp = apps.default.terminal,
+ screen = 1
+ },
+ {text = 'file', type = 'file', defaultApp = apps.default.files, screen = 1},
+ {text = 'chat', type = 'chat', defaultApp = apps.default.social, screen = 1},
+ {text = 'misc', type = 'misc', defaultApp = apps.default.rofi, screen = 1}
+}
+
+awful.layout.layouts = {
+ awful.layout.suit.tile, awful.layout.suit.max, awful.layout.suit.floating
+}
+
+awful.screen.connect_for_each_screen(function(s)
+ for i, tag in pairs(tags) do
+ awful.tag.add(tag.text, {
+ icon = tag.icon,
+ icon_only = false,
+ layout = awful.layout.suit.tile,
+ gap = beautiful.gaps,
+ screen = s,
+ defaultApp = tag.defaultApp,
+ selected = i == 1
+ })
+ end
+end)
diff --git a/src/.config/awesome/configuration/awspawn b/src/.config/awesome/configuration/utils/autostart
similarity index 84%
rename from src/.config/awesome/configuration/awspawn
rename to src/.config/awesome/configuration/utils/autostart
index be2130f..eb626fb 100755
--- a/src/.config/awesome/configuration/awspawn
+++ b/src/.config/awesome/configuration/utils/autostart
@@ -6,15 +6,11 @@
# Only add applications/scripts without parameters here
# (if you want to apply parameters then use a script file!)
-# List of applications to run
-# the script $HOME/.config/awesomestart
-# is intended to be a copy of this file
-# to allow out of tree autostart programs
APPS=(
# keepassxc
# kdeconnect-indicator
radeon-profile
- $HOME/.config/awesomestart
+ $HOME/.config/utils/awesomestart
)
# Some applications start child applications that need to be killed on reload
KILL=(
diff --git a/src/.config/awesome/configuration/utils/rofi-power b/src/.config/awesome/configuration/utils/rofi-power
index 8674f38..b626d30 100755
--- a/src/.config/awesome/configuration/utils/rofi-power
+++ b/src/.config/awesome/configuration/utils/rofi-power
@@ -5,11 +5,11 @@
# 2016 Oliver Kraitschy - http://okraits.de
-OPTIONS="Power-off\nExit\nReboot\nSuspend\nHibernate"
+OPTIONS="Poweroff\nExit\nReboot\nSuspend\nHibernate"
config_path=$(dirname "$0")
-LAUNCHER="rofi -dmenu -show-icons -icon-theme papirus -theme $config_path/../rofi.rasi"
+LAUNCHER="rofi -dmenu -i"
USE_LOCKER="false"
LOCKER="i3lock-fancy"
@@ -21,7 +21,7 @@ case $option in
Reboot)
systemctl reboot
;;
- Power-off)
+ Poweroff)
systemctl poweroff
;;
Suspend)
diff --git a/src/.config/awesome/layout/bottom-bar.lua b/src/.config/awesome/layout/bottom-bar.lua
new file mode 100644
index 0000000..e42731e
--- /dev/null
+++ b/src/.config/awesome/layout/bottom-bar.lua
@@ -0,0 +1,37 @@
+local beautiful = require('beautiful')
+local wibox = require('wibox')
+local TaskList = require('widget.task-list')
+local dpi = require('beautiful').xresources.apply_dpi
+
+local BottomBar = function(s, offset)
+
+ -- BOTTOM BAR
+ -- =======
+ local panel_height = dpi(16)
+ local panel = wibox({
+ ontop = false,
+ screen = s,
+ height = panel_height,
+ width = s.geometry.width,
+ x = s.geometry.x,
+ y = s.geometry.height - panel_height,
+ stretch = false,
+ bg = beautiful.primary.hue_100,
+ fg = beautiful.fg_normal,
+ })
+
+ panel:struts({
+ bottom = panel.height
+ })
+
+ panel:setup{
+ layout = wibox.layout.align.horizontal,
+ nil,
+ TaskList(s),
+ nil,
+ }
+
+ return panel
+end
+
+return BottomBar
diff --git a/src/.config/awesome/layout/init.lua b/src/.config/awesome/layout/init.lua
index 5111828..34386d5 100644
--- a/src/.config/awesome/layout/init.lua
+++ b/src/.config/awesome/layout/init.lua
@@ -1,5 +1,6 @@
local awful = require('awful')
local top_bar = require('layout.top-bar')
+local bottom_bar = require('layout.bottom-bar')
local key_grabber
@@ -7,8 +8,10 @@ local key_grabber
awful.screen.connect_for_each_screen(function(s)
if s.index == 1 then
s.top_bar = top_bar(s, true)
+ s.bottom_bar = bottom_bar(s, true)
else
s.top_bar = top_bar(s, false)
+ s.bottom_bar = bottom_bar(s, false)
end
end)
@@ -18,6 +21,7 @@ function updateBarsVisibility()
if s.selected_tag then
local fullscreen = s.selected_tag.fullscreenMode
s.top_bar.visible = not fullscreen
+ s.bottom_bar.visible = not fullscreen
end
end
end
diff --git a/src/.config/awesome/layout/top-bar.lua b/src/.config/awesome/layout/top-bar.lua
index 3fd5a36..180b0ff 100644
--- a/src/.config/awesome/layout/top-bar.lua
+++ b/src/.config/awesome/layout/top-bar.lua
@@ -2,86 +2,167 @@ local awful = require('awful')
local beautiful = require('beautiful')
local clickable_container = require('widget.material.clickable-container')
local mat_icon_button = require('widget.material.icon-button')
+local separators = require('widget.material.separator')
+local markup = require('widget.material.markup')
local wibox = require('wibox')
local TagList = require('widget.tag-list')
-local TaskList = require('widget.task-list')
local gears = require('gears')
-local icons = require('theme.icons')
local dpi = require('beautiful').xresources.apply_dpi
+local table = awful.util.table or gears.table
-local separator = wibox.widget {
- orientation = 'vertical',
- forced_width = dpi(2),
- opacity = 0.5,
- widget = wibox.widget.separator
-}
+-- Separators
+local arrow = separators.arrow_left
+local function create_arrow(mywidget, bgcolor, fgcolor)
+ return (wibox.container.background(
+ wibox.widget {
+ arrow(fgcolor, bgcolor),
+ mywidget,
+ arrow(bgcolor, fgcolor),
+ spacing = dpi(4),
+ layout = wibox.layout.fixed.horizontal
+ },
+ bgcolor
+ )
+)
+end
+
+-- Create Icons
+local function create_icon(label, icon_color)
+ return (wibox.widget {
+ wibox.widget{
+ text = label,
+ font = beautiful.icon_font,
+ widget = wibox.widget.textbox
+ },
+ fg = icon_color,
+ widget = wibox.container.background
+ })
+end
local TopBar = function(s, offset)
-- LAYOUT BOX
-- ==========
- local LayoutBox = require('widget.layoutbox')
+ local function update_txt_layoutbox(s)
+ -- Writes a string representation of the current layout in a textbox widget
+ local txt_l = beautiful["layout_txt_" .. awful.layout.getname(awful.layout.get(s))] or ""
+ s.layoutbox:set_text(txt_l)
+ end
- -- BATTERY
- -- =======
- local battery_widget = require('widget.battery')
+ s.layoutbox = wibox.widget.textbox(beautiful["layout_txt_" .. awful.layout.getname(awful.layout.get(s))])
+ s.layoutbox.font = beautiful.icon_font
+ awful.tag.attached_connect_signal(s, "property::selected", function () update_txt_layoutbox(s) end)
+ awful.tag.attached_connect_signal(s, "property::layout", function () update_txt_layoutbox(s) end)
+ s.layoutbox:buttons(table.join(
+ awful.button({}, 1, function() awful.layout.inc(1) end),
+ awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end),
+ awful.button({}, 3, function() awful.layout.inc(-1) end),
+ awful.button({}, 4, function() awful.layout.inc(1) end),
+ awful.button({}, 5, function() awful.layout.inc(-1) end)))
-- SYSTEM TRAY
-- ===========
local systray = wibox.widget.systray()
systray:set_horizontal(true)
- -- TASK LIST
- -- =========
- local task_list = wibox.widget {
- nil,
- wibox.container.margin(TaskList(s), dpi(2), dpi(2), dpi(3), dpi(3)),
- nil,
- layout = wibox.layout.align.horizontal
- }
-
-- SYSTEM DETAILS
-- ==============
- local volume_widget = require('widget.volume.volume-percentage')
- local date_widget = require('widget.date')
+ local volume_widget = require('widget.volume')
+ local battery_widget = require('widget.battery')
local clock_widget = require('widget.clock')
local mem_widget = require('widget.memory')
local cpu_widget = require('widget.cpu')
+ local temprature_widget = require('widget.temprature')
+ local storage_widget = require('widget.storage')
+ local net = require('widget.net')
+ local net_sent = net({
+ settings = function()
+ widget:set_markup(markup.font(beautiful.font, net_now.sent))
+ end
+ })
+ local net_recieved = net({
+ settings = function()
+ widget:set_markup(markup.font(beautiful.font, net_now.received))
+ end
+ })
local system_details = wibox.widget {
- wibox.widget {
- wibox.container.background(systray, beautiful.primary.hue_800),
- wibox.container.background(battery_widget, beautiful.primary.hue_800),
- separator,
- wibox.container.background(mem_widget, beautiful.primary.hue_800),
- separator,
- wibox.container.background(cpu_widget, beautiful.primary.hue_800),
- separator,
- wibox.container.background(volume_widget, beautiful.primary.hue_800),
- separator,
- wibox.container.background(date_widget, beautiful.primary.hue_800),
- separator,
- wibox.container.background(clock_widget, beautiful.primary.hue_800),
+ -- Systray
+ systray,
+ create_arrow(nil, beautiful.primary.hue_200, beautiful.primary.hue_100),
+ -- Internet Speed
+ wibox.widget{
+ create_icon('', beautiful.accent.hue_200),
+ net_sent.widget,
+ create_icon('', beautiful.accent.hue_300),
+ net_recieved.widget,
+ spacing = dpi(4),
+ layout = wibox.layout.fixed.horizontal
+ },
+ -- Battery
+ create_arrow (battery_widget, beautiful.primary.hue_200, beautiful.primary.hue_100),
+ -- Memory
+ create_icon('', beautiful.accent.hue_500),
+ mem_widget,
+ -- CPU
+ create_arrow(wibox.widget{
+ create_icon('', beautiful.accent.hue_600),
+ cpu_widget,
+ spacing = dpi(4),
+ layout = wibox.layout.fixed.horizontal
+ }, beautiful.primary.hue_200, beautiful.primary.hue_100),
+ -- Temprature
+ wibox.widget{
+ create_icon('﨎', beautiful.accent.hue_400),
+ temprature_widget,
+ spacing = dpi(4),
+ layout = wibox.layout.fixed.horizontal
+ },
+ -- Volume
+ create_arrow(volume_widget, beautiful.primary.hue_200, beautiful.primary.hue_100),
+ -- Storage
+ wibox.widget{
+ create_icon('', beautiful.accent.hue_200),
+ storage_widget,
+ spacing = dpi(4),
+ layout = wibox.layout.fixed.horizontal
+ },
+ wibox.widget{
+ -- Calendar / Clock
+ create_arrow(wibox.widget{
+ create_icon('', beautiful.accent.hue_400),
+ clock_widget,
+ spacing = dpi(4),
+ layout = wibox.layout.fixed.horizontal
+ }, beautiful.primary.hue_200, beautiful.primary.hue_100),
+ -- Layout
+ wibox.widget {
+ arrow(beautiful.primary.hue_100, beautiful.accent.hue_200),
+ wibox.widget{
+ wibox.container.margin(s.layoutbox, dpi(4), dpi(4), dpi(0), dpi(0)),
+ fg = beautiful.primary.hue_100,
+ bg = beautiful.accent.hue_200,
+ widget = wibox.container.background
+ },
+ layout = wibox.layout.fixed.horizontal
+ },
+ layout = wibox.layout.fixed.horizontal,
+ },
+ spacing = dpi(4),
layout = wibox.layout.fixed.horizontal
- },
- bg = beautiful.primary.hue_900,
- widget = wibox.container.background
- }
-
- local calendar = require('widget.calendar')
- calendar:attach(date_widget)
+ }
-- TOP BAR
-- =======
local panel = wibox({
ontop = false,
screen = s,
- height = dpi(24),
+ height = dpi(20),
width = s.geometry.width,
x = s.geometry.x,
y = s.geometry.y,
stretch = false,
- bg = beautiful.primary.hue_900,
- fg = beautiful.fg_normal
+ bg = beautiful.primary.hue_100,
+ fg = beautiful.fg_normal,
})
panel:struts({
@@ -90,14 +171,9 @@ local TopBar = function(s, offset)
panel:setup{
layout = wibox.layout.align.horizontal,
- spacing = dpi(0),
TagList(s),
- task_list,
- wibox.widget {
- wibox.container.margin(system_details, dpi(2), dpi(2), dpi(3), dpi(3)),
- LayoutBox(s),
- layout = wibox.layout.fixed.horizontal
- }
+ nil,
+ system_details,
}
return panel
diff --git a/src/.config/awesome/module/quake-terminal.lua b/src/.config/awesome/module/splash-terminal.lua
similarity index 50%
rename from src/.config/awesome/module/quake-terminal.lua
rename to src/.config/awesome/module/splash-terminal.lua
index 90ce5f3..b522970 100644
--- a/src/.config/awesome/module/quake-terminal.lua
+++ b/src/.config/awesome/module/splash-terminal.lua
@@ -1,5 +1,5 @@
local awful = require('awful')
-local app = require('configuration.apps').default.quake
+local app = require('configuration.apps').default.splash
local dpi = require('beautiful').xresources.apply_dpi
local beautiful = require('beautiful')
local screen = awful.screen.focused()
@@ -7,42 +7,56 @@ local screen = awful.screen.focused()
-- Theme
beautiful.init(require('theme'))
-local quake_id = 'notnil'
-local quake_client
+local splash_id = 'notnil'
+local splash_client
local opened = false
+
function create_shell()
- quake_id = awful.spawn.with_shell("exec -a QuakeTerminal " .. app)
+ splash_id = awful.spawn.with_shell(app)
end
-function open_quake()
- quake_client.hidden = false
+-- Dirty hack to prevent splash from showing up in occupied tags
+function _splash_to_current_tag()
+ if splash_client then
+ splash_client:move_to_tag(screen.selected_tag)
+ end
end
-function close_quake()
- quake_client.hidden = true
+function open_splash()
+ splash_client.hidden = false
end
-toggle_quake = function()
+function close_splash()
+ splash_client.hidden = true
+end
+
+toggle_splash_height = function()
+ if splash_client and opened then
+ splash_client.maximized_vertical = not splash_client.maximized_vertical
+ end
+end
+
+toggle_splash = function()
opened = not opened
- if not quake_client then
+ if not splash_client then
create_shell()
else
if opened then
- open_quake()
- client.focus = quake_client
- quake_client:raise()
+ open_splash()
+ client.focus = splash_client
+ splash_client:raise()
else
- close_quake()
+ close_splash()
end
end
end
_G.client.connect_signal('manage', function(c)
- if (c.pid == quake_id) then
- quake_client = c
+ if (c.pid == splash_id) then
+ splash_client = c
c.x = c.screen.geometry.x
c.height = (c.screen.geometry.height / 5) * 3
- c.y = c.screen.geometry.height - c.height - beautiful.border_width
+ c.y = c.screen.geometry.height - c.height - beautiful.border_width - dpi(16)
c.floating = true
c.skip_taskbar = true
c.skip_decoration = true
@@ -50,17 +64,16 @@ _G.client.connect_signal('manage', function(c)
c.floating = true
c.above = true
c.sticky = true
- c.type = 'dock'
+ c.type = 'splash'
c.hidden = not opened
- c.maximized_horizontal = true
c.border_width = beautiful.border_width
- c:move_to_tag(screen.tags[3])
+ c.maximized_horizontal = true
end
end)
_G.client.connect_signal('unmanage', function(c)
- if (c.pid == quake_id) then
+ if (c.pid == splash_id) then
opened = false
- quake_client = nil
+ splash_client = nil
end
end)
diff --git a/src/.config/awesome/rc.lua b/src/.config/awesome/rc.lua
index d2ba9d7..5f333e8 100644
--- a/src/.config/awesome/rc.lua
+++ b/src/.config/awesome/rc.lua
@@ -14,29 +14,13 @@ require('layout')
require('module.notifications')
require('module.auto-start')
require('module.decorate-client')
-require('module.quake-terminal')
+require('module.splash-terminal')
-- Setup all configurations
require('configuration.client')
require('configuration.tags')
_G.root.keys(require('configuration.keys.global'))
--- Create a wibox for each screen and add it
-awful.screen.connect_for_each_screen(function(s)
- -- If wallpaper is a function, call it with the screen
- if beautiful.wallpaper then
- if type(beautiful.wallpaper) == "string" then
- if beautiful.wallpaper:sub(1, #"#") == "#" then
- gears.wallpaper.set(beautiful.wallpaper)
- elseif beautiful.wallpaper:sub(1, #"/") == "/" then
- gears.wallpaper.maximized(beautiful.wallpaper, s)
- end
- else
- beautiful.wallpaper(s)
- end
- end
-end)
-
-- Signal function to execute when a new client appears.
_G.client.connect_signal('manage', function(c)
-- Set the windows at the slave,
@@ -52,9 +36,9 @@ _G.client.connect_signal('manage', function(c)
end)
-- Enable sloppy focus, so that focus follows mouse.
--- _G.client.connect_signal('mouse::enter', function(c)
--- c:emit_signal('request::activate', 'mouse_enter', {raise = true})
--- end)
+_G.client.connect_signal('mouse::enter', function(c)
+ c:emit_signal('request::activate', 'mouse_enter', {raise = true})
+end)
-- Make the focused window have a glowing border
_G.client.connect_signal('focus', function(c)
@@ -63,3 +47,4 @@ end)
_G.client.connect_signal('unfocus', function(c)
c.border_color = beautiful.border_normal
end)
+
diff --git a/src/.config/awesome/requirements/fonts/Fira Code Bold Nerd Font Complete Mono.ttf b/src/.config/awesome/requirements/fonts/Fira Code Bold Nerd Font Complete Mono.ttf
deleted file mode 100644
index 6ad2054..0000000
Binary files a/src/.config/awesome/requirements/fonts/Fira Code Bold Nerd Font Complete Mono.ttf and /dev/null differ
diff --git a/src/.config/awesome/requirements/fonts/Fira Code Light Nerd Font Complete Mono.ttf b/src/.config/awesome/requirements/fonts/Fira Code Light Nerd Font Complete Mono.ttf
deleted file mode 100644
index 29beae2..0000000
Binary files a/src/.config/awesome/requirements/fonts/Fira Code Light Nerd Font Complete Mono.ttf and /dev/null differ
diff --git a/src/.config/awesome/requirements/fonts/Fira Code Medium Nerd Font Complete Mono.ttf b/src/.config/awesome/requirements/fonts/Fira Code Medium Nerd Font Complete Mono.ttf
deleted file mode 100644
index bcbb90e..0000000
Binary files a/src/.config/awesome/requirements/fonts/Fira Code Medium Nerd Font Complete Mono.ttf and /dev/null differ
diff --git a/src/.config/awesome/requirements/fonts/Fira Code Regular Nerd Font Complete Mono.ttf b/src/.config/awesome/requirements/fonts/Fira Code Regular Nerd Font Complete Mono.ttf
deleted file mode 100644
index c1073e3..0000000
Binary files a/src/.config/awesome/requirements/fonts/Fira Code Regular Nerd Font Complete Mono.ttf and /dev/null differ
diff --git a/src/.config/awesome/theme/color-schemes.lua b/src/.config/awesome/theme/color-schemes.lua
index 256038d..0fb7617 100644
--- a/src/.config/awesome/theme/color-schemes.lua
+++ b/src/.config/awesome/theme/color-schemes.lua
@@ -1,15 +1,50 @@
return {
- -- Dracula
dracula = {
- hue_50 = '#f8f8f2',
- hue_100 = '#f1fa8c',
- hue_200 = '#50fa7b',
- hue_300 = '#8be9fd',
- hue_400 = '#ff5555',
- hue_500 = '#6272a4',
- hue_600 = '#ff79c6',
- hue_700 = '#ffb86c',
- hue_800 = '#44475a',
- hue_900 = '#282a36'
+ primary = {
+ hue_100 = '#282a36',
+ hue_200 = '#44475a'
+ },
+ accent = {
+ hue_100 = '#f1fa8c',
+ hue_200 = '#50fa7b',
+ hue_300 = '#8be9fd',
+ hue_400 = '#ff5555',
+ hue_500 = '#6272a4',
+ hue_600 = '#ff79c6',
+ hue_700 = '#ffb86c',
+ hue_800 = '#f8f8f2',
+ }
+ },
+ gruvbox = {
+ primary = {
+ hue_100 = '#282828',
+ hue_200 = '#3c3c3c'
+ },
+ accent = {
+ hue_100 = '#fe8019',
+ hue_200 = '#fabd2f',
+ hue_300 = '#8ec07c',
+ hue_400 = '#fb4934',
+ hue_500 = '#d3869b',
+ hue_600 = '#b8bb26',
+ hue_700 = '#458588',
+ hue_800 = '#fbf1c7',
+ }
+ },
+ gruvbox_material = {
+ primary = {
+ hue_100 = '#212121',
+ hue_200 = '#3c3c3c'
+ },
+ accent = {
+ hue_100 = '#e1be7f',
+ hue_200 = '#92c96a',
+ hue_300 = '#66aeea',
+ hue_400 = '#f35a5a',
+ hue_500 = '#4083bc',
+ hue_600 = '#c57cda',
+ hue_700 = '#cd996a',
+ hue_800 = '#d6d6d6',
+ }
}
}
diff --git a/src/.config/awesome/theme/theme.lua b/src/.config/awesome/theme/theme.lua
index 65411b0..ab60b40 100644
--- a/src/.config/awesome/theme/theme.lua
+++ b/src/.config/awesome/theme/theme.lua
@@ -4,53 +4,54 @@ local theme_dir = filesystem.get_configuration_dir() .. '/theme'
local gears = require('gears')
local dpi = require('beautiful').xresources.apply_dpi
local theme = {}
-theme.icons = theme_dir .. '/icons/'
--- Primary Color Scheme
-theme.primary = color_schemes.dracula
+-- Color Scheme
+theme.primary = color_schemes.gruvbox.primary
+theme.accent = color_schemes.gruvbox.accent
local awesome_overrides = function(theme)
theme.dir = os.getenv('HOME') .. '/.config/awesome/theme'
theme.icons = theme.dir .. '/icons/'
- theme.wallpaper = theme.dir .. '/wallpapers/4.png' -- Can be replaced with a color (eg: '#e0e0e0')
- theme.font = 'FiraCode Nerd Font Mono bold 9'
+ theme.font = 'Robotomono nerd font bold 9' -- Glyphs don't work properly with this (#442)
+ theme.icon_font = 'furamono nerd font 11' -- Fira mono patched version
- -- Layout
- theme.layout_max = theme.icons .. 'layouts/arrow-expand-all.png'
- theme.layout_tile = theme.icons .. 'layouts/view-quilt.png'
- theme.layout_floating = theme.icons .. 'layouts/floating.png'
+ -- Layout icons
+ theme.layout_txt_tile = "舘"
+ theme.layout_txt_max = ""
+ theme.layout_txt_floating = ""
-- Taglist
theme.taglist_font = theme.font
- theme.taglist_bg_empty = theme.primary.hue_900
- theme.taglist_bg_occupied = 'linear:0,0:0,' .. dpi(32) .. ':0,' .. theme.primary.hue_800 .. ':0.1,' ..
- theme.primary.hue_800 .. ':0.1,' .. theme.primary.hue_900 .. ':0.9,' ..
- theme.primary.hue_900
- theme.taglist_bg_urgent = 'linear:0,0:0,' .. dpi(48) .. ':0,' .. theme.primary.hue_700 .. ':0.07,' ..
- theme.primary.hue_700 .. ':0.07,' .. theme.primary.hue_900 .. ':1,' ..
- theme.primary.hue_900
- theme.taglist_bg_focus = theme.primary.hue_200
- theme.taglist_fg_focus = theme.primary.hue_900
+ theme.taglist_bg_empty = theme.primary.hue_100
+ theme.taglist_bg_occupied = 'linear:0,0:0,' .. dpi(32) .. ':0,' ..
+ theme.primary.hue_200 .. ':0.1,' ..
+ theme.primary.hue_200 .. ':0.1,' ..
+ theme.primary.hue_100 .. ':0.9,' ..
+ theme.primary.hue_100
+ theme.taglist_bg_urgent = 'linear:0,0:0,' .. dpi(48) .. ':0,' ..
+ theme.accent.hue_700 .. ':0.07,' ..
+ theme.accent.hue_700 .. ':0.07,' ..
+ theme.primary.hue_100 .. ':1,' ..
+ theme.primary.hue_100
+ theme.taglist_bg_focus = theme.accent.hue_200
+ theme.taglist_fg_focus = theme.primary.hue_100
-- Tasklist
theme.tasklist_font = theme.font
- theme.tasklist_bg_normal = theme.primary.hue_900
- theme.tasklist_bg_focus = theme.primary.hue_800
- theme.tasklist_bg_urgent = theme.primary.hue_900
+ theme.tasklist_bg_normal = theme.primary.hue_200
+ theme.tasklist_bg_focus = theme.primary.hue_100
+ theme.tasklist_bg_urgent = theme.primary.hue_200
-- Icons
theme.icon_theme = 'Papirus'
-- Client
- theme.gaps = dpi(4)
+ theme.gaps = dpi(2)
theme.border_width = dpi(2)
- theme.border_focus = theme.primary.hue_200
- theme.border_normal = theme.primary.hue_900
- theme.bg_normal = theme.primary.hue_900
- theme.bg_systray = theme.primary.hue_800
+ theme.border_focus = theme.accent.hue_200
+ theme.border_normal = theme.primary.hue_100
+ theme.gap_single_client = false
+ theme.bg_normal = theme.primary.hue_100
end
-return {
- theme = theme,
- awesome_overrides = awesome_overrides
-}
+return {theme = theme, awesome_overrides = awesome_overrides}
diff --git a/src/.config/awesome/widget/battery/init.lua b/src/.config/awesome/widget/battery.lua
similarity index 50%
rename from src/.config/awesome/widget/battery/init.lua
rename to src/.config/awesome/widget/battery.lua
index 46dea96..beeaeb3 100644
--- a/src/.config/awesome/widget/battery/init.lua
+++ b/src/.config/awesome/widget/battery.lua
@@ -7,53 +7,27 @@
-- @copyright 2017 Pavel Makhov
-------------------------------------------------
local awful = require('awful')
-local naughty = require('naughty')
local watch = require('awful.widget.watch')
local wibox = require('wibox')
-local clickable_container = require('widget.material.clickable-container')
-local gears = require('gears')
+local beautiful = require('beautiful')
local dpi = require('beautiful').xresources.apply_dpi
-local apps = require('configuration.apps')
-- acpi sample outputs
-- Battery 0: Discharging, 75%, 01:51:38 remaining
-- Battery 0: Charging, 53%, 00:57:43 until charged
-local HOME = os.getenv('HOME')
-local PATH_TO_ICONS = HOME .. '/.config/awesome/widget/battery/icons/'
local percentage = wibox.widget.textbox()
+local battery_icon = wibox.widget.textbox()
+battery_icon.font = beautiful.icon_font
-local widget = wibox.widget {
- {
- id = 'icon',
- widget = wibox.widget.imagebox,
- resize = true
- },
- layout = wibox.layout.fixed.horizontal
-}
-
-local battery_widget = wibox.widget {
- wibox.container.margin(widget, dpi(4), dpi(4), dpi(3), dpi(3)),
- wibox.container.margin(percentage, dpi(0), dpi(4), dpi(4), dpi(4)),
- layout = wibox.layout.fixed.horizontal
-}
-
--- Alternative to naughty.notify - tooltip. You can compare both and choose the preferred one
local battery_popup = awful.tooltip({
- objects = {battery_widget},
+ objects = {percentage},
mode = 'outside',
align = 'left',
preferred_positions = {'right', 'left', 'top', 'bottom'}
})
--- To use colors from beautiful theme put
--- following lines in rc.lua before require("battery"):
--- beautiful.tooltip_fg = beautiful.fg_normal
--- beautiful.tooltip_bg = beautiful.bg_normal
-
-watch('acpi -i', 1, function(_, stdout)
- local batteryIconName = 'battery'
-
+watch('acpi -i', 10, function(_, stdout)
local battery_info = {}
local capacities = {}
for s in stdout:gmatch('[^\r\n]+') do
@@ -86,22 +60,61 @@ watch('acpi -i', 1, function(_, stdout)
end
charge = charge / capacity
- if status == 'Charging' or status == 'Full' then
- batteryIconName = batteryIconName .. '-charging'
- end
-
- local roundedCharge = math.floor(charge / 10) * 10
- if (roundedCharge == 0) then
- batteryIconName = batteryIconName .. '-outline'
- elseif (roundedCharge ~= 100) then
- batteryIconName = batteryIconName .. '-' .. roundedCharge
- end
-
- widget.icon:set_image(PATH_TO_ICONS .. batteryIconName .. '.svg')
- -- Update popup text
battery_popup.text = string.gsub(stdout, '\n$', '')
percentage.text = math.floor(charge)
- collectgarbage('collect')
-end, widget)
-return battery_widget
+ if status == 'Charging' then
+ battery_icon.text = ''
+ if math.floor(charge) <= 20 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 30 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 40 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 60 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 80 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 90 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 100 then
+ battery_icon.text = ''
+ end
+ elseif status == 'Full' then
+ battery_icon.text = ''
+ else
+ if math.floor(charge) <= 10 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 20 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 30 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 40 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 50 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 60 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 60 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 80 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 90 then
+ battery_icon.text = ''
+ elseif math.floor(charge) <= 100 then
+ battery_icon.text = ''
+ end
+ end
+ collectgarbage('collect')
+end)
+
+return wibox.widget {
+ wibox.widget{
+ battery_icon,
+ fg = beautiful.accent.hue_300,
+ widget = wibox.container.background
+ },
+ percentage,
+ spacing = dpi(4),
+ layout = wibox.layout.fixed.horizontal
+}
diff --git a/src/.config/awesome/widget/clock.lua b/src/.config/awesome/widget/clock.lua
new file mode 100644
index 0000000..7f48431
--- /dev/null
+++ b/src/.config/awesome/widget/clock.lua
@@ -0,0 +1,5 @@
+local wibox = require('wibox')
+local beautiful = require('beautiful')
+
+local clock = wibox.widget.textclock('%d/%m %a %H:%M')
+return clock
diff --git a/src/.config/awesome/widget/cpu/init.lua b/src/.config/awesome/widget/cpu.lua
similarity index 58%
rename from src/.config/awesome/widget/cpu/init.lua
rename to src/.config/awesome/widget/cpu.lua
index 8096ac0..67cd77a 100644
--- a/src/.config/awesome/widget/cpu/init.lua
+++ b/src/.config/awesome/widget/cpu.lua
@@ -1,20 +1,9 @@
local wibox = require('wibox')
local beautiful = require('beautiful')
-local icons = require('theme.icons')
local dpi = require('beautiful').xresources.apply_dpi
local watch = require('awful.widget.watch')
-local icon = wibox.widget {
- wibox.widget {
- image = icons.cpu,
- widget = wibox.widget.imagebox
- },
- top = dpi(3),
- bottom = dpi(3),
- widget = wibox.container.margin
-}
-
-local percentage = wibox.widget.textbox()
+local cpu = wibox.widget.textbox()
local total_prev = 0
local idle_prev = 0
@@ -28,17 +17,12 @@ watch([[bash -c "cat /proc/stat | grep '^cpu '"]], 1, function(_, stdout)
local diff_total = total - total_prev
local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10
- percentage.text = math.floor(diff_usage) .. '%'
+ cpu.text = math.floor(diff_usage) .. '%'
+ if diff_usage < 10 then cpu.text = '0' .. cpu.text end
total_prev = total
idle_prev = idle
collectgarbage('collect')
end)
-local cpu_widget = wibox.widget {
- icon,
- wibox.container.margin(percentage, dpi(4), dpi(4), dpi(4), dpi(4)),
- layout = wibox.layout.fixed.horizontal
-}
-
-return wibox.container.margin(cpu_widget, dpi(4), dpi(4))
+return cpu
diff --git a/src/.config/awesome/widget/material/clickable-container.lua b/src/.config/awesome/widget/material/clickable-container.lua
index bcb09e5..1b466db 100644
--- a/src/.config/awesome/widget/material/clickable-container.lua
+++ b/src/.config/awesome/widget/material/clickable-container.lua
@@ -1,8 +1,12 @@
local wibox = require('wibox')
-function build(widget)
+function build(widget, label)
local container = wibox.widget {
- widget,
+ -- widget,
+ wibox.widget {
+ text = label,
+ widget = wibox.widget.textbox,
+ },
widget = wibox.container.background
}
local old_cursor, old_wibox
diff --git a/src/.config/awesome/widget/material/markup.lua b/src/.config/awesome/widget/material/markup.lua
new file mode 100644
index 0000000..19d0da2
--- /dev/null
+++ b/src/.config/awesome/widget/material/markup.lua
@@ -0,0 +1,59 @@
+-- Adopted from: https://github.com/lcpz/lain
+
+local format = string.format
+local setmetatable = setmetatable
+
+-- Lain markup util submodule
+-- lain.util.markup
+local markup = { fg = {}, bg = {} }
+
+-- Convenience tags
+function markup.bold(text) return format("%s", text) end
+function markup.italic(text) return format("%s", text) end
+function markup.strike(text) return format("%s", text) end
+function markup.underline(text) return format("%s", text) end
+function markup.monospace(text) return format("%s", text) end
+function markup.big(text) return format("%s", text) end
+function markup.small(text) return format("%s", text) end
+
+-- Set the font
+function markup.font(font, text)
+ return format("%s", font, text)
+end
+
+-- Set the foreground
+function markup.fg.color(color, text)
+ return format("%s", color, text)
+end
+
+-- Set the background
+function markup.bg.color(color, text)
+ return format("%s", color, text)
+end
+
+-- Set foreground and background
+function markup.color(fg, bg, text)
+ return format("%s", fg, bg, text)
+end
+
+-- Set font and foreground
+function markup.fontfg(font, fg, text)
+ return format("%s", font, fg, text)
+end
+
+-- Set font and background
+function markup.fontbg(font, bg, text)
+ return format("%s", font, bg, text)
+end
+
+-- Set font, foreground and background
+function markup.fontcolor(font, fg, bg, text)
+ return format("%s", font, fg, bg, text)
+end
+
+-- link markup.{fg,bg}(...) calls to markup.{fg,bg}.color(...)
+setmetatable(markup.fg, { __call = function(_, ...) return markup.fg.color(...) end })
+setmetatable(markup.bg, { __call = function(_, ...) return markup.bg.color(...) end })
+
+-- link markup(...) calls to markup.fg.color(...)
+return setmetatable(markup, { __call = function(_, ...) return markup.fg.color(...) end })
\ No newline at end of file
diff --git a/src/.config/awesome/widget/material/separator.lua b/src/.config/awesome/widget/material/separator.lua
new file mode 100644
index 0000000..2098d38
--- /dev/null
+++ b/src/.config/awesome/widget/material/separator.lua
@@ -0,0 +1,111 @@
+-- Adopted from: https://github.com/lcpz/lain/
+
+local wibox = require("wibox")
+local gears = require("gears")
+
+-- Lain Cairo separators util submodule
+-- lain.util.separators
+local separators = { height = 0, width = 9 }
+
+-- [[ Arrow
+
+-- Right
+function separators.arrow_right(col1, col2)
+ local widget = wibox.widget.base.make_widget()
+ widget.col1 = col1
+ widget.col2 = col2
+
+ widget.fit = function(_, _, _)
+ return separators.width, separators.height
+ end
+
+ widget.update = function(_, _)
+ widget.col1 = col1
+ widget.col2 = col2
+ widget:emit_signal("widget::redraw_needed")
+ end
+
+ widget.draw = function(_, _, cr, width, height)
+ if widget.col2 ~= "alpha" then
+ cr:set_source_rgba(gears.color.parse_color(widget.col2))
+ cr:new_path()
+ cr:move_to(0, 0)
+ cr:line_to(width, height/2)
+ cr:line_to(width, 0)
+ cr:close_path()
+ cr:fill()
+
+ cr:new_path()
+ cr:move_to(0, height)
+ cr:line_to(width, height/2)
+ cr:line_to(width, height)
+ cr:close_path()
+ cr:fill()
+ end
+
+ if widget.col1 ~= "alpha" then
+ cr:set_source_rgba(gears.color.parse_color(widget.col1))
+ cr:new_path()
+ cr:move_to(0, 0)
+ cr:line_to(width, height/2)
+ cr:line_to(0, height)
+ cr:close_path()
+ cr:fill()
+ end
+ end
+
+ return widget
+end
+
+-- Left
+function separators.arrow_left(col1, col2)
+ local widget = wibox.widget.base.make_widget()
+ widget.col1 = col1
+ widget.col2 = col2
+
+ widget.fit = function(_, _, _)
+ return separators.width, separators.height
+ end
+
+ widget.update = function(c1, c2)
+ widget.col1 = c1
+ widget.col2 = c2
+ widget:emit_signal("widget::redraw_needed")
+ end
+
+ widget.draw = function(_, _, cr, width, height)
+ if widget.col1 ~= "alpha" then
+ cr:set_source_rgba(gears.color.parse_color(widget.col1))
+ cr:new_path()
+ cr:move_to(width, 0)
+ cr:line_to(0, height/2)
+ cr:line_to(0, 0)
+ cr:close_path()
+ cr:fill()
+
+ cr:new_path()
+ cr:move_to(width, height)
+ cr:line_to(0, height/2)
+ cr:line_to(0, height)
+ cr:close_path()
+ cr:fill()
+ end
+
+ if widget.col2 ~= "alpha" then
+ cr:new_path()
+ cr:move_to(width, 0)
+ cr:line_to(0, height/2)
+ cr:line_to(width, height)
+ cr:close_path()
+
+ cr:set_source_rgba(gears.color.parse_color(widget.col2))
+ cr:fill()
+ end
+ end
+
+ return widget
+end
+
+-- ]]
+
+return separators
diff --git a/src/.config/awesome/widget/material/slider.lua b/src/.config/awesome/widget/material/slider.lua
index cc34efc..9dfe756 100644
--- a/src/.config/awesome/widget/material/slider.lua
+++ b/src/.config/awesome/widget/material/slider.lua
@@ -79,8 +79,8 @@ local function new(args)
forced_height = dpi(6),
paddings = 0,
shape = gears.shape.rounded_rect,
- background_color = beautiful.primary.hue_900,
- color = beautiful.primary.hue_400,
+ background_color = beautiful.primary.hue_100,
+ color = beautiful.accent.hue_400,
widget = wibox.widget.progressbar
}
@@ -88,8 +88,8 @@ local function new(args)
forced_height = dpi(8),
bar_shape = gears.shape.rounded_rect,
bar_height = 0,
- bar_color = beautiful.primary.hue_500,
- handle_color = beautiful.primary.hue_300,
+ bar_color = beautiful.accent.hue_500,
+ handle_color = beautiful.accent.hue_300,
handle_shape = gears.shape.circle,
handle_border_color = '#00000012',
handle_border_width = dpi(3),
diff --git a/src/.config/awesome/widget/memory.lua b/src/.config/awesome/widget/memory.lua
new file mode 100644
index 0000000..9260f65
--- /dev/null
+++ b/src/.config/awesome/widget/memory.lua
@@ -0,0 +1,21 @@
+local wibox = require('wibox')
+local beautiful = require('beautiful')
+local watch = require('awful.widget.watch')
+
+local memory = wibox.widget.textbox()
+memory.font = beautiful.font
+
+function round(exact, quantum)
+ local quant,frac = math.modf(exact/quantum)
+ return quantum * (quant + (frac > 0.5 and 1 or 0))
+end
+
+watch('bash -c "free | grep -z Mem.*Swap.*"', 1, function(_, stdout)
+ local total, used, free, shared, buff_cache, available, total_swap, used_swap, free_swap =
+ stdout:match('(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*Swap:%s*(%d+)%s*(%d+)%s*(%d+)')
+
+ memory.text = round((used / 1048576), 0.01) .. 'GB'
+ collectgarbage('collect')
+end)
+
+return memory
diff --git a/src/.config/awesome/widget/net.lua b/src/.config/awesome/widget/net.lua
new file mode 100644
index 0000000..d02ad88
--- /dev/null
+++ b/src/.config/awesome/widget/net.lua
@@ -0,0 +1,141 @@
+local wibox = require("wibox")
+local string = string
+
+local spawn = require("awful.spawn")
+local timer = require("gears.timer")
+
+-- Network infos
+-- lain.widget.net
+
+local function line_callback(cmd, callback)
+ return spawn.with_line_callback(cmd, {
+ stdout = function (line)
+ callback(line)
+ end,
+ })
+end
+
+local timer_table = {}
+
+local function newtimer(name, timeout, fun, nostart, stoppable)
+ if not name or #name == 0 then return end
+ name = (stoppable and name) or timeout
+ if not timer_table[name] then
+ timer_table[name] = timer({ timeout = timeout })
+ timer_table[name]:start()
+ end
+ timer_table[name]:connect_signal("timeout", fun)
+ if not nostart then
+ timer_table[name]:emit_signal("timeout")
+ end
+ return stoppable and timer_table[name]
+end
+
+local function first_line(path)
+ local file, first = io.open(path, "rb"), nil
+ if file then
+ first = file:read("*l")
+ file:close()
+ end
+ return first
+end
+
+local function lines_from(path)
+ local lines = {}
+ for line in io.lines(path) do
+ lines[#lines + 1] = line
+ end
+ return lines
+end
+
+local function factory(args)
+ args = args or {}
+
+ local net = { widget = args.widget or wibox.widget.textbox(), devices = {} }
+ local timeout = args.timeout or 2
+ local units = args.units or 1024 -- KB
+ local wifi_state = args.wifi_state or "off"
+ local eth_state = args.eth_state or "off"
+ local screen = args.screen or 1
+ local settings = args.settings or function() end
+
+ -- Compatibility with old API where iface was a string corresponding to 1 interface
+ net.iface = (args.iface and (type(args.iface) == "string" and {args.iface}) or
+ (type(args.iface) == "table" and args.iface)) or {}
+
+ function net.get_devices()
+ net.iface = {} -- reset at every call
+ line_callback("ip link", function(line)
+ net.iface[#net.iface + 1] = not string.match(line, "LOOPBACK") and string.match(line, "(%w+): <") or nil
+ end)
+ end
+
+ if #net.iface == 0 then net.get_devices() end
+
+ function net.update()
+ -- These are the totals over all specified interfaces
+ net_now = {
+ devices = {},
+ -- Bytes since last iteration
+ sent = 0,
+ received = 0
+ }
+
+ for _, dev in ipairs(net.iface) do
+ local dev_now = {}
+ local dev_before = net.devices[dev] or { last_t = 0, last_r = 0 }
+ local now_t = tonumber(first_line(string.format("/sys/class/net/%s/statistics/tx_bytes", dev)) or 0)
+ local now_r = tonumber(first_line(string.format("/sys/class/net/%s/statistics/rx_bytes", dev)) or 0)
+
+ dev_now.carrier = first_line(string.format("/sys/class/net/%s/carrier", dev)) or "0"
+ dev_now.state = first_line(string.format("/sys/class/net/%s/operstate", dev)) or "down"
+
+ dev_now.sent = (now_t - dev_before.last_t) / timeout / units
+ dev_now.received = (now_r - dev_before.last_r) / timeout / units
+
+ net_now.sent = net_now.sent + dev_now.sent
+ net_now.received = net_now.received + dev_now.received
+
+ dev_now.sent = string.format("%.1f", dev_now.sent)
+ dev_now.received = string.format("%.1f", dev_now.received)
+
+ dev_now.last_t = now_t
+ dev_now.last_r = now_r
+
+ if wifi_state == "on" and first_line(string.format("/sys/class/net/%s/uevent", dev)) == "DEVTYPE=wlan" then
+ dev_now.wifi = true
+ if string.match(dev_now.carrier, "1") then
+ dev_now.signal = tonumber(string.match(lines_from("/proc/net/wireless")[3], "(%-%d+%.)")) or nil
+ end
+ else
+ dev_now.wifi = false
+ end
+
+ if eth_state == "on" and first_line(string.format("/sys/class/net/%s/uevent", dev)) ~= "DEVTYPE=wlan" then
+ dev_now.ethernet = true
+ else
+ dev_now.ethernet = false
+ end
+
+ net.devices[dev] = dev_now
+
+ net_now.carrier = dev_now.carrier
+ net_now.state = dev_now.state
+ net_now.devices[dev] = dev_now
+ -- net_now.sent and net_now.received will be
+ -- the totals across all specified devices
+ end
+
+ net_now.sent = string.format("%.1f", net_now.sent)
+ net_now.received = string.format("%.1f", net_now.received)
+
+ widget = net.widget
+ settings()
+ end
+
+ newtimer("network", timeout, net.update)
+
+ return net
+end
+
+return factory
\ No newline at end of file
diff --git a/src/.config/awesome/widget/storage.lua b/src/.config/awesome/widget/storage.lua
new file mode 100644
index 0000000..af13fe9
--- /dev/null
+++ b/src/.config/awesome/widget/storage.lua
@@ -0,0 +1,12 @@
+local wibox = require('wibox')
+local watch = require('awful.widget.watch')
+local beautiful = require('beautiful')
+
+local storage = wibox.widget.textbox()
+storage.font = beautiful.font
+
+watch('bash -c "df -h $HOME | awk \'/[0-9]/ {print $2-$3}\'"', 30, function(_, stdout)
+ storage.text = stdout
+end)
+
+return storage
diff --git a/src/.config/awesome/widget/tag-list/init.lua b/src/.config/awesome/widget/tag-list.lua
similarity index 93%
rename from src/.config/awesome/widget/tag-list/init.lua
rename to src/.config/awesome/widget/tag-list.lua
index 4e07d96..00ab350 100644
--- a/src/.config/awesome/widget/tag-list/init.lua
+++ b/src/.config/awesome/widget/tag-list.lua
@@ -98,8 +98,6 @@ local function list_update(w, buttons, label, data, objects)
end
bgb.shape = args.shape
- bgb.shape_border_width = args.shape_border_width
- bgb.shape_border_color = args.shape_border_color
w:add(bgb)
end
@@ -109,19 +107,24 @@ local TagList = function(s)
return awful.widget.taglist(s, awful.widget.taglist.filter.all,
awful.util.table.join(awful.button({}, 1, function(t)
t:view_only()
+ _G._splash_to_current_tag()
end), awful.button({modkey}, 1, function(t)
if _G.client.focus then
_G.client.focus:move_to_tag(t)
t:view_only()
end
- end), awful.button({}, 3, awful.tag.viewtoggle), awful.button({modkey}, 3, function(t)
+ _G._splash_to_current_tag()
+ end), awful.button({modkey}, 3, function(t)
if _G.client.focus then
_G.client.focus:toggle_tag(t)
end
+ _G._splash_to_current_tag()
end), awful.button({}, 4, function(t)
awful.tag.viewprev(t.screen)
+ _G._splash_to_current_tag()
end), awful.button({}, 5, function(t)
awful.tag.viewnext(t.screen)
+ _G._splash_to_current_tag()
end)), {}, list_update, wibox.layout.fixed.horizontal())
end
return TagList
diff --git a/src/.config/awesome/widget/task-list/init.lua b/src/.config/awesome/widget/task-list.lua
similarity index 96%
rename from src/.config/awesome/widget/task-list/init.lua
rename to src/.config/awesome/widget/task-list.lua
index 4b2ab6a..e905bf4 100644
--- a/src/.config/awesome/widget/task-list/init.lua
+++ b/src/.config/awesome/widget/task-list.lua
@@ -55,7 +55,7 @@ local function list_update(w, buttons, label, data, objects)
bg_clickable = clickable_container()
bgb = wibox.container.background()
tbm = wibox.container.margin(tb, dpi(4), dpi(4), dpi(1), dpi(1))
- ibm = wibox.container.margin(ib, dpi(2), dpi(2), dpi(2), dpi(2))
+ ibm = wibox.container.margin(ib, dpi(1), dpi(1), dpi(1), dpi(1))
l = wibox.layout.fixed.horizontal()
ll = wibox.layout.flex.horizontal()
@@ -86,6 +86,8 @@ local function list_update(w, buttons, label, data, objects)
-- The text might be invalid, so use pcall.
if tasklist_mode == 'icon' then
text = nil
+ elseif tasklist_mode == 'text' then
+ icon = nil
end
if text == nil or text == '' then
tbm:set_margins(0)
@@ -109,6 +111,7 @@ local function list_update(w, buttons, label, data, objects)
bgb.shape = args.shape
bgb.shape_border_width = args.shape_border_width
bgb.shape_border_color = args.shape_border_color
+ tb.align = 'center'
w:add(bgb)
end
diff --git a/src/.config/awesome/widget/temprature.lua b/src/.config/awesome/widget/temprature.lua
new file mode 100644
index 0000000..caeabf3
--- /dev/null
+++ b/src/.config/awesome/widget/temprature.lua
@@ -0,0 +1,12 @@
+local wibox = require('wibox')
+local watch = require('awful.widget.watch')
+local beautiful = require('beautiful')
+
+local temprature = wibox.widget.textbox()
+temprature.font = beautiful.font
+
+watch('bash -c "sensors | awk \'/Core 0/ {print substr($3, 2) }\'"', 30, function(_, stdout)
+ temprature.text = stdout
+end)
+
+return temprature
diff --git a/src/.config/awesome/widget/volume.lua b/src/.config/awesome/widget/volume.lua
new file mode 100644
index 0000000..d44367f
--- /dev/null
+++ b/src/.config/awesome/widget/volume.lua
@@ -0,0 +1,51 @@
+local awful = require("awful")
+local wibox = require('wibox')
+local mat_list_item = require('widget.material.list-item')
+local dpi = require('beautiful').xresources.apply_dpi
+local watch = require('awful.widget.watch')
+local beautiful = require('beautiful')
+
+local volume_icon = wibox.widget.textbox()
+volume_icon.font = beautiful.icon_font
+local volume_widget = wibox.widget.textbox()
+volume_widget.align = 'center'
+volume_widget.valign = 'center'
+volume_widget.font = beautiful.font
+
+local volume
+
+function update_volume()
+ awful.spawn.easy_async_with_shell("bash -c 'amixer -D pulse sget Master'", function(stdout)
+ volume = string.match(stdout, '(%d?%d?%d)%%')
+ awful.spawn.easy_async_with_shell("bash -c 'pacmd list-sinks | awk '/muted/ { print $2 }''", function(muted)
+ volume_widget.text = volume
+ muted = string.gsub(muted, "%s+", "")
+ if muted == 'muted:no' and (volume > '35' or volume == '100') then
+ volume_icon.text = '墳'
+ elseif muted == 'muted:no' and volume <= '35' and volume > '0' then
+ volume_icon.text = '奔'
+ elseif muted == 'muted:yes' then
+ volume_icon.text = '婢'
+ volume_widget.text = 'M'
+ elseif volume == '0' then
+ volume_icon.text = '奄'
+ end
+ end)
+ collectgarbage('collect')
+ end)
+end
+
+watch('bash -c', 3, function(_, stdout)
+ update_volume()
+end)
+
+return wibox.widget {
+ wibox.widget{
+ volume_icon,
+ fg = beautiful.accent.hue_100,
+ widget = wibox.container.background
+ },
+ volume_widget,
+ spacing = dpi(4),
+ layout = wibox.layout.fixed.horizontal
+}
diff --git a/src/.config/awesome/configuration/compton.conf b/src/.config/compton.conf
similarity index 78%
rename from src/.config/awesome/configuration/compton.conf
rename to src/.config/compton.conf
index d292acc..74c3a3c 100644
--- a/src/.config/awesome/configuration/compton.conf
+++ b/src/.config/compton.conf
@@ -32,26 +32,27 @@ inactive-opacity = 1.0;
active-opacity = 1.0;
frame-opacity = 1.0;
inactive-opacity-override = false;
-alpha-step = 0.06;
-# inactive-dim = 0.2;
+# alpha-step = 0.06;
+# inactive-dim = 0.05;
# inactive-dim-fixed = true;
-blur-background = true;
-blur-background-frame = true;
-blur-method = "kawase";
-blur-strength = 10;
-blur-background-fixed = true;
-blur-background-exclude = [
- "window_type = 'dock'",
- "window_type = 'desktop'",
- "class_g = 'slop'",
- "_GTK_FRAME_EXTENTS@:c"
-];
+# blur-background = true;
+# blur-background-frame = true;
+# blur-strength = 20;
+# blur-background-fixed = true;
+# blur-background-exclude = [
+# "window_type = 'dock'",
+# "window_type = 'desktop'",
+# "class_g = 'slop'",
+# "WM_NAME@:s = 'SplashTerminal'",
+# "WM_NAME@:s = 'dropdown_terminal'",
+# "_GTK_FRAME_EXTENTS@:c"
+# ];
# Fading
fading = true;
fade-delta = 4;
-fade-in-step = 0.04;
-fade-out-step = 0.04;
+fade-in-step = 0.1;
+fade-out-step = 0.1;
no-fading-openclose = false;
# no-fading-destroyed-argb = true;
fade-exclude = [ ];
@@ -79,7 +80,7 @@ invert-color-include = [ ];
# GLX backend
vsync="opengl-swc";
unredir-if-possible=true;
-#paint-on-overlay=true;
+# paint-on-overlay=true;
#glx-no-stencil=true;
glx-copy-from-front=false;
# glx-no-stencil = true;
@@ -94,9 +95,9 @@ glx-no-rebind-pixmap = true;
# Window type settings
wintypes:
{
- tooltip = {
- fade = true;
+ tooltip = {
+ fade = true;
shadow = true;
- focus = true;
+ focus = true;
};
};
diff --git a/src/.config/kitty/dracula.conf b/src/.config/kitty/dracula.conf
index 8bee635..27e9dc7 100644
--- a/src/.config/kitty/dracula.conf
+++ b/src/.config/kitty/dracula.conf
@@ -9,7 +9,7 @@
# Alternatively copy paste below directly into kitty.conf
foreground #f8f8f2
-background #282a36
+background #282828
selection_foreground #ffffff
selection_background #44475a
diff --git a/src/.config/kitty/gruvbox-material.conf b/src/.config/kitty/gruvbox-material.conf
new file mode 100644
index 0000000..62757db
--- /dev/null
+++ b/src/.config/kitty/gruvbox-material.conf
@@ -0,0 +1,38 @@
+# Original Project:
+# https://github.com/sainnhe/gruvbox-material/
+# Colors are different than original, just to match my taste :P
+
+foreground #d6d6d6
+background #282828
+
+# black
+color0 #282828
+color8 #6e6e6e
+
+# red
+color1 #f35a5a
+color9 #ba524a
+
+# green
+color2 #92c96a
+color10 #7b9d62
+
+# yellow
+color3 #e1be7f
+color11 #cd996a
+
+# blue
+color4 #66aeea
+color12 #4083bc
+
+# magenta
+color5 #c57cda
+color13 #9955ac
+
+# cyan
+color6 #3cb46c
+color14 #319659
+
+# white
+color7 #d1d1d1
+color15 #858585
diff --git a/src/.config/kitty/gruvbox.conf b/src/.config/kitty/gruvbox.conf
new file mode 100644
index 0000000..7fdfb3e
--- /dev/null
+++ b/src/.config/kitty/gruvbox.conf
@@ -0,0 +1,40 @@
+# gruvbox-dark colorscheme for kitty
+# snazzy theme used as base
+
+foreground #ebdbb2
+background #272727
+selection_foreground #655b53
+selection_background #ebdbb2
+url_color #d65c0d
+
+# black
+color0 #272727
+color8 #928373
+
+# red
+color1 #cc231c
+color9 #fb4833
+
+# green
+color2 #989719
+color10 #b8ba25
+
+# yellow
+color3 #d79920
+color11 #fabc2e
+
+# blue
+color4 #448488
+color12 #83a597
+
+# magenta
+color5 #b16185
+color13 #d3859a
+
+# cyan
+color6 #689d69
+color14 #8ec07b
+
+# white
+color7 #a89983
+color15 #ebdbb2
diff --git a/src/.config/kitty/kitty.conf b/src/.config/kitty/kitty.conf
index 99630f7..9875533 100644
--- a/src/.config/kitty/kitty.conf
+++ b/src/.config/kitty/kitty.conf
@@ -1,10 +1,11 @@
-include dracula.conf
+include gruvbox.conf
-background_opacity 0.95
+background_opacity 0.9
font_family FiraCode Nerd Font Mono
bold_font auto
italic_font auto
bold_italic_font auto
-window_padding_width 4
+window_padding_width 1
font_size 12
disable_ligatures always
+enable_audio_bell no
diff --git a/src/.config/nvim/.gitignore b/src/.config/nvim/.gitignore
new file mode 100644
index 0000000..b625983
--- /dev/null
+++ b/src/.config/nvim/.gitignore
@@ -0,0 +1,8 @@
+.netrwhist
+spell/
+plugged/
+*.swp
+temp/
+autoload/
+session/
+
diff --git a/src/.config/nvim/coc-settings.json b/src/.config/nvim/coc-settings.json
new file mode 100644
index 0000000..156bff3
--- /dev/null
+++ b/src/.config/nvim/coc-settings.json
@@ -0,0 +1,134 @@
+{
+ // suggestions
+ // "suggest.echodocSupport": true,
+ // TODO add more labels and give them cool glyphs
+ "suggest.completionItemKindLabels": {
+ "text": "t",
+ "method": "m",
+ "function": ""
+ },
+ "snippets.priority": 1,
+ //"yank.priority": 1,
+ "suggest.languageSourcePriority": 99,
+ "coc.source.file.priority": 2,
+ "coc.source.around.priority": 3,
+ "coc.source.buffer.priority": 4,
+
+ // diagnostics
+ "diagnostic.errorSign": " ",
+ "diagnostic.warningSign": " ",
+ "diagnostic.infoSign": "",
+ "diagnostic.hintSign": " ",
+ // "diagnostic.displayByAle": true,
+ // "diagnostic.virtualText": true, // this won't work with codelens when error on same line
+
+ // codelens
+ "codeLens.enable": true,
+ "java.referencesCodeLens.enabled": true,
+ "java.implementationsCodeLens.enabled": true,
+ "java.completion.enabled": true,
+ "java.jdt.ls.vmargs": "-javaagent:/usr/local/share/lombok/lombok.jar",
+
+ // list
+ "list.indicator": ">",
+ "list.selectedSignText": " ",
+
+ // autoformat
+ "coc.preferences.formatOnSaveFiletypes": [
+ "css",
+ "markdown",
+ "javascript",
+ "graphql",
+ "html",
+ "yaml",
+ "json",
+ "python",
+ "java"
+ ],
+ "coc.preferences.hoverTarget": "float",
+
+ // python config
+ "python.analysis.autoImportCompletions": true,
+ "python.analysis.autoSearchPaths": true,
+ "python.analysis.diagnosticMode": "openFilesOnly",
+ "python.analysis.stubPath": "typings",
+ "python.analysis.typeshedPaths": [],
+ "python.analysis.diagnosticSeverityOverrides": {},
+ "python.analysis.typeCheckingMode": "basic",
+ "python.analysis.useLibraryCodeForTypes": true,
+ "python.pythonPath": "python",
+ "python.venvPath": "",
+ "python.formatting.provider": "black",
+ "python.formatting.blackPath": "black",
+ "python.formatting.blackArgs": [],
+ "python.formatting.autopep8Path": "autopep8",
+ "python.formatting.autopep8Args": [],
+ "python.formatting.yapfPath": "yapf",
+ "python.formatting.yapfArgs": [],
+ "python.linting.enabled": true,
+ "python.linting.flake8Enabled": false,
+ "python.linting.banditEnabled": false,
+ "python.linting.mypyEnabled": false,
+ "python.linting.pytypeEnabled": false,
+ "python.linting.prospectorEnabled": false,
+ "python.linting.pydocstyleEnabled": false,
+ "python.linting.pylamaEnabled": false,
+ "python.linting.pylintEnabled": false,
+ "pyright.disableCompletion": false,
+ "pyright.disableLanguageServices": false,
+ "pyright.disableOrganizeImports": false,
+
+ // snippets
+ "snippets.ultisnips.directories": ["UltiSnips", "~/.config/nvim/snips"],
+ //"snippets.userSnippetsDirectory": "~/.config/nvim/snips",
+
+ // emmet
+ "emmet.includeLanguages": {
+ "vue-html": "html",
+ "javascript": "javascriptreact"
+ },
+
+ // CSS (disable since I'm also using stylelintplus)
+ "css.validate": false,
+ "less.validate": false,
+ "scss.validate": false,
+ "wxss.validate": false,
+
+ // explorer
+ "explorer.width": 30,
+ "explorer.file.root.template": "[icon] [git] [hidden & 1][root]",
+ "explorer.icon.enableNerdfont": true,
+ "explorer.previewAction.onHover": false,
+ "explorer.icon.enableVimDevicons": false,
+ "explorer.file.showHiddenFiles": false,
+ "explorer.keyMappings.global": {
+ "": ["expandable?", "expand", "open"],
+ "v": "open:vsplit"
+ },
+
+ "languageserver": {
+ "lua": {
+ "command": "/home/chris/.luambenvs/neovim4/bin/lua-lsp",
+ "filetypes": ["lua"],
+ "trace.server": "verbose"
+ }
+ },
+
+ "bookmark.sign": "",
+
+ //coc-emoji
+ "coc.source.emoji.filetypes": ["markdown"]
+
+ // lua
+ //"lua.useSumnekoLs": true,
+ //"lua.commandPath": "/home/chris/.luambenvs/neovim3/bin/lua-lsp"
+ //"lua.enable": true,
+ //"Lua.completion.enable": true,
+ //"Lua.runtime.version": "Lua 5.1",
+ //"Lua.runtime.path": ["?.lua", "?/init.lua", "?/?.lua"],
+ //"lua.version": "5.1"
+ //"lua.commandPath": "/home/chris/.vscode-insiders/extensions/sumneko.lua-1.0.5/server/bin/Linux/lua-language-server"
+
+ // TODO b:coc_suggest_disable=1 GOYO
+ // TODO add to paths.vim g:coc_node_path
+}
diff --git a/src/.config/nvim/init.vim b/src/.config/nvim/init.vim
new file mode 100644
index 0000000..b969aa3
--- /dev/null
+++ b/src/.config/nvim/init.vim
@@ -0,0 +1,621 @@
+"*****************************************************************************
+"" Plugin Installation
+"*****************************************************************************
+let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
+if has('win32')&&!has('win64')
+ let curl_exists=expand('C:\Windows\Sysnative\curl.exe')
+else
+ let curl_exists=expand('curl')
+endif
+
+if !filereadable(vimplug_exists)
+ if !executable(curl_exists)
+ echoerr "You have to install curl or first install vim-plug yourself!"
+ execute "q!"
+ endif
+ echo "Installing Vim-Plug..."
+ echo ""
+ silent exec "!"curl_exists" -fLo " . shellescape(vimplug_exists) . " --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
+ let g:not_finish_vimplug = "yes"
+
+ autocmd VimEnter * PlugInstall
+endif
+
+set nocompatible
+filetype on
+call plug#begin()
+" Load plugins
+" VIM enhancements
+Plug 'ciaranm/securemodelines'
+Plug 'editorconfig/editorconfig-vim'
+Plug 'justinmk/vim-sneak'
+
+" GUI enhancements
+Plug 'machakann/vim-highlightedyank'
+Plug 'andymass/vim-matchup'
+
+" Fuzzy finder
+Plug 'airblade/vim-rooter'
+Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
+Plug 'junegunn/fzf.vim'
+
+" Semantic language support
+Plug 'neoclide/coc.nvim', {'branch': 'release'}
+
+" Syntactic language support
+Plug 'cespare/vim-toml'
+Plug 'stephpy/vim-yaml'
+Plug 'rhysd/vim-clang-format'
+Plug 'dag/vim-fish'
+Plug 'godlygeek/tabular'
+
+Plug 'scrooloose/nerdtree'
+Plug 'jistr/vim-nerdtree-tabs'
+Plug 'ryanoasis/vim-devicons'
+Plug 'tpope/vim-commentary'
+Plug 'tpope/vim-fugitive'
+Plug 'vim-airline/vim-airline'
+Plug 'vim-airline/vim-airline-themes'
+Plug 'airblade/vim-gitgutter'
+Plug 'vim-scripts/grep.vim'
+Plug 'vim-scripts/CSApprox'
+Plug 'Raimondi/delimitMate'
+Plug 'dense-analysis/ale'
+Plug 'Yggdroot/indentLine'
+Plug 'tpope/vim-rhubarb' " required by fugitive to :Gbrowse
+Plug 'liuchengxu/vim-which-key'
+Plug 'severin-lemaignan/vim-minimap'
+Plug 'tpope/vim-surround'
+Plug 'morhetz/gruvbox'
+Plug 'sainnhe/gruvbox-material' " I switch when I feel like it :P
+Plug 'mg979/vim-visual-multi'
+Plug 'ntpeters/vim-better-whitespace'
+Plug 'yuttie/comfortable-motion.vim'
+
+let g:make = 'gmake'
+if exists('make')
+ let g:make = 'make'
+endif
+Plug 'Shougo/vimproc.vim', {'do': g:make}
+
+"" Vim-Session
+Plug 'xolox/vim-misc'
+Plug 'xolox/vim-session'
+
+"" Snippets
+Plug 'SirVer/ultisnips'
+Plug 'honza/vim-snippets'
+
+" c
+Plug 'vim-scripts/c.vim', {'for': ['c', 'cpp']}
+Plug 'ludwig/split-manpage.vim'
+
+" elm
+"" Elm Bundle
+Plug 'elmcast/elm-vim'
+
+" erlang
+Plug 'jimenezrick/vimerl'
+
+" go
+"" Go Lang Bundle
+Plug 'fatih/vim-go', {'do': ':GoInstallBinaries'}
+
+" haskell
+"" Haskell Bundle
+Plug 'eagletmt/neco-ghc'
+Plug 'dag/vim2hs'
+Plug 'pbrisbin/vim-syntax-shakespeare'
+
+" html
+"" HTML Bundle
+Plug 'hail2u/vim-css3-syntax'
+Plug 'gko/vim-coloresque'
+Plug 'tpope/vim-haml'
+Plug 'mattn/emmet-vim'
+
+" javascript
+"" Javascript Bundle
+Plug 'jelera/vim-javascript-syntax'
+
+" python
+"" Python Bundle
+Plug 'raimon49/requirements.txt.vim', {'for': 'requirements'}
+
+" ruby
+Plug 'tpope/vim-rails'
+Plug 'tpope/vim-rake'
+Plug 'tpope/vim-projectionist'
+Plug 'thoughtbot/vim-rspec'
+Plug 'ecomba/vim-ruby-refactoring', {'tag': 'main'}
+
+" rust
+" Vim racer
+Plug 'racer-rust/vim-racer'
+
+" Rust.vim
+Plug 'rust-lang/rust.vim'
+
+" svelte
+Plug 'leafOfTree/vim-svelte-plugin'
+
+" typescript
+Plug 'leafgarland/typescript-vim'
+Plug 'HerringtonDarkholme/yats.vim'
+
+" vuejs
+Plug 'posva/vim-vue'
+Plug 'leafOfTree/vim-vue-plugin'
+call plug#end()
+
+"*****************************************************************************
+"" End of Plugin Installation
+"*****************************************************************************
+
+"*****************************************************************************
+"" Basic Settings
+"*****************************************************************************
+
+syntax on
+set ruler
+set autoindent
+let no_buffers_menu=1
+colorscheme gruvbox
+set bg=dark
+set mousemodel=popup
+set t_Co=256
+hi Normal ctermbg=230
+set updatetime=100
+set mouse=a
+set noswapfile
+set colorcolumn=80
+
+"" Set smart line numbers
+set number relativenumber
+augroup numbertoggle
+ autocmd!
+ autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
+ autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
+augroup END
+
+"" Encoding
+set encoding=utf-8
+set fileencoding=utf-8
+set fileencodings=utf-8
+
+"" Fix backspace indent
+set backspace=indent,eol,start
+
+"" Tabs. May be overridden by autocmd rules
+set tabstop=4
+set softtabstop=0
+set shiftwidth=4
+set expandtab
+
+"" Map leader to
+" https://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/
+let mapleader = "\"
+if executable('ag')
+ set grepprg=ag\ --nogroup\ --nocolor
+endif
+if executable('rg')
+ set grepprg=rg\ --no-heading\ --vimgrep
+ set grepformat=%f:%l:%c:%m
+endif
+
+" session management
+let g:session_directory = "~/.config/nvim/session"
+let g:session_autoload = "no"
+let g:session_autosave = "no"
+let g:session_command_aliases = 1
+
+" deal with colors
+if !has('gui_running')
+ set t_Co=256
+endif
+if (match($TERM, "-256color") != -1) && (match($TERM, "screen-256color") == -1)
+ " screen does not (yet) support truecolor
+ set termguicolors
+endif
+let base16colorspace=256
+
+
+" IndentLine
+let g:indentLine_enabled = 1
+let g:indentLine_concealcursor = 0
+let g:indentLine_char = '┆'
+let g:indentLine_faster = 1
+
+au TermEnter * setlocal scrolloff=0
+au TermLeave * setlocal scrolloff=3
+
+"" Status bar
+set laststatus=2
+
+"" Use modeline overrides
+set modeline
+set modelines=10
+set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\
+
+" remove trailing whitespaces
+command! FixWhitespace :%s/\s\+$//e
+
+"" Copy/Paste/Cut to system clipboard
+if has('unnamedplus')
+ set clipboard=unnamed,unnamedplus
+endif
+
+" Sane splits
+set splitright
+set splitbelow
+
+" Permanent undo
+set undodir=~/.vimdid
+set undofile
+
+" Decent wildmenu
+set wildmenu
+set wildmode=list:longest
+set wildignore=.hg,.svn,*~,*.png,*.jpg,*.gif,*.settings,Thumbs.db,*.min.js,*.swp,publish/*,intermediate/*,*.o,*.hi,Zend,vendor
+
+"" Searching
+set hlsearch
+set incsearch
+set ignorecase
+set smartcase
+
+"*****************************************************************************
+"" End of Base Settings
+"*****************************************************************************
+
+"*****************************************************************************
+"" Plugin Settings
+"*****************************************************************************
+
+" vim-airline
+if !exists('g:airline_symbols')
+ let g:airline_symbols = {}
+endif
+let g:airline_symbols.branch = ''
+let g:airline_symbols.readonly = ''
+let g:airline_symbols.linenr = ''
+let g:airline#extensions#branch#enabled = 1
+let g:airline#extensions#ale#enabled = 1
+let g:airline#extensions#tabline#enabled = 1
+let g:airline_skip_empty_sections = 1
+let g:airline_theme='gruvbox'
+
+"" NERDTree configuration
+let g:NERDTreeChDirMode=2
+let g:NERDTreeIgnore=['\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__']
+let g:NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']
+let g:NERDTreeShowHidden=1
+let g:nerdtree_tabs_focus_on_files=1
+let g:NERDTreeMapOpenInTabSilent = ''
+let g:NERDTreeWinSize = 30
+set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.db,*.sqlite
+nnoremap :NERDTreeFind
+nnoremap :NERDTreeToggle
+
+" grep.vim
+nnoremap f :Rgrep
+let Grep_Default_Options = '-IR'
+let Grep_Skip_Files = '*.log *.db'
+let Grep_Skip_Dirs = '.git node_modules'
+
+" vim rooter
+let g:rooter_silent_chdir = 1
+
+"*****************************************************************************
+"" End of Plugin Settings
+"*****************************************************************************
+
+"*****************************************************************************
+"" Language Settings
+"*****************************************************************************
+
+" PYTHON
+" vim-python
+augroup vimrc-python
+ autocmd!
+ autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=8
+ \ formatoptions+=croq softtabstop=4
+ \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with
+augroup END
+" jedi-vim
+let g:jedi#popup_on_dot = 0
+let g:jedi#goto_assignments_command = "g"
+let g:jedi#goto_definitions_command = "d"
+let g:jedi#documentation_command = "K"
+let g:jedi#usages_command = "n"
+let g:jedi#rename_command = "r"
+let g:jedi#show_call_signatures = "0"
+let g:jedi#completions_command = ""
+let g:jedi#smart_auto_mappings = 0
+" ale
+let g:ale_linters = {}
+:call extend(g:ale_linters, {
+ \'python': ['flake8'], })
+" vim-airline
+let g:airline#extensions#virtualenv#enabled = 1
+" Syntax highlight
+let python_highlight_all = 1
+
+" JAVASCRIPT
+let g:javascript_enable_domhtmlcss = 1
+" vim-javascript
+augroup vimrc-javascript
+ autocmd!
+ autocmd FileType javascript setl tabstop=4|setl shiftwidth=4|setl expandtab softtabstop=4
+augroup END
+
+" RUST
+" Vim racer
+au FileType rust nmap gd (rust-def)
+au FileType rust nmap gs (rust-def-split)
+au FileType rust nmap gx (rust-def-vertical)
+au FileType rust nmap gd (rust-doc)
+
+" GOLANG
+" vim-go
+" run :GoBuild or :GoTestCompile based on the go file
+function! s:build_go_files()
+ let l:file = expand('%')
+ if l:file =~# '^\f\+_test\.go$'
+ call go#test#Test(0, 1)
+ elseif l:file =~# '^\f\+\.go$'
+ call go#cmd#Build(0)
+ endif
+endfunction
+let g:go_list_type = "quickfix"
+let g:go_fmt_command = "goimports"
+let g:go_fmt_fail_silently = 1
+let g:go_highlight_types = 1
+let g:go_highlight_fields = 1
+let g:go_highlight_functions = 1
+let g:go_highlight_methods = 1
+let g:go_highlight_operators = 1
+let g:go_highlight_build_constraints = 1
+let g:go_highlight_structs = 1
+let g:go_highlight_generate_tags = 1
+let g:go_highlight_space_tab_error = 0
+let g:go_highlight_array_whitespace_error = 0
+let g:go_highlight_trailing_whitespace_error = 0
+let g:go_highlight_extra_types = 1
+autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4
+augroup completion_preview_close
+ autocmd!
+ if v:version > 703 || v:version == 703 && has('patch598')
+ autocmd CompleteDone * if !&previewwindow && &completeopt =~ 'preview' | silent! pclose | endif
+ endif
+augroup END
+augroup go
+ au!
+ au Filetype go command! -bang A call go#alternate#Switch(0, 'edit')
+ au Filetype go command! -bang AV call go#alternate#Switch(0, 'vsplit')
+ au Filetype go command! -bang AS call go#alternate#Switch(0, 'split')
+ au Filetype go command! -bang AT call go#alternate#Switch(0, 'tabe')
+ au FileType go nmap dd (go-def-vertical)
+ au FileType go nmap dv (go-doc-vertical)
+ au FileType go nmap db (go-doc-browser)
+ au FileType go nmap r (go-run)
+ au FileType go nmap t (go-test)
+ au FileType go nmap gt (go-coverage-toggle)
+ au FileType go nmap i (go-info)
+ au FileType go nmap l (go-metalinter)
+ au FileType go nmap :GoDecls
+ au FileType go nmap dr :GoDeclsDir
+ au FileType go imap :GoDecls
+ au FileType go imap dr :GoDeclsDir
+ au FileType go nmap rb :call build_go_files()
+augroup END
+" ale
+:call extend(g:ale_linters, {
+ \"go": ['golint', 'go vet'], })
+
+" HTML
+" for html files, 2 spaces
+autocmd Filetype html setlocal ts=2 sw=2 expandtab
+
+" C/C++
+autocmd FileType c setlocal tabstop=4 shiftwidth=4 expandtab
+autocmd FileType cpp setlocal tabstop=4 shiftwidth=4 expandtab
+
+" HASKELL
+let g:haskell_conceal_wide = 1
+let g:haskell_multiline_strings = 1
+let g:necoghc_enable_detailed_browse = 1
+autocmd Filetype haskell setlocal omnifunc=necoghc#omnifunc
+
+" RUBY
+let g:rubycomplete_buffer_loading = 1
+let g:rubycomplete_classes_in_global = 1
+let g:rubycomplete_rails = 1
+augroup vimrc-ruby
+ autocmd!
+ autocmd BufNewFile,BufRead *.rb,*.rbw,*.gemspec setlocal filetype=ruby
+ autocmd FileType ruby set tabstop=2|set shiftwidth=2|set expandtab softtabstop=2
+augroup END
+let g:tagbar_type_ruby = {
+ \ 'kinds' : [
+ \ 'm:modules',
+ \ 'c:classes',
+ \ 'd:describes',
+ \ 'C:contexts',
+ \ 'f:methods',
+ \ 'F:singleton methods'
+ \ ]
+\ }
+" RSpec.vim mappings
+map t :call RunCurrentSpecFile()
+map s :call RunNearestSpec()
+map l :call RunLastSpec()
+map a :call RunAllSpecs()
+" For ruby refactory
+if has('nvim')
+ runtime! macros/matchit.vim
+else
+ packadd! matchit
+endif
+" Ruby refactory
+nnoremap rap :RAddParameter
+nnoremap rcpc :RConvertPostConditional
+nnoremap rel :RExtractLet
+vnoremap rec :RExtractConstant
+vnoremap relv :RExtractLocalVariable
+nnoremap rit :RInlineTemp
+vnoremap rrlv :RRenameLocalVariable
+vnoremap rriv :RRenameInstanceVariable
+vnoremap rem :RExtractMethod
+
+" ELM
+" elm-vim
+let g:elm_setup_keybindings = 0
+let g:elm_format_autosave = 1
+
+" ERLANG
+let erlang_folding = 1
+let erlang_show_errors = 1
+
+" VUE
+" vim vue
+let g:vue_disable_pre_processors=1
+" vim vue plugin
+let g:vim_vue_plugin_load_full_syntax = 1
+
+" SVELTE
+let g:vim_svelte_plugin_load_full_syntax = 1
+
+" TYPESCRIPT
+let g:yats_host_keyword = 1
+
+"*****************************************************************************
+"" End of Language Settings
+"*****************************************************************************
+
+"*****************************************************************************
+"" Key Bindings / Shortcuts
+"*****************************************************************************
+
+" Reload Nvim
+noremap r :so %
+
+" Confirm before quitting all
+noremap :confirm qall
+
+" Switch split-windows
+nmap :wincmd k
+nmap :wincmd j
+nmap :wincmd h
+nmap :wincmd l
+nmap :wincmd k
+nmap :wincmd j
+nmap :wincmd h
+nmap :wincmd l
+
+" Ctrl-z/y for undo-redo
+map
+map
+
+" Open hotkeys
+map :Files
+nmap ; :Buffers
+
+" Quick-save
+nmap w :w
+
+" Ctrl+j/k to go to normal mode
+nnoremap
+inoremap
+vnoremap
+snoremap
+xnoremap
+cnoremap
+onoremap
+lnoremap
+tnoremap
+nnoremap
+inoremap
+vnoremap
+snoremap
+xnoremap
+cnoremap
+onoremap
+lnoremap
+tnoremap
+
+" Ctrl+h to stop searching
+vnoremap :nohlsearch
+nnoremap :nohlsearch
+
+" Jump to start and end of line using the home row keys
+map H ^
+map L $
+
+" Close buffer / Exit
+noremap c :bd
+noremap z :qa
+
+" ; as :
+nnoremap ; :
+
+" no one is really happy until you have this shortcuts
+cnoreabbrev W! w!
+cnoreabbrev Q! q!
+cnoreabbrev Qall! qall!
+cnoreabbrev Wq wq
+cnoreabbrev Wa wa
+cnoreabbrev wQ wq
+cnoreabbrev WQ wq
+cnoreabbrev W w
+cnoreabbrev Q q
+cnoreabbrev Qall qall
+
+" Left and right to switch buffers
+nnoremap :bp
+nnoremap :bn
+
+" Move by line
+nnoremap j gj
+nnoremap k gk
+
+" which key
+nnoremap :WhichKey ''
+
+" Very magic by default
+nnoremap ? ?\v
+nnoremap / /\v
+cnoremap %s/ %sm/
+
+" Search mappings: These will make it so that going to the next one in a
+" search will center on the line it's found in.
+nnoremap n nzzzv
+nnoremap N Nzzzv
+
+" Open new file adjacent to current file
+nnoremap e :e =expand("%:p:h") . "/"
+
+" Split Screen
+noremap hhh :split
+noremap vvv :vsplit
+
+" Use to trigger completion.
+inoremap coc#refresh()
+
+" Fuzzy Finder
+nnoremap ff :FZF -m
+
+noremap s :Rg
+let g:fzf_layout = { 'down': '~20%' }
+
+"*****************************************************************************
+"" End of Key Bindings / Shortcuts
+"*****************************************************************************
+
+"*****************************************************************************
+" External Modules
+"*****************************************************************************
+source $HOME/.config/nvim/src/coc.vim
+source $HOME/.config/nvim/src/coc-extensions.vim
+source $HOME/.config/nvim/src/fzf.vim
+
diff --git a/src/.config/nvim/src/coc-extensions.vim b/src/.config/nvim/src/coc-extensions.vim
new file mode 100644
index 0000000..d44e316
--- /dev/null
+++ b/src/.config/nvim/src/coc-extensions.vim
@@ -0,0 +1,33 @@
+let g:coc_global_extensions = [
+ \ 'coc-snippets',
+ \ 'coc-actions',
+ \ 'coc-sh',
+ \ 'coc-java-debug',
+ \ 'coc-java',
+ \ 'coc-lists',
+ \ 'coc-emmet',
+ \ 'coc-tasks',
+ \ 'coc-pairs',
+ \ 'coc-tsserver',
+ \ 'coc-floaterm',
+ \ 'coc-fzf-preview',
+ \ 'coc-html',
+ \ 'coc-css',
+ \ 'coc-cssmodules',
+ \ 'coc-stylelintplus',
+ \ 'coc-emoji',
+ \ 'coc-bookmark',
+ \ 'coc-yaml',
+ \ 'coc-pyright',
+ \ 'coc-explorer',
+ \ 'coc-svg',
+ \ 'coc-prettier',
+ \ 'coc-vimlsp',
+ \ 'coc-xml',
+ \ 'coc-yank',
+ \ 'coc-json',
+ \ 'coc-marketplace',
+ \ ]
+ " \ 'coc-tabnine',
+ " \ 'coc-highlight',
+
diff --git a/src/.config/nvim/src/coc.vim b/src/.config/nvim/src/coc.vim
new file mode 100644
index 0000000..0b0631c
--- /dev/null
+++ b/src/.config/nvim/src/coc.vim
@@ -0,0 +1,165 @@
+" Use tab for trigger completion with characters ahead and navigate.
+inoremap
+ \ pumvisible() ? "\" :
+ \ check_back_space() ? "\" :
+ \ coc#refresh()
+inoremap pumvisible() ? "\" : "\"
+
+function! s:check_back_space() abort
+ let col = col('.') - 1
+ return !col || getline('.')[col - 1] =~# '\s'
+endfunction
+
+" Use to trigger completion.
+inoremap coc#refresh()
+
+" Use to confirm completion, `u` means break undo chain at current
+" position. Coc only does snippet and additional edit on confirm.
+if exists('*complete_info')
+ inoremap complete_info()["selected"] != "-1" ? "\" : "\u\"
+else
+ imap pumvisible() ? "\" : "\u\"
+endif
+
+" GoTo code navigation.
+nmap gd (coc-definition)
+nmap gy (coc-type-definition)
+nmap gi (coc-implementation)
+nmap gr (coc-references)
+
+" Use K to show documentation in preview window.
+nnoremap K :call show_documentation()
+
+function! s:show_documentation()
+ if (index(['vim','help'], &filetype) >= 0)
+ execute 'h '.expand('')
+ elseif (coc#rpc#ready())
+ call CocActionAsync('doHover')
+ else
+ execute '!' . &keywordprg . " " . expand('')
+ endif
+endfunction
+
+" set keywordprg=:call\ CocActionAsync('doHover')
+" augroup VimHelp
+" autocmd!
+" autocmd Filetype vim,help setlocal keywordprg=:help
+" augroup END
+
+" Highlight the symbol and its references when holding the cursor.
+autocmd CursorHold * silent call CocActionAsync('highlight')
+
+" Symbol renaming.
+" nmap rn (coc-rename)
+
+augroup mygroup
+ autocmd!
+ " Setup formatexpr specified filetype(s).
+ autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
+ " Update signature help on jump placeholder.
+ autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
+augroup end
+
+" Applying codeAction to the selected region.
+" Example: `aap` for current paragraph
+" xmap a (coc-codeaction-selected)
+" nmap a (coc-codeaction-selected)
+
+" Remap keys for applying codeAction to the current line.
+" nmap ac (coc-codeaction)
+" Apply AutoFix to problem on the current line.
+" nmap qf (coc-fix-current)
+
+" Introduce function text object
+" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
+xmap if (coc-funcobj-i)
+xmap af (coc-funcobj-a)
+omap if (coc-funcobj-i)
+omap af (coc-funcobj-a)
+
+" Remap and