wm config
This commit is contained in:
parent
33375a30f6
commit
69abb3c54a
|
|
@ -1,9 +1,12 @@
|
||||||
{...}: {
|
{pkgs, ...}: {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autorun = false;
|
autorun = false;
|
||||||
displayManager.sx.enable = true;
|
displayManager.sx.enable = true;
|
||||||
windowManager.awesome.enable = true;
|
windowManager.awesome = {
|
||||||
|
enable = true;
|
||||||
|
luaModules = [pkgs.luaPackages.vicious];
|
||||||
|
};
|
||||||
desktopManager.plasma5.enable = true;
|
desktopManager.plasma5.enable = true;
|
||||||
autoRepeatDelay = 200;
|
autoRepeatDelay = 200;
|
||||||
autoRepeatInterval = 30;
|
autoRepeatInterval = 30;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ local awful = require("awful")
|
||||||
require("awful.autofocus")
|
require("awful.autofocus")
|
||||||
-- Widget and layout library
|
-- Widget and layout library
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
|
local vicious = require("vicious")
|
||||||
-- Theme handling library
|
-- Theme handling library
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
-- Notification library
|
-- Notification library
|
||||||
|
|
@ -110,11 +111,33 @@ menubar.menu_gen.all_categories = {}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- Keyboard map indicator and switcher
|
-- Keyboard map indicator and switcher
|
||||||
mykeyboardlayout = awful.widget.keyboardlayout()
|
-- mykeyboardlayout = awful.widget.keyboardlayout()
|
||||||
|
|
||||||
-- {{{ Wibar
|
-- {{{ Wibar
|
||||||
-- Create a textclock widget
|
-- Create a textclock widget
|
||||||
mytextclock = wibox.widget.textclock()
|
mytextclock = wibox.widget.textclock()
|
||||||
|
cal_style = {
|
||||||
|
bg_color = "#dddddd",
|
||||||
|
fg_color = "#222222",
|
||||||
|
border_width = 0,
|
||||||
|
}
|
||||||
|
cal = awful.widget.calendar_popup.month {
|
||||||
|
margin = 10,
|
||||||
|
bg = "#ff0000",
|
||||||
|
start_sunday = true,
|
||||||
|
style_normal = cal_style,
|
||||||
|
style_header = cal_style,
|
||||||
|
style_weekday = cal_style,
|
||||||
|
style_month = cal_style,
|
||||||
|
style_focus = { border_width = 0 },
|
||||||
|
}
|
||||||
|
cal:attach(mytextclock, "tr", {on_hover=false})
|
||||||
|
memw = wibox.widget.textbox()
|
||||||
|
cpuw = wibox.widget.textbox()
|
||||||
|
vicious.cache(vicious.widgets.mem)
|
||||||
|
vicious.cache(vicious.widgets.cpu)
|
||||||
|
vicious.register(memw, vicious.widgets.mem, " $1% ($2M)", 13)
|
||||||
|
vicious.register(cpuw, vicious.widgets.cpu, " $1%", 17)
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
local taglist_buttons = gears.table.join(
|
local taglist_buttons = gears.table.join(
|
||||||
|
|
@ -204,7 +227,7 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Create the wibox
|
-- Create the wibox
|
||||||
s.mywibox = awful.wibar({ position = "top", screen = s })
|
s.mywibox = awful.wibar({ position = "top", screen = s, margins = 10 })
|
||||||
|
|
||||||
-- Add widgets to the wibox
|
-- Add widgets to the wibox
|
||||||
s.mywibox:setup {
|
s.mywibox:setup {
|
||||||
|
|
@ -218,7 +241,9 @@ awful.screen.connect_for_each_screen(function(s)
|
||||||
s.mytasklist, -- Middle widget
|
s.mytasklist, -- Middle widget
|
||||||
{ -- Right widgets
|
{ -- Right widgets
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
mykeyboardlayout,
|
spacing = 10,
|
||||||
|
cpuw,
|
||||||
|
memw,
|
||||||
wibox.widget.systray(),
|
wibox.widget.systray(),
|
||||||
mytextclock,
|
mytextclock,
|
||||||
s.mylayoutbox,
|
s.mylayoutbox,
|
||||||
|
|
@ -618,11 +643,13 @@ client.connect_signal("mouse::enter", function(c)
|
||||||
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
||||||
end)
|
end)
|
||||||
client.connect_signal("property::floating", function(c)
|
client.connect_signal("property::floating", function(c)
|
||||||
|
if c.titlebars_enabled then
|
||||||
if c.floating then
|
if c.floating then
|
||||||
awful.titlebar(c, {bg = "#7d92c6"})
|
awful.titlebar(c, {bg = "#7d92c6"})
|
||||||
else
|
else
|
||||||
awful.titlebar(c, {bg = beautiful.titlebar_bg_normal})
|
awful.titlebar(c, {bg = beautiful.titlebar_bg_normal})
|
||||||
end
|
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)
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@ theme.border_normal = "#000000"
|
||||||
theme.border_focus = "#4949ff"
|
theme.border_focus = "#4949ff"
|
||||||
theme.border_marked = "#91231c"
|
theme.border_marked = "#91231c"
|
||||||
|
|
||||||
|
theme.snap_bg = "#ddeedd"
|
||||||
|
local gears = require("gears")
|
||||||
|
theme.snap_shape = gears.shape.rectangle
|
||||||
|
|
||||||
-- There are other variable sets
|
-- There are other variable sets
|
||||||
-- overriding the default one when
|
-- overriding the default one when
|
||||||
-- defined, the sets are:
|
-- defined, the sets are:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue