Changes from work
Signed-off-by: Quentin Godefroid <quentin.godefroid@ovhcloud.com>
This commit is contained in:
parent
637c1a5a56
commit
4c83851f6b
4 changed files with 466 additions and 273 deletions
|
@ -1,7 +1,6 @@
|
||||||
-- Standard awesome library
|
-- Standard awesome library
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
awful.rules = require("awful.rules")
|
|
||||||
require("awful.autofocus")
|
require("awful.autofocus")
|
||||||
-- Widget and layout library
|
-- Widget and layout library
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
|
@ -10,10 +9,17 @@ local beautiful = require("beautiful")
|
||||||
-- Notification library
|
-- Notification library
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
local menubar = require("menubar")
|
local menubar = require("menubar")
|
||||||
|
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
||||||
|
|
||||||
|
local battery_widget = require("awesome.battery-widget/battery-widget")
|
||||||
|
-- Enable hotkeys help widget for VIM and other apps
|
||||||
|
-- when client with a matching name is opened:
|
||||||
|
require("awful.hotkeys_popup.keys")
|
||||||
|
|
||||||
-- Load Debian menu entries
|
-- Load Debian menu entries
|
||||||
require("debian.menu")
|
local debian = require("debian.menu")
|
||||||
|
local has_fdo, freedesktop = pcall(require, "freedesktop")
|
||||||
|
local battery_widget = require("battery-widget")
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
-- Check if awesome encountered an error during startup and fell back to
|
-- Check if awesome encountered an error during startup and fell back to
|
||||||
-- another config (This code will only ever execute for the fallback config)
|
-- another config (This code will only ever execute for the fallback config)
|
||||||
|
@ -33,7 +39,7 @@ do
|
||||||
|
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
title = "Oops, an error happened!",
|
title = "Oops, an error happened!",
|
||||||
text = err })
|
text = tostring(err) })
|
||||||
in_error = false
|
in_error = false
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -41,10 +47,11 @@ end
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- Themes define colours, icons, font and wallpapers.
|
-- Themes define colours, icons, font and wallpapers.
|
||||||
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
|
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
|
||||||
|
|
||||||
-- This is used later as the default terminal and editor to run.
|
-- This is used later as the default terminal and editor to run.
|
||||||
terminal = "x-terminal-emulator"
|
-- terminal = "x-terminal-emulator"
|
||||||
|
terminal = "~/bins/alacritty/usr/bin/alacritty"
|
||||||
editor = os.getenv("EDITOR") or "editor"
|
editor = os.getenv("EDITOR") or "editor"
|
||||||
editor_cmd = terminal .. " -e " .. editor
|
editor_cmd = terminal .. " -e " .. editor
|
||||||
|
|
||||||
|
@ -55,9 +62,12 @@ editor_cmd = terminal .. " -e " .. editor
|
||||||
-- However, you can use another modifier like Mod1, but it may interact with others.
|
-- However, you can use another modifier like Mod1, but it may interact with others.
|
||||||
modkey = "Mod4"
|
modkey = "Mod4"
|
||||||
|
|
||||||
|
lain.layout.termfair.center.nmaster = 4
|
||||||
|
lain.layout.termfair.center.ncol = 2
|
||||||
|
|
||||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||||
local layouts =
|
awful.layout.set(lain.layout.termfair, tag)
|
||||||
{
|
awful.layout.layouts = {
|
||||||
awful.layout.suit.floating,
|
awful.layout.suit.floating,
|
||||||
awful.layout.suit.tile,
|
awful.layout.suit.tile,
|
||||||
awful.layout.suit.tile.left,
|
awful.layout.suit.tile.left,
|
||||||
|
@ -69,41 +79,58 @@ local layouts =
|
||||||
awful.layout.suit.spiral.dwindle,
|
awful.layout.suit.spiral.dwindle,
|
||||||
awful.layout.suit.max,
|
awful.layout.suit.max,
|
||||||
awful.layout.suit.max.fullscreen,
|
awful.layout.suit.max.fullscreen,
|
||||||
awful.layout.suit.magnifier
|
awful.layout.suit.magnifier,
|
||||||
|
awful.layout.suit.corner.nw,
|
||||||
|
lain.layout.termfair,
|
||||||
|
-- awful.layout.suit.corner.ne,
|
||||||
|
-- awful.layout.suit.corner.sw,
|
||||||
|
-- awful.layout.suit.corner.se,
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Wallpaper
|
-- {{{ Helper functions
|
||||||
if beautiful.wallpaper then
|
local function client_menu_toggle_fn()
|
||||||
for s = 1, screen.count() do
|
local instance = nil
|
||||||
gears.wallpaper.maximized(beautiful.wallpaper, s, true)
|
|
||||||
|
return function ()
|
||||||
|
if instance and instance.wibox.visible then
|
||||||
|
instance:hide()
|
||||||
|
instance = nil
|
||||||
|
else
|
||||||
|
instance = awful.menu.clients({ theme = { width = 250 } })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Tags
|
|
||||||
-- Define a tag table which hold all screen tags.
|
|
||||||
tags = {}
|
|
||||||
for s = 1, screen.count() do
|
|
||||||
-- Each screen has its own tag table.
|
|
||||||
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Menu
|
-- {{{ Menu
|
||||||
-- Create a laucher widget and a main menu
|
-- Create a launcher widget and a main menu
|
||||||
myawesomemenu = {
|
myawesomemenu = {
|
||||||
|
{ "hotkeys", function() return false, hotkeys_popup.show_help end},
|
||||||
{ "manual", terminal .. " -e man awesome" },
|
{ "manual", terminal .. " -e man awesome" },
|
||||||
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
||||||
{ "restart", awesome.restart },
|
{ "restart", awesome.restart },
|
||||||
{ "quit", awesome.quit }
|
{ "quit", function() awesome.quit() end}
|
||||||
}
|
}
|
||||||
|
|
||||||
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
|
local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon }
|
||||||
{ "Debian", debian.menu.Debian_menu.Debian },
|
local menu_terminal = { "open terminal", terminal }
|
||||||
{ "open terminal", terminal }
|
|
||||||
}
|
if has_fdo then
|
||||||
})
|
mymainmenu = freedesktop.menu.build({
|
||||||
|
before = { menu_awesome },
|
||||||
|
after = { menu_terminal }
|
||||||
|
})
|
||||||
|
else
|
||||||
|
mymainmenu = awful.menu({
|
||||||
|
items = {
|
||||||
|
menu_awesome,
|
||||||
|
{ "Debian", debian.menu.Debian_menu.Debian },
|
||||||
|
menu_terminal,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||||
menu = mymainmenu })
|
menu = mymainmenu })
|
||||||
|
@ -112,25 +139,32 @@ mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||||
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Wibox
|
-- Keyboard map indicator and switcher
|
||||||
|
mykeyboardlayout = awful.widget.keyboardlayout()
|
||||||
|
|
||||||
|
-- {{{ Wibar
|
||||||
-- Create a textclock widget
|
-- Create a textclock widget
|
||||||
mytextclock = awful.widget.textclock()
|
mytextclock = wibox.widget.textclock()
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
mywibox = {}
|
local taglist_buttons = gears.table.join(
|
||||||
mypromptbox = {}
|
awful.button({ }, 1, function(t) t:view_only() end),
|
||||||
mylayoutbox = {}
|
awful.button({ modkey }, 1, function(t)
|
||||||
mytaglist = {}
|
if client.focus then
|
||||||
mytaglist.buttons = awful.util.table.join(
|
client.focus:move_to_tag(t)
|
||||||
awful.button({ }, 1, awful.tag.viewonly),
|
end
|
||||||
awful.button({ modkey }, 1, awful.client.movetotag),
|
end),
|
||||||
awful.button({ }, 3, awful.tag.viewtoggle),
|
awful.button({ }, 3, awful.tag.viewtoggle),
|
||||||
awful.button({ modkey }, 3, awful.client.toggletag),
|
awful.button({ modkey }, 3, function(t)
|
||||||
awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
|
if client.focus then
|
||||||
awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
|
client.focus:toggle_tag(t)
|
||||||
)
|
end
|
||||||
mytasklist = {}
|
end),
|
||||||
mytasklist.buttons = awful.util.table.join(
|
awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
|
||||||
|
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
|
||||||
|
)
|
||||||
|
|
||||||
|
local tasklist_buttons = gears.table.join(
|
||||||
awful.button({ }, 1, function (c)
|
awful.button({ }, 1, function (c)
|
||||||
if c == client.focus then
|
if c == client.focus then
|
||||||
c.minimized = true
|
c.minimized = true
|
||||||
|
@ -138,8 +172,8 @@ mytasklist.buttons = awful.util.table.join(
|
||||||
-- Without this, the following
|
-- Without this, the following
|
||||||
-- :isvisible() makes no sense
|
-- :isvisible() makes no sense
|
||||||
c.minimized = false
|
c.minimized = false
|
||||||
if not c:isvisible() then
|
if not c:isvisible() and c.first_tag then
|
||||||
awful.tag.viewonly(c:tags()[1])
|
c.first_tag:view_only()
|
||||||
end
|
end
|
||||||
-- This will also un-minimize
|
-- This will also un-minimize
|
||||||
-- the client, if needed
|
-- the client, if needed
|
||||||
|
@ -147,69 +181,78 @@ mytasklist.buttons = awful.util.table.join(
|
||||||
c:raise()
|
c:raise()
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
awful.button({ }, 3, function ()
|
awful.button({ }, 3, client_menu_toggle_fn()),
|
||||||
if instance then
|
|
||||||
instance:hide()
|
|
||||||
instance = nil
|
|
||||||
else
|
|
||||||
instance = awful.menu.clients({
|
|
||||||
theme = { width = 250 }
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.button({ }, 4, function ()
|
awful.button({ }, 4, function ()
|
||||||
awful.client.focus.byidx(1)
|
awful.client.focus.byidx(1)
|
||||||
if client.focus then client.focus:raise() end
|
|
||||||
end),
|
end),
|
||||||
awful.button({ }, 5, function ()
|
awful.button({ }, 5, function ()
|
||||||
awful.client.focus.byidx(-1)
|
awful.client.focus.byidx(-1)
|
||||||
if client.focus then client.focus:raise() end
|
|
||||||
end))
|
end))
|
||||||
|
|
||||||
for s = 1, screen.count() do
|
local function set_wallpaper(s)
|
||||||
|
-- Wallpaper
|
||||||
|
if beautiful.wallpaper then
|
||||||
|
local wallpaper = beautiful.wallpaper
|
||||||
|
-- If wallpaper is a function, call it with the screen
|
||||||
|
if type(wallpaper) == "function" then
|
||||||
|
wallpaper = wallpaper(s)
|
||||||
|
end
|
||||||
|
gears.wallpaper.maximized(wallpaper, s, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
||||||
|
screen.connect_signal("property::geometry", set_wallpaper)
|
||||||
|
|
||||||
|
awful.screen.connect_for_each_screen(function(s)
|
||||||
|
-- Wallpaper
|
||||||
|
set_wallpaper(s)
|
||||||
|
|
||||||
|
-- Each screen has its own tag table.
|
||||||
|
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
|
||||||
|
|
||||||
-- Create a promptbox for each screen
|
-- Create a promptbox for each screen
|
||||||
mypromptbox[s] = awful.widget.prompt()
|
s.mypromptbox = awful.widget.prompt()
|
||||||
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
|
||||||
-- We need one layoutbox per screen.
|
-- We need one layoutbox per screen.
|
||||||
mylayoutbox[s] = awful.widget.layoutbox(s)
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
||||||
mylayoutbox[s]:buttons(awful.util.table.join(
|
s.mylayoutbox:buttons(gears.table.join(
|
||||||
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
|
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
||||||
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
|
awful.button({ }, 3, function () awful.layout.inc(-1) end),
|
||||||
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
|
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||||
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
|
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
|
||||||
-- Create a taglist widget
|
-- Create a taglist widget
|
||||||
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
|
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)
|
||||||
|
|
||||||
-- Create a tasklist widget
|
-- Create a tasklist widget
|
||||||
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
|
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons)
|
||||||
|
|
||||||
-- Create the wibox
|
-- Create the wibox
|
||||||
mywibox[s] = awful.wibox({ position = "top", screen = s })
|
s.mywibox = awful.wibar({ position = "top", screen = s })
|
||||||
|
|
||||||
-- Widgets that are aligned to the left
|
-- Add widgets to the wibox
|
||||||
local left_layout = wibox.layout.fixed.horizontal()
|
s.mywibox:setup {
|
||||||
left_layout:add(mylauncher)
|
layout = wibox.layout.align.horizontal,
|
||||||
left_layout:add(mytaglist[s])
|
{ -- Left widgets
|
||||||
left_layout:add(mypromptbox[s])
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
mylauncher,
|
||||||
-- Widgets that are aligned to the right
|
s.mytaglist,
|
||||||
local right_layout = wibox.layout.fixed.horizontal()
|
s.mypromptbox,
|
||||||
if s == 1 then right_layout:add(wibox.widget.systray()) end
|
},
|
||||||
right_layout:add(mytextclock)
|
s.mytasklist, -- Middle widget
|
||||||
right_layout:add(mylayoutbox[s])
|
{ -- Right widgets
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
-- Now bring it all together (with the tasklist in the middle)
|
mykeyboardlayout,
|
||||||
local layout = wibox.layout.align.horizontal()
|
wibox.widget.systray(),
|
||||||
layout:set_left(left_layout)
|
mytextclock,
|
||||||
layout:set_middle(mytasklist[s])
|
s.mylayoutbox,
|
||||||
layout:set_right(right_layout)
|
},
|
||||||
|
}
|
||||||
mywibox[s]:set_widget(layout)
|
end)
|
||||||
end
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Mouse bindings
|
-- {{{ Mouse bindings
|
||||||
root.buttons(awful.util.table.join(
|
root.buttons(gears.table.join(
|
||||||
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
||||||
awful.button({ }, 4, awful.tag.viewnext),
|
awful.button({ }, 4, awful.tag.viewnext),
|
||||||
awful.button({ }, 5, awful.tag.viewprev)
|
awful.button({ }, 5, awful.tag.viewprev)
|
||||||
|
@ -217,137 +260,203 @@ root.buttons(awful.util.table.join(
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
globalkeys = awful.util.table.join(
|
globalkeys = gears.table.join(
|
||||||
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
|
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||||
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
|
{description="show help", group="awesome"}),
|
||||||
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
|
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
||||||
|
{description = "view previous", group = "tag"}),
|
||||||
|
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
||||||
|
{description = "view next", group = "tag"}),
|
||||||
|
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
|
||||||
|
{description = "go back", group = "tag"}),
|
||||||
|
|
||||||
awful.key({ modkey, }, "j",
|
awful.key({ modkey, }, "j",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.byidx( 1)
|
awful.client.focus.byidx( 1)
|
||||||
if client.focus then client.focus:raise() end
|
end,
|
||||||
end),
|
{description = "focus next by index", group = "client"}
|
||||||
|
),
|
||||||
awful.key({ modkey, }, "k",
|
awful.key({ modkey, }, "k",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.byidx(-1)
|
awful.client.focus.byidx(-1)
|
||||||
if client.focus then client.focus:raise() end
|
end,
|
||||||
end),
|
{description = "focus previous by index", group = "client"}
|
||||||
awful.key({ modkey, }, "w", function () mymainmenu:show() end),
|
),
|
||||||
|
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
||||||
|
{description = "show main menu", group = "awesome"}),
|
||||||
|
|
||||||
-- Layout manipulation
|
-- Layout manipulation
|
||||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
||||||
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
|
{description = "swap with next client by index", group = "client"}),
|
||||||
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
|
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
||||||
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
|
{description = "swap with previous client by index", group = "client"}),
|
||||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
|
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
|
||||||
|
{description = "focus the next screen", group = "screen"}),
|
||||||
|
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
|
||||||
|
{description = "focus the previous screen", group = "screen"}),
|
||||||
|
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
||||||
|
{description = "jump to urgent client", group = "client"}),
|
||||||
awful.key({ modkey, }, "Tab",
|
awful.key({ modkey, }, "Tab",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.history.previous()
|
awful.client.focus.history.previous()
|
||||||
if client.focus then
|
if client.focus then
|
||||||
client.focus:raise()
|
client.focus:raise()
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
|
{description = "go back", group = "client"}),
|
||||||
|
|
||||||
-- Standard program
|
-- Standard program
|
||||||
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||||
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
{description = "open a terminal", group = "launcher"}),
|
||||||
awful.key({ modkey, "Shift" }, "q", awesome.quit),
|
awful.key({ modkey, "Control" }, "r", awesome.restart,
|
||||||
|
{description = "reload awesome", group = "awesome"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "q", awesome.quit,
|
||||||
|
{description = "quit awesome", group = "awesome"}),
|
||||||
|
|
||||||
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
|
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
|
||||||
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
|
{description = "increase master width factor", group = "layout"}),
|
||||||
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
|
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
|
||||||
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
|
{description = "decrease master width factor", group = "layout"}),
|
||||||
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
|
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
|
||||||
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
|
{description = "increase the number of master clients", group = "layout"}),
|
||||||
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
|
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
|
||||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
|
{description = "decrease the number of master clients", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
|
||||||
|
{description = "increase the number of columns", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
|
||||||
|
{description = "decrease the number of columns", group = "layout"}),
|
||||||
|
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
|
||||||
|
{description = "select next", group = "layout"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
||||||
|
{description = "select previous", group = "layout"}),
|
||||||
|
|
||||||
awful.key({ modkey, "Control" }, "n", awful.client.restore),
|
awful.key({ modkey, "Control" }, "n",
|
||||||
|
function ()
|
||||||
|
local c = awful.client.restore()
|
||||||
|
-- Focus restored client
|
||||||
|
if c then
|
||||||
|
client.focus = c
|
||||||
|
c:raise()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{description = "restore minimized", group = "client"}),
|
||||||
|
|
||||||
-- Prompt
|
-- Prompt
|
||||||
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
|
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
||||||
|
{description = "run prompt", group = "launcher"}),
|
||||||
|
|
||||||
awful.key({ modkey }, "x",
|
awful.key({ modkey }, "x",
|
||||||
function ()
|
function ()
|
||||||
awful.prompt.run({ prompt = "Run Lua code: " },
|
awful.prompt.run {
|
||||||
mypromptbox[mouse.screen].widget,
|
prompt = "Run Lua code: ",
|
||||||
awful.util.eval, nil,
|
textbox = awful.screen.focused().mypromptbox.widget,
|
||||||
awful.util.getdir("cache") .. "/history_eval")
|
exe_callback = awful.util.eval,
|
||||||
end),
|
history_path = awful.util.get_cache_dir() .. "/history_eval"
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
{description = "lua execute prompt", group = "awesome"}),
|
||||||
-- Menubar
|
-- Menubar
|
||||||
awful.key({ modkey }, "p", function() menubar.show() end),
|
awful.key({ modkey }, "p", function() menubar.show() end,
|
||||||
|
{description = "show the menubar", group = "launcher"})
|
||||||
-- Screenshots
|
|
||||||
awful.key({ }, "Print", function () awful.util.spawn("scrot -e 'mv $f ~/screenshots/ 2>/dev/null'", false) end),
|
|
||||||
awful.key({ modkey, "Control" }, "l", function () awful.util.spawn("/home/qgodefro/bin/lock", false) end)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
clientkeys = awful.util.table.join(
|
clientkeys = gears.table.join(
|
||||||
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
|
awful.key({ modkey, }, "f",
|
||||||
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
|
function (c)
|
||||||
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
|
c.fullscreen = not c.fullscreen
|
||||||
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
|
c:raise()
|
||||||
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
|
end,
|
||||||
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
|
{description = "toggle fullscreen", group = "client"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
|
||||||
|
{description = "close", group = "client"}),
|
||||||
|
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
|
||||||
|
{description = "toggle floating", group = "client"}),
|
||||||
|
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
|
||||||
|
{description = "move to master", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
||||||
|
{description = "move to screen", group = "client"}),
|
||||||
|
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
||||||
|
{description = "toggle keep on top", group = "client"}),
|
||||||
awful.key({ modkey, }, "n",
|
awful.key({ modkey, }, "n",
|
||||||
function (c)
|
function (c)
|
||||||
-- The client currently has the input focus, so it cannot be
|
-- The client currently has the input focus, so it cannot be
|
||||||
-- minimized, since minimized clients can't have the focus.
|
-- minimized, since minimized clients can't have the focus.
|
||||||
c.minimized = true
|
c.minimized = true
|
||||||
end),
|
end ,
|
||||||
|
{description = "minimize", group = "client"}),
|
||||||
awful.key({ modkey, }, "m",
|
awful.key({ modkey, }, "m",
|
||||||
|
function (c)
|
||||||
|
c.maximized = not c.maximized
|
||||||
|
c:raise()
|
||||||
|
end ,
|
||||||
|
{description = "(un)maximize", group = "client"}),
|
||||||
|
awful.key({ modkey, "Control" }, "m",
|
||||||
|
function (c)
|
||||||
|
c.maximized_vertical = not c.maximized_vertical
|
||||||
|
c:raise()
|
||||||
|
end ,
|
||||||
|
{description = "(un)maximize vertically", group = "client"}),
|
||||||
|
awful.key({ modkey, "Shift" }, "m",
|
||||||
function (c)
|
function (c)
|
||||||
c.maximized_horizontal = not c.maximized_horizontal
|
c.maximized_horizontal = not c.maximized_horizontal
|
||||||
c.maximized_vertical = not c.maximized_vertical
|
c:raise()
|
||||||
end)
|
end ,
|
||||||
|
{description = "(un)maximize horizontally", group = "client"})
|
||||||
|
|
||||||
|
awful.key({ modkey, "Control" }, "l", function () awful.util.spawn("/home/qgodefro/.local/bin/lock", false) end)
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Bind all key numbers to tags.
|
-- Bind all key numbers to tags.
|
||||||
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
-- Be careful: we use keycodes to make it work on any keyboard layout.
|
||||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||||
for i = 1, 9 do
|
for i = 1, 9 do
|
||||||
globalkeys = awful.util.table.join(globalkeys,
|
globalkeys = gears.table.join(globalkeys,
|
||||||
-- View tag only.
|
-- View tag only.
|
||||||
awful.key({ modkey }, "#" .. i + 9,
|
awful.key({ modkey }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
local screen = mouse.screen
|
local screen = awful.screen.focused()
|
||||||
local tag = awful.tag.gettags(screen)[i]
|
local tag = screen.tags[i]
|
||||||
if tag then
|
if tag then
|
||||||
awful.tag.viewonly(tag)
|
tag:view_only()
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
-- Toggle tag.
|
{description = "view tag #"..i, group = "tag"}),
|
||||||
|
-- Toggle tag display.
|
||||||
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
local screen = mouse.screen
|
local screen = awful.screen.focused()
|
||||||
local tag = awful.tag.gettags(screen)[i]
|
local tag = screen.tags[i]
|
||||||
if tag then
|
if tag then
|
||||||
awful.tag.viewtoggle(tag)
|
awful.tag.viewtoggle(tag)
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
|
{description = "toggle tag #" .. i, group = "tag"}),
|
||||||
-- Move client to tag.
|
-- Move client to tag.
|
||||||
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
if client.focus then
|
if client.focus then
|
||||||
local tag = awful.tag.gettags(client.focus.screen)[i]
|
local tag = client.focus.screen.tags[i]
|
||||||
if tag then
|
if tag then
|
||||||
awful.client.movetotag(tag)
|
client.focus:move_to_tag(tag)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end),
|
end,
|
||||||
-- Toggle tag.
|
{description = "move focused client to tag #"..i, group = "tag"}),
|
||||||
|
-- Toggle tag on focused client.
|
||||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
||||||
function ()
|
function ()
|
||||||
if client.focus then
|
if client.focus then
|
||||||
local tag = awful.tag.gettags(client.focus.screen)[i]
|
local tag = client.focus.screen.tags[i]
|
||||||
if tag then
|
if tag then
|
||||||
awful.client.toggletag(tag)
|
client.focus:toggle_tag(tag)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end))
|
end,
|
||||||
|
{description = "toggle focused client on tag #" .. i, group = "tag"})
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
clientbuttons = awful.util.table.join(
|
clientbuttons = gears.table.join(
|
||||||
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
||||||
awful.button({ modkey }, 1, awful.mouse.client.move),
|
awful.button({ modkey }, 1, awful.mouse.client.move),
|
||||||
awful.button({ modkey }, 3, awful.mouse.client.resize))
|
awful.button({ modkey }, 3, awful.mouse.client.resize))
|
||||||
|
@ -366,91 +475,117 @@ awful.rules.rules = {
|
||||||
focus = awful.client.focus.filter,
|
focus = awful.client.focus.filter,
|
||||||
raise = true,
|
raise = true,
|
||||||
keys = clientkeys,
|
keys = clientkeys,
|
||||||
buttons = clientbuttons } },
|
buttons = clientbuttons,
|
||||||
{ rule = { class = "MPlayer" },
|
screen = awful.screen.preferred,
|
||||||
properties = { floating = true } },
|
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||||
{ rule = { class = "pinentry" },
|
}
|
||||||
properties = { floating = true } },
|
},
|
||||||
{ rule = { class = "gimp" },
|
|
||||||
properties = { floating = true } },
|
-- Floating clients.
|
||||||
-- Set Firefox to always map on tags number 2 of screen 1.
|
{ rule_any = {
|
||||||
|
instance = {
|
||||||
|
"DTA", -- Firefox addon DownThemAll.
|
||||||
|
"copyq", -- Includes session name in class.
|
||||||
|
},
|
||||||
|
class = {
|
||||||
|
"Arandr",
|
||||||
|
"Gpick",
|
||||||
|
"Kruler",
|
||||||
|
"MessageWin", -- kalarm.
|
||||||
|
"Sxiv",
|
||||||
|
"Wpa_gui",
|
||||||
|
"pinentry",
|
||||||
|
"veromix",
|
||||||
|
"xtightvncviewer"},
|
||||||
|
|
||||||
|
name = {
|
||||||
|
"Event Tester", -- xev.
|
||||||
|
},
|
||||||
|
role = {
|
||||||
|
"AlarmWindow", -- Thunderbird's calendar.
|
||||||
|
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
||||||
|
}
|
||||||
|
}, properties = { floating = true }},
|
||||||
|
|
||||||
|
-- Add titlebars to normal clients and dialogs
|
||||||
|
{ rule_any = {type = { "normal", "dialog" }
|
||||||
|
}, properties = { titlebars_enabled = true }
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Set Firefox to always map on the tag named "2" on screen 1.
|
||||||
-- { rule = { class = "Firefox" },
|
-- { rule = { class = "Firefox" },
|
||||||
-- properties = { tag = tags[1][2] } },
|
-- properties = { screen = 1, tag = "2" } },
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Signals
|
-- {{{ Signals
|
||||||
-- Signal function to execute when a new client appears.
|
-- Signal function to execute when a new client appears.
|
||||||
client.connect_signal("manage", function (c, startup)
|
client.connect_signal("manage", function (c)
|
||||||
-- Enable sloppy focus
|
-- Set the windows at the slave,
|
||||||
c:connect_signal("mouse::enter", function(c)
|
-- i.e. put it at the end of others instead of setting it master.
|
||||||
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
-- if not awesome.startup then awful.client.setslave(c) end
|
||||||
and awful.client.focus.filter(c) then
|
|
||||||
client.focus = c
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
if not startup then
|
if awesome.startup and
|
||||||
-- Set the windows at the slave,
|
not c.size_hints.user_position
|
||||||
-- i.e. put it at the end of others instead of setting it master.
|
and not c.size_hints.program_position then
|
||||||
-- awful.client.setslave(c)
|
-- Prevent clients from being unreachable after screen count changes.
|
||||||
|
|
||||||
-- Put windows in a smart way, only if they does not set an initial position.
|
|
||||||
if not c.size_hints.user_position and not c.size_hints.program_position then
|
|
||||||
awful.placement.no_overlap(c)
|
|
||||||
awful.placement.no_offscreen(c)
|
|
||||||
end
|
|
||||||
elseif not c.size_hints.user_position and not c.size_hints.program_position then
|
|
||||||
-- Prevent clients from being unreachable after screen count change
|
|
||||||
awful.placement.no_offscreen(c)
|
awful.placement.no_offscreen(c)
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
local titlebars_enabled = false
|
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||||
if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
|
client.connect_signal("request::titlebars", function(c)
|
||||||
-- buttons for the titlebar
|
-- buttons for the titlebar
|
||||||
local buttons = awful.util.table.join(
|
local buttons = gears.table.join(
|
||||||
awful.button({ }, 1, function()
|
awful.button({ }, 1, function()
|
||||||
client.focus = c
|
client.focus = c
|
||||||
c:raise()
|
c:raise()
|
||||||
awful.mouse.client.move(c)
|
awful.mouse.client.move(c)
|
||||||
end),
|
end),
|
||||||
awful.button({ }, 3, function()
|
awful.button({ }, 3, function()
|
||||||
client.focus = c
|
client.focus = c
|
||||||
c:raise()
|
c:raise()
|
||||||
awful.mouse.client.resize(c)
|
awful.mouse.client.resize(c)
|
||||||
end)
|
end)
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Widgets that are aligned to the left
|
awful.titlebar(c) : setup {
|
||||||
local left_layout = wibox.layout.fixed.horizontal()
|
{ -- Left
|
||||||
left_layout:add(awful.titlebar.widget.iconwidget(c))
|
awful.titlebar.widget.iconwidget(c),
|
||||||
left_layout:buttons(buttons)
|
buttons = buttons,
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
|
},
|
||||||
|
{ -- Middle
|
||||||
|
{ -- Title
|
||||||
|
align = "center",
|
||||||
|
widget = awful.titlebar.widget.titlewidget(c)
|
||||||
|
},
|
||||||
|
buttons = buttons,
|
||||||
|
layout = wibox.layout.flex.horizontal
|
||||||
|
},
|
||||||
|
{ -- Right
|
||||||
|
awful.titlebar.widget.floatingbutton (c),
|
||||||
|
awful.titlebar.widget.maximizedbutton(c),
|
||||||
|
awful.titlebar.widget.stickybutton (c),
|
||||||
|
awful.titlebar.widget.ontopbutton (c),
|
||||||
|
awful.titlebar.widget.closebutton (c),
|
||||||
|
layout = wibox.layout.fixed.horizontal()
|
||||||
|
},
|
||||||
|
layout = wibox.layout.align.horizontal
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
|
||||||
-- Widgets that are aligned to the right
|
-- Enable sloppy focus, so that focus follows mouse.
|
||||||
local right_layout = wibox.layout.fixed.horizontal()
|
client.connect_signal("mouse::enter", function(c)
|
||||||
right_layout:add(awful.titlebar.widget.floatingbutton(c))
|
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
|
||||||
right_layout:add(awful.titlebar.widget.maximizedbutton(c))
|
and awful.client.focus.filter(c) then
|
||||||
right_layout:add(awful.titlebar.widget.stickybutton(c))
|
client.focus = c
|
||||||
right_layout:add(awful.titlebar.widget.ontopbutton(c))
|
|
||||||
right_layout:add(awful.titlebar.widget.closebutton(c))
|
|
||||||
|
|
||||||
-- The title goes in the middle
|
|
||||||
local middle_layout = wibox.layout.flex.horizontal()
|
|
||||||
local title = awful.titlebar.widget.titlewidget(c)
|
|
||||||
title:set_align("center")
|
|
||||||
middle_layout:add(title)
|
|
||||||
middle_layout:buttons(buttons)
|
|
||||||
|
|
||||||
-- Now bring it all together
|
|
||||||
local layout = wibox.layout.align.horizontal()
|
|
||||||
layout:set_left(left_layout)
|
|
||||||
layout:set_right(right_layout)
|
|
||||||
layout:set_middle(middle_layout)
|
|
||||||
|
|
||||||
awful.titlebar(c):set_widget(layout)
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
local battery = battery_widget:new({})
|
||||||
|
right_layout:add(battery.widget)
|
|
@ -1,16 +1,15 @@
|
||||||
" Vim color file
|
" Vim color file
|
||||||
"
|
"
|
||||||
" Author: Tomas Restrepo <tomas@winterdom.com>
|
" Author: Tomas Restrepo <tomas@winterdom.com>
|
||||||
|
" https://github.com/tomasr/molokai
|
||||||
"
|
"
|
||||||
" Note: Based on the monokai theme for textmate
|
" Note: Based on the Monokai theme for TextMate
|
||||||
" by Wimer Hazenberg and its darker variant
|
" by Wimer Hazenberg and its darker variant
|
||||||
" by Hamish Stuart Macpherson
|
" by Hamish Stuart Macpherson
|
||||||
"
|
"
|
||||||
" Slightly modified for transparent terminals by Dennis Klein / http://klein2.de
|
|
||||||
|
|
||||||
hi clear
|
hi clear
|
||||||
|
|
||||||
"set background=dark
|
|
||||||
if version > 580
|
if version > 580
|
||||||
" no guarantees for version 5.8 and below, but this makes it stop
|
" no guarantees for version 5.8 and below, but this makes it stop
|
||||||
" complaining
|
" complaining
|
||||||
|
@ -35,6 +34,7 @@ hi String guifg=#E6DB74
|
||||||
hi Conditional guifg=#F92672 gui=bold
|
hi Conditional guifg=#F92672 gui=bold
|
||||||
hi Constant guifg=#AE81FF gui=bold
|
hi Constant guifg=#AE81FF gui=bold
|
||||||
hi Cursor guifg=#000000 guibg=#F8F8F0
|
hi Cursor guifg=#000000 guibg=#F8F8F0
|
||||||
|
hi iCursor guifg=#000000 guibg=#F8F8F0
|
||||||
hi Debug guifg=#BCA3A3 gui=bold
|
hi Debug guifg=#BCA3A3 gui=bold
|
||||||
hi Define guifg=#66D9EF
|
hi Define guifg=#66D9EF
|
||||||
hi Delimiter guifg=#8F8F8F
|
hi Delimiter guifg=#8F8F8F
|
||||||
|
@ -44,7 +44,7 @@ hi DiffDelete guifg=#960050 guibg=#1E0010
|
||||||
hi DiffText guibg=#4C4745 gui=italic,bold
|
hi DiffText guibg=#4C4745 gui=italic,bold
|
||||||
|
|
||||||
hi Directory guifg=#A6E22E gui=bold
|
hi Directory guifg=#A6E22E gui=bold
|
||||||
hi Error guifg=#960050 guibg=#1E0010
|
hi Error guifg=#E6DB74 guibg=#1E0010
|
||||||
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
|
hi ErrorMsg guifg=#F92672 guibg=#232526 gui=bold
|
||||||
hi Exception guifg=#A6E22E gui=bold
|
hi Exception guifg=#A6E22E gui=bold
|
||||||
hi Float guifg=#AE81FF
|
hi Float guifg=#AE81FF
|
||||||
|
@ -75,13 +75,12 @@ hi PreCondit guifg=#A6E22E gui=bold
|
||||||
hi PreProc guifg=#A6E22E
|
hi PreProc guifg=#A6E22E
|
||||||
hi Question guifg=#66D9EF
|
hi Question guifg=#66D9EF
|
||||||
hi Repeat guifg=#F92672 gui=bold
|
hi Repeat guifg=#F92672 gui=bold
|
||||||
hi Search guifg=#FFFFFF guibg=#455354
|
hi Search guifg=#000000 guibg=#FFE792
|
||||||
" marks column
|
" marks
|
||||||
hi SignColumn guifg=#A6E22E guibg=#232526
|
hi SignColumn guifg=#A6E22E guibg=#232526
|
||||||
hi SpecialChar guifg=#F92672 gui=bold
|
hi SpecialChar guifg=#F92672 gui=bold
|
||||||
hi SpecialComment guifg=#465457 gui=bold
|
hi SpecialComment guifg=#7E8E91 gui=bold
|
||||||
hi Special guifg=#66D9EF guibg=bg gui=italic
|
hi Special guifg=#66D9EF guibg=bg gui=italic
|
||||||
hi SpecialKey guifg=#888A85 gui=italic
|
|
||||||
if has("spell")
|
if has("spell")
|
||||||
hi SpellBad guisp=#FF0000 gui=undercurl
|
hi SpellBad guisp=#FF0000 gui=undercurl
|
||||||
hi SpellCap guisp=#7070F0 gui=undercurl
|
hi SpellCap guisp=#7070F0 gui=undercurl
|
||||||
|
@ -107,27 +106,44 @@ hi Visual guibg=#403D3D
|
||||||
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
|
hi WarningMsg guifg=#FFFFFF guibg=#333333 gui=bold
|
||||||
hi WildMenu guifg=#66D9EF guibg=#000000
|
hi WildMenu guifg=#66D9EF guibg=#000000
|
||||||
|
|
||||||
|
hi TabLineFill guifg=#1B1D1E guibg=#1B1D1E
|
||||||
|
hi TabLine guibg=#1B1D1E guifg=#808080 gui=none
|
||||||
|
|
||||||
if s:molokai_original == 1
|
if s:molokai_original == 1
|
||||||
hi Normal guifg=#F8F8F2 guibg=none
|
hi Normal guifg=#F8F8F2 guibg=#272822
|
||||||
hi Comment guifg=#75715E
|
hi Comment guifg=#75715E
|
||||||
hi CursorLine guibg=#3E3D32
|
hi CursorLine guibg=#3E3D32
|
||||||
|
hi CursorLineNr guifg=#FD971F gui=none
|
||||||
hi CursorColumn guibg=#3E3D32
|
hi CursorColumn guibg=#3E3D32
|
||||||
|
hi ColorColumn guibg=#3B3A32
|
||||||
hi LineNr guifg=#BCBCBC guibg=#3B3A32
|
hi LineNr guifg=#BCBCBC guibg=#3B3A32
|
||||||
hi NonText guifg=#BCBCBC guibg=#3B3A32
|
hi NonText guifg=#75715E
|
||||||
hi NonText guifg=#BCBCBC guibg=none
|
hi SpecialKey guifg=#75715E
|
||||||
else
|
else
|
||||||
hi Normal guifg=#F8F8F2 guibg=none
|
hi Normal guifg=#F8F8F2 guibg=#1B1D1E
|
||||||
hi Comment guifg=#465457
|
hi Comment guifg=#7E8E91
|
||||||
hi CursorLine guibg=#293739
|
hi CursorLine guibg=#293739
|
||||||
|
hi CursorLineNr guifg=#FD971F gui=none
|
||||||
hi CursorColumn guibg=#293739
|
hi CursorColumn guibg=#293739
|
||||||
hi LineNr guifg=#BCBCBC guibg=#232526
|
hi ColorColumn guibg=#232526
|
||||||
hi NonText guifg=#BCBCBC guibg=#232526
|
hi LineNr guifg=#465457 guibg=#232526
|
||||||
|
hi NonText guifg=#465457
|
||||||
|
hi SpecialKey guifg=#465457
|
||||||
end
|
end
|
||||||
|
|
||||||
"
|
"
|
||||||
" Support for 256-color terminal
|
" Support for 256-color terminal
|
||||||
"
|
"
|
||||||
if &t_Co > 255
|
if &t_Co > 255
|
||||||
|
if s:molokai_original == 1
|
||||||
|
hi Normal ctermbg=234
|
||||||
|
hi CursorLine ctermbg=235 cterm=none
|
||||||
|
hi CursorLineNr ctermfg=208 cterm=none
|
||||||
|
else
|
||||||
|
hi Normal ctermfg=252 ctermbg=233
|
||||||
|
hi CursorLine ctermbg=234 cterm=none
|
||||||
|
hi CursorLineNr ctermfg=208 cterm=none
|
||||||
|
endif
|
||||||
hi Boolean ctermfg=135
|
hi Boolean ctermfg=135
|
||||||
hi Character ctermfg=144
|
hi Character ctermfg=144
|
||||||
hi Number ctermfg=135
|
hi Number ctermfg=135
|
||||||
|
@ -152,23 +168,23 @@ if &t_Co > 255
|
||||||
hi FoldColumn ctermfg=67 ctermbg=16
|
hi FoldColumn ctermfg=67 ctermbg=16
|
||||||
hi Folded ctermfg=67 ctermbg=16
|
hi Folded ctermfg=67 ctermbg=16
|
||||||
hi Function ctermfg=118
|
hi Function ctermfg=118
|
||||||
hi Identifier ctermfg=208
|
hi Identifier ctermfg=208 cterm=none
|
||||||
hi Ignore ctermfg=244 ctermbg=232
|
hi Ignore ctermfg=244 ctermbg=232
|
||||||
hi IncSearch ctermfg=193 ctermbg=16
|
hi IncSearch ctermfg=193 ctermbg=16
|
||||||
|
|
||||||
hi Keyword ctermfg=161 cterm=bold
|
hi keyword ctermfg=161 cterm=bold
|
||||||
hi Label ctermfg=229 cterm=none
|
hi Label ctermfg=229 cterm=none
|
||||||
hi Macro ctermfg=193
|
hi Macro ctermfg=193
|
||||||
hi SpecialKey ctermfg=81
|
hi SpecialKey ctermfg=81
|
||||||
|
|
||||||
hi MatchParen ctermfg=16 ctermbg=208 cterm=bold
|
hi MatchParen ctermfg=233 ctermbg=208 cterm=bold
|
||||||
hi ModeMsg ctermfg=229
|
hi ModeMsg ctermfg=229
|
||||||
hi MoreMsg ctermfg=229
|
hi MoreMsg ctermfg=229
|
||||||
hi Operator ctermfg=161
|
hi Operator ctermfg=161
|
||||||
|
|
||||||
" complete menu
|
" complete menu
|
||||||
hi Pmenu ctermfg=81 ctermbg=16
|
hi Pmenu ctermfg=81 ctermbg=16
|
||||||
hi PmenuSel ctermbg=244
|
hi PmenuSel ctermfg=255 ctermbg=242
|
||||||
hi PmenuSbar ctermbg=232
|
hi PmenuSbar ctermbg=232
|
||||||
hi PmenuThumb ctermfg=81
|
hi PmenuThumb ctermfg=81
|
||||||
|
|
||||||
|
@ -176,15 +192,19 @@ if &t_Co > 255
|
||||||
hi PreProc ctermfg=118
|
hi PreProc ctermfg=118
|
||||||
hi Question ctermfg=81
|
hi Question ctermfg=81
|
||||||
hi Repeat ctermfg=161 cterm=bold
|
hi Repeat ctermfg=161 cterm=bold
|
||||||
hi Search ctermfg=253 ctermbg=66
|
hi Search ctermfg=0 ctermbg=222 cterm=NONE
|
||||||
|
|
||||||
" marks column
|
" marks column
|
||||||
hi SignColumn ctermfg=118 ctermbg=235
|
hi SignColumn ctermfg=118 ctermbg=235
|
||||||
hi SpecialChar ctermfg=161 cterm=bold
|
hi SpecialChar ctermfg=161 cterm=bold
|
||||||
hi SpecialComment ctermfg=245 cterm=bold
|
hi SpecialComment ctermfg=245 cterm=bold
|
||||||
hi Special ctermfg=81 ctermbg=232
|
hi Special ctermfg=81
|
||||||
hi SpecialKey ctermfg=245
|
if has("spell")
|
||||||
|
hi SpellBad ctermbg=52
|
||||||
|
hi SpellCap ctermbg=17
|
||||||
|
hi SpellLocal ctermbg=17
|
||||||
|
hi SpellRare ctermfg=none ctermbg=none cterm=reverse
|
||||||
|
endif
|
||||||
hi Statement ctermfg=161 cterm=bold
|
hi Statement ctermfg=161 cterm=bold
|
||||||
hi StatusLine ctermfg=238 ctermbg=253
|
hi StatusLine ctermfg=238 ctermbg=253
|
||||||
hi StatusLineNC ctermfg=244 ctermbg=232
|
hi StatusLineNC ctermfg=244 ctermbg=232
|
||||||
|
@ -200,20 +220,57 @@ if &t_Co > 255
|
||||||
|
|
||||||
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
|
hi VertSplit ctermfg=244 ctermbg=232 cterm=bold
|
||||||
hi VisualNOS ctermbg=238
|
hi VisualNOS ctermbg=238
|
||||||
hi Visual ctermfg=33 ctermbg=235 cterm=bold
|
hi Visual ctermbg=235
|
||||||
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
|
hi WarningMsg ctermfg=231 ctermbg=238 cterm=bold
|
||||||
hi WildMenu ctermfg=81 ctermbg=16
|
hi WildMenu ctermfg=81 ctermbg=16
|
||||||
|
|
||||||
hi Normal ctermfg=252 ctermbg=none
|
|
||||||
hi Comment ctermfg=59
|
hi Comment ctermfg=59
|
||||||
hi CursorLine ctermbg=234 cterm=none
|
hi CursorColumn ctermbg=236
|
||||||
hi CursorColumn ctermbg=234
|
hi ColorColumn ctermbg=236
|
||||||
hi LineNr ctermfg=250 ctermbg=234
|
hi LineNr ctermfg=250 ctermbg=236
|
||||||
" hi NonText ctermfg=250 ctermbg=234
|
hi NonText ctermfg=59
|
||||||
hi NonText cterm=NONE ctermbg=none ctermfg=none
|
|
||||||
hi ExtraWhitespace ctermbg=88 guibg=88
|
hi SpecialKey ctermfg=59
|
||||||
" tabs
|
|
||||||
hi TabLineFill ctermfg=236 ctermbg=236
|
if exists("g:rehash256") && g:rehash256 == 1
|
||||||
hi TabLine ctermfg=White ctermbg=234 cterm=none
|
hi Normal ctermfg=252 ctermbg=234
|
||||||
hi TabLineSel ctermfg=18 ctermbg=39 cterm=none
|
hi CursorLine ctermbg=236 cterm=none
|
||||||
end
|
hi CursorLineNr ctermfg=208 cterm=none
|
||||||
|
|
||||||
|
hi Boolean ctermfg=141
|
||||||
|
hi Character ctermfg=222
|
||||||
|
hi Number ctermfg=141
|
||||||
|
hi String ctermfg=222
|
||||||
|
hi Conditional ctermfg=197 cterm=bold
|
||||||
|
hi Constant ctermfg=141 cterm=bold
|
||||||
|
|
||||||
|
hi DiffDelete ctermfg=125 ctermbg=233
|
||||||
|
|
||||||
|
hi Directory ctermfg=154 cterm=bold
|
||||||
|
hi Error ctermfg=222 ctermbg=233
|
||||||
|
hi Exception ctermfg=154 cterm=bold
|
||||||
|
hi Float ctermfg=141
|
||||||
|
hi Function ctermfg=154
|
||||||
|
hi Identifier ctermfg=208
|
||||||
|
|
||||||
|
hi Keyword ctermfg=197 cterm=bold
|
||||||
|
hi Operator ctermfg=197
|
||||||
|
hi PreCondit ctermfg=154 cterm=bold
|
||||||
|
hi PreProc ctermfg=154
|
||||||
|
hi Repeat ctermfg=197 cterm=bold
|
||||||
|
|
||||||
|
hi Statement ctermfg=197 cterm=bold
|
||||||
|
hi Tag ctermfg=197
|
||||||
|
hi Title ctermfg=203
|
||||||
|
hi Visual ctermbg=238
|
||||||
|
|
||||||
|
hi Comment ctermfg=244
|
||||||
|
hi LineNr ctermfg=239 ctermbg=235
|
||||||
|
hi NonText ctermfg=239
|
||||||
|
hi SpecialKey ctermfg=239
|
||||||
|
endif
|
||||||
|
end
|
||||||
|
|
||||||
|
" Must be at the end, because of ctermbg=234 bug.
|
||||||
|
" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
|
||||||
|
set background=dark
|
19
config/zshrc
19
config/zshrc
|
@ -1,5 +1,6 @@
|
||||||
export PATH=$HOME/bin:$HOME/toolbox:$HOME/.local/bin:/usr/local/bin:$HOME/hosting-run-scripts/:$PATH export ZSH=$HOME/.oh-my-zsh
|
export PATH=$HOME/bins/toolbox:$HOME/.local/bin:/usr/local/bin:$HOME/hosting-run-scripts/:$PATH
|
||||||
|
export ZSH=$HOME/.oh-my-zsh
|
||||||
|
source ~/hosting-run-scripts/rc-files/ovhrc
|
||||||
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
|
||||||
ZSH_THEME="agnoster"
|
ZSH_THEME="agnoster"
|
||||||
|
|
||||||
|
@ -114,7 +115,6 @@ gitignore
|
||||||
#glassfish
|
#glassfish
|
||||||
#globalias
|
#globalias
|
||||||
gnu-utils
|
gnu-utils
|
||||||
go
|
|
||||||
golang
|
golang
|
||||||
gpg-agent
|
gpg-agent
|
||||||
#gradle
|
#gradle
|
||||||
|
@ -268,7 +268,7 @@ tmux
|
||||||
)
|
)
|
||||||
|
|
||||||
zstyle :omz:plugins:ssh-agent agent-forwarding on
|
zstyle :omz:plugins:ssh-agent agent-forwarding on
|
||||||
zstyle :omz:plugins:ssh-agent identities id_ed25519 work_201806 auberge
|
zstyle :omz:plugins:ssh-agent identities auberge work_201909
|
||||||
zstyle :omz:plugins:ssh-agent lifetime 4h
|
zstyle :omz:plugins:ssh-agent lifetime 4h
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
@ -301,8 +301,8 @@ source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
|
||||||
HISTFILE="$HOME/.zshistory"
|
HISTFILE="$HOME/.zshistory"
|
||||||
HISTSIZE=20000
|
HISTSIZE=200000
|
||||||
SAVEHIST=10000
|
SAVEHIST=100000
|
||||||
alias hist='history -D -E'
|
alias hist='history -D -E'
|
||||||
setopt hist_ignore_dups
|
setopt hist_ignore_dups
|
||||||
#export TERM=rxvt-unicode-256color
|
#export TERM=rxvt-unicode-256color
|
||||||
|
@ -322,8 +322,8 @@ status() {
|
||||||
print ""
|
print ""
|
||||||
}
|
}
|
||||||
|
|
||||||
alias fr='setxkbmap fr'
|
alias kbe='setxkbmap be'
|
||||||
alias us='setxkbmap us'
|
alias kus='setxkbmap us'
|
||||||
alias meteo='curl -4 http://wttr.in/Roubaix'
|
alias meteo='curl -4 http://wttr.in/Roubaix'
|
||||||
alias dl='wget -r -k -T 5 -t 2 -U '\''Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0'\'' '
|
alias dl='wget -r -k -T 5 -t 2 -U '\''Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0'\'' '
|
||||||
alias egrep='egrep --color=auto'
|
alias egrep='egrep --color=auto'
|
||||||
|
@ -352,5 +352,6 @@ alias thot_reseller-robot-preprod='thot '\''wss://thot.ovh.com/tail/?tk=e4bdf746
|
||||||
alias m5='sm3 ovh@mozg-mutu5.ovh.ha.ovh.net'
|
alias m5='sm3 ovh@mozg-mutu5.ovh.ha.ovh.net'
|
||||||
alias melt='sm3 gs@mozg-meltingpot.ovh.ha.ovh.net'
|
alias melt='sm3 gs@mozg-meltingpot.ovh.ha.ovh.net'
|
||||||
alias mis='sm3 mozg-mis.ovh.ha.ovh.net'
|
alias mis='sm3 mozg-mis.ovh.ha.ovh.net'
|
||||||
alias logalert='sm3 --osh logovh --log alert | grep "MUTU"'
|
alias logalert='sm3 --osh logovh --log alert | grep -E "MUTU|INTERNE|CLOUDWEB"'
|
||||||
alias evilssh='ssh sm3.ovh.net -- --osh selfForgetHostKey --host mis-reseller.lb.engine.ha.ovh.net --port 10666 && ssh -t sm3.ovh.net -- root@mis-reseller.lb.engine.ha.ovh.net -p 10666'
|
alias evilssh='ssh sm3.ovh.net -- --osh selfForgetHostKey --host mis-reseller.lb.engine.ha.ovh.net --port 10666 && ssh -t sm3.ovh.net -- root@mis-reseller.lb.engine.ha.ovh.net -p 10666'
|
||||||
|
alias c='connect'
|
2
external/oh-my-zsh
vendored
2
external/oh-my-zsh
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 2614b7ecdfe8b8f0cbeafffefb5925196f4011d4
|
Subproject commit 7a76afd61e5daab6fb33f955930efa7f4cf16021
|
Loading…
Add table
Reference in a new issue