diff --git a/system/display.nix b/system/display.nix index 2c8e30f..557093a 100644 --- a/system/display.nix +++ b/system/display.nix @@ -1,9 +1,12 @@ -{...}: { +{pkgs, ...}: { services.xserver = { enable = true; autorun = false; displayManager.sx.enable = true; - windowManager.awesome.enable = true; + windowManager.awesome = { + enable = true; + luaModules = [pkgs.luaPackages.vicious]; + }; desktopManager.plasma5.enable = true; autoRepeatDelay = 200; autoRepeatInterval = 30; diff --git a/user/config/awesome/rc.lua b/user/config/awesome/rc.lua index 7ee86d2..798b8c1 100644 --- a/user/config/awesome/rc.lua +++ b/user/config/awesome/rc.lua @@ -8,6 +8,7 @@ local awful = require("awful") require("awful.autofocus") -- Widget and layout library local wibox = require("wibox") +local vicious = require("vicious") -- Theme handling library local beautiful = require("beautiful") -- Notification library @@ -110,11 +111,33 @@ menubar.menu_gen.all_categories = {} -- }}} -- Keyboard map indicator and switcher -mykeyboardlayout = awful.widget.keyboardlayout() +-- mykeyboardlayout = awful.widget.keyboardlayout() -- {{{ Wibar -- Create a textclock widget 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 local taglist_buttons = gears.table.join( @@ -204,7 +227,7 @@ awful.screen.connect_for_each_screen(function(s) } -- 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 s.mywibox:setup { @@ -218,7 +241,9 @@ awful.screen.connect_for_each_screen(function(s) s.mytasklist, -- Middle widget { -- Right widgets layout = wibox.layout.fixed.horizontal, - mykeyboardlayout, + spacing = 10, + cpuw, + memw, wibox.widget.systray(), mytextclock, s.mylayoutbox, @@ -618,11 +643,13 @@ client.connect_signal("mouse::enter", function(c) c:emit_signal("request::activate", "mouse_enter", {raise = false}) end) client.connect_signal("property::floating", function(c) - if c.floating then - awful.titlebar(c, {bg = "#7d92c6"}) - else - awful.titlebar(c, {bg = beautiful.titlebar_bg_normal}) - end + if c.titlebars_enabled then + if c.floating then + awful.titlebar(c, {bg = "#7d92c6"}) + else + awful.titlebar(c, {bg = beautiful.titlebar_bg_normal}) + end + end end) client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) diff --git a/user/config/awesome/theme.lua b/user/config/awesome/theme.lua index 8e9cb31..5827d01 100644 --- a/user/config/awesome/theme.lua +++ b/user/config/awesome/theme.lua @@ -30,6 +30,10 @@ theme.border_normal = "#000000" theme.border_focus = "#4949ff" theme.border_marked = "#91231c" +theme.snap_bg = "#ddeedd" +local gears = require("gears") +theme.snap_shape = gears.shape.rectangle + -- There are other variable sets -- overriding the default one when -- defined, the sets are: