Massive update for the awesome window manager
|
@ -9,7 +9,6 @@ This is just a personal repository where i store all my dotfiles, you're free cl
|
||||||
[[./screenshot3.png]]
|
[[./screenshot3.png]]
|
||||||
[[./screenshot5.png]]
|
[[./screenshot5.png]]
|
||||||
[[./screenshot6.png]]
|
[[./screenshot6.png]]
|
||||||
[[./screenshot7.png]]
|
|
||||||
|
|
||||||
* GUIDE
|
* GUIDE
|
||||||
This guide is made for Arch Linux.
|
This guide is made for Arch Linux.
|
||||||
|
|
BIN
screenshot1.png
Before Width: | Height: | Size: 580 KiB After Width: | Height: | Size: 753 KiB |
BIN
screenshot2.png
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 1,022 KiB |
BIN
screenshot3.png
Before Width: | Height: | Size: 624 KiB After Width: | Height: | Size: 998 KiB |
BIN
screenshot4.png
Before Width: | Height: | Size: 581 KiB After Width: | Height: | Size: 864 KiB |
BIN
screenshot5.png
Before Width: | Height: | Size: 362 KiB After Width: | Height: | Size: 865 KiB |
BIN
screenshot6.png
Before Width: | Height: | Size: 345 KiB After Width: | Height: | Size: 879 KiB |
BIN
screenshot7.png
Before Width: | Height: | Size: 346 KiB |
|
@ -1,9 +1,6 @@
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
local awful = require("awful")
|
|
||||||
local ruled = require("ruled")
|
local ruled = require("ruled")
|
||||||
local naughty = require("naughty")
|
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
local gears = require("gears")
|
|
||||||
|
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
naughty.connect_signal(
|
naughty.connect_signal(
|
||||||
|
@ -18,34 +15,6 @@ naughty.connect_signal(
|
||||||
)
|
)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Notifications
|
|
||||||
ruled.notification.connect_signal(
|
|
||||||
"request::rules",
|
|
||||||
function()
|
|
||||||
ruled.notification.append_rule {
|
|
||||||
rule = { },
|
|
||||||
properties = {
|
|
||||||
screen = awful.screen.preferred,
|
|
||||||
implicit_timeout = 5,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
)
|
|
||||||
naughty.connect_signal(
|
|
||||||
"request::display",
|
|
||||||
function(n)
|
|
||||||
naughty.layout.box {
|
|
||||||
notification = n
|
|
||||||
}
|
|
||||||
end
|
|
||||||
)
|
|
||||||
naughty.config.defaults[ "icon_size" ] = 80
|
|
||||||
beautiful.notification_shape =
|
|
||||||
function(cr, w, h)
|
|
||||||
gears.shape.rounded_rect(cr, w, h, 8)
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Signals
|
-- {{{ Signals
|
||||||
-- No borders when rearranging only 1 non-floating or maximized client
|
-- No borders when rearranging only 1 non-floating or maximized client
|
||||||
screen.connect_signal(
|
screen.connect_signal(
|
||||||
|
|
|
@ -5,6 +5,7 @@ require("helpers")
|
||||||
require("apps")
|
require("apps")
|
||||||
require("ui.layouts")
|
require("ui.layouts")
|
||||||
require("ui.bar")
|
require("ui.bar")
|
||||||
|
require("ui.notif")
|
||||||
require("keymaps.keyboard")
|
require("keymaps.keyboard")
|
||||||
require("keymaps.mouse")
|
require("keymaps.mouse")
|
||||||
require("ui.rules")
|
require("ui.rules")
|
||||||
|
|
|
@ -3,15 +3,9 @@ local wibox = require("wibox")
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local theme = require("ui.theme")
|
local theme = require("ui.theme")
|
||||||
local separators = require("ui.custom-widgets.separator")
|
|
||||||
--- }}}
|
|
||||||
|
|
||||||
-- Textclock widget
|
-- Textclock widget
|
||||||
mytextclock = wibox.widget.textclock()
|
mytextclock = wibox.widget.textclock()
|
||||||
|
screen.connect_signal("request::desktop_decoration", function(s)
|
||||||
screen.connect_signal(
|
|
||||||
"request::desktop_decoration",
|
|
||||||
function(s)
|
|
||||||
-- Tag names for each screen
|
-- Tag names for each screen
|
||||||
awful.tag(
|
awful.tag(
|
||||||
{
|
{
|
||||||
|
@ -30,7 +24,11 @@ screen.connect_signal(
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Layoutbox widget
|
-- Layoutbox widget
|
||||||
s.mylayoutbox = awful.widget.layoutbox {
|
s.mylayoutbox = {
|
||||||
|
widget = wibox.container.background,
|
||||||
|
bg = theme.bg_normal,
|
||||||
|
shape = gears.shape.circle,
|
||||||
|
awful.widget.layoutbox {
|
||||||
screen = s,
|
screen = s,
|
||||||
buttons = {
|
buttons = {
|
||||||
awful.button(
|
awful.button(
|
||||||
|
@ -63,41 +61,14 @@ screen.connect_signal(
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
-- Custom widgets
|
|
||||||
-- Volume widget
|
|
||||||
s.volume =
|
|
||||||
awful.widget.watch(
|
|
||||||
".config/awesome/ui/custom-widgets/volume",
|
|
||||||
1 -- Update time in seconds
|
|
||||||
)
|
|
||||||
-- Battery widget
|
|
||||||
s.battery =
|
|
||||||
awful.widget.watch(
|
|
||||||
".config/awesome/ui/custom-widgets/battery",
|
|
||||||
10 -- Update time in seconds
|
|
||||||
)
|
|
||||||
-- Wifi widget
|
|
||||||
s.wifi =
|
|
||||||
awful.widget.watch(
|
|
||||||
".config/awesome/ui/custom-widgets/wifi",
|
|
||||||
10 -- Update time in seconds
|
|
||||||
)
|
|
||||||
-- Brightness widget
|
|
||||||
s.brightness =
|
|
||||||
awful.widget.watch(
|
|
||||||
".config/awesome/ui/custom-widgets/brightness",
|
|
||||||
1 -- Update time in seconds
|
|
||||||
)
|
|
||||||
-- Keyboard layout widget
|
|
||||||
s.layout =
|
|
||||||
awful.widget.watch(
|
|
||||||
".config/awesome/ui/custom-widgets/layout",
|
|
||||||
1 -- Update time in seconds
|
|
||||||
)
|
|
||||||
|
|
||||||
-- Taglist widget
|
-- Taglist widget
|
||||||
s.mytaglist = awful.widget.taglist {
|
s.mytaglist = {
|
||||||
|
widget = wibox.container.background,
|
||||||
|
bg = theme.taglist_bg,
|
||||||
|
shape = gears.shape.rounded_rect,
|
||||||
|
awful.widget.taglist {
|
||||||
screen = s,
|
screen = s,
|
||||||
filter = awful.widget.taglist.filter.all,
|
filter = awful.widget.taglist.filter.all,
|
||||||
buttons = {
|
buttons = {
|
||||||
|
@ -147,22 +118,77 @@ screen.connect_signal(
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-- Separators
|
-- Prepare custom widgets
|
||||||
local spr = wibox.widget.textbox(" ")
|
-- Volume widget
|
||||||
local spr_one_dl = separators.arrow_left(theme.bg_normal, theme.bar_bg_one)
|
s.volume =
|
||||||
local spr_one_ld = separators.arrow_left(theme.bar_bg_one, theme.bar_bg_two)
|
awful.widget.watch(
|
||||||
local spr_two_dl = separators.arrow_left(theme.bar_bg_two, theme.bar_bg_two)
|
".config/awesome/ui/widgets/volume",
|
||||||
local spr_two_ld = separators.arrow_left(theme.bar_bg_two, theme.bar_bg_tre)
|
1 -- Update time in seconds
|
||||||
local spr_tre_dl = separators.arrow_left(theme.bar_bg_tre, theme.bar_bg_tre)
|
)
|
||||||
local spr_tre_ld = separators.arrow_left(theme.bar_bg_tre, theme.bar_bg_for)
|
-- Battery widget
|
||||||
local spr_for_dl = separators.arrow_left(theme.bar_bg_for, theme.bar_bg_for)
|
s.battery =
|
||||||
local spr_for_ld = separators.arrow_left(theme.bar_bg_for, theme.bar_bg_fiv)
|
awful.widget.watch(
|
||||||
local spr_fiv_dl = separators.arrow_left(theme.bar_bg_fiv, theme.bar_bg_fiv)
|
".config/awesome/ui/widgets/battery",
|
||||||
|
10 -- update time in seconds
|
||||||
|
)
|
||||||
|
-- Wifi widget
|
||||||
|
s.wifi =
|
||||||
|
awful.widget.watch(
|
||||||
|
".config/awesome/ui/widgets/wifi",
|
||||||
|
10 -- Update time in seconds
|
||||||
|
)
|
||||||
|
-- Brightness widget
|
||||||
|
s.brightness =
|
||||||
|
awful.widget.watch(
|
||||||
|
".config/awesome/ui/widgets/brightness",
|
||||||
|
1 -- Update time in seconds
|
||||||
|
)
|
||||||
|
-- Keyboard layout widget
|
||||||
|
s.layout =
|
||||||
|
awful.widget.watch(
|
||||||
|
".config/awesome/ui/widgets/layout",
|
||||||
|
1 -- Update time in seconds
|
||||||
|
)
|
||||||
|
|
||||||
-- Wibox
|
-- Prepare custom widgets container
|
||||||
|
local custom_widget_container = {
|
||||||
|
-- Keyboard layout widget
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_one),
|
||||||
|
wibox.container.background(s.layout, theme.bar_bg_one),
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_one),
|
||||||
|
-- Volume widget
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_two),
|
||||||
|
wibox.container.background(s.volume, theme.bar_bg_two),
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_two),
|
||||||
|
-- Brightness widget
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_tre),
|
||||||
|
wibox.container.background(s.brightness, theme.bar_bg_tre),
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_tre),
|
||||||
|
-- Battery widget
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_for),
|
||||||
|
wibox.container.background(s.battery, theme.bar_bg_for),
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_for),
|
||||||
|
-- Wifi widget
|
||||||
|
wibox.container.background(wibox.widget.textbox(" "), theme.bar_bg_fiv),
|
||||||
|
wibox.container.background(s.wifi, theme.bar_bg_fiv),
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Main right widget container with pill shape
|
||||||
|
local right_widgets = {
|
||||||
|
custom_widget_container,
|
||||||
|
widget = wibox.container.background,
|
||||||
|
shape = gears.shape.rounded_rect,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Wibar
|
||||||
s.mywibox = awful.wibar {
|
s.mywibox = awful.wibar {
|
||||||
position = "top",
|
position = "top",
|
||||||
|
height = (30),
|
||||||
|
border_width = (10),
|
||||||
|
border_color = theme.bg_normal,
|
||||||
screen = s,
|
screen = s,
|
||||||
widget = {
|
widget = {
|
||||||
layout = wibox.layout.stack,
|
layout = wibox.layout.stack,
|
||||||
|
@ -171,58 +197,23 @@ screen.connect_signal(
|
||||||
{
|
{
|
||||||
-- [[ Left widgets ]]
|
-- [[ Left widgets ]]
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
-- Layoubox widget
|
-- Layoubox widget
|
||||||
s.mylayoutbox,
|
s.mylayoutbox,
|
||||||
wibox.widget.textbox(" "),
|
wibox.container.background(wibox.widget.textbox(" "), theme.bg_normal),
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
-- Taglist widget
|
-- Taglist widget
|
||||||
s.mytaglist,
|
s.mytaglist,
|
||||||
wibox.widget.textbox(" "),
|
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
},
|
},
|
||||||
nil,
|
nil,
|
||||||
{
|
{
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
-- [[ Right widgets ]]
|
-- [[ Right widgets ]]
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
right_widgets
|
||||||
-- Keyboar layout widget
|
|
||||||
wibox.container.background(spr_one_dl, theme.bar_bg_one),
|
|
||||||
wibox.container.background(spr, theme.bar_bg_one),
|
|
||||||
wibox.container.background(s.layout, theme.bar_bg_one),
|
|
||||||
wibox.container.background(spr, theme.bar_bg_one),
|
|
||||||
wibox.container.background(spr_one_ld, theme.bar_bg_one),
|
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
-- Volume widget
|
|
||||||
wibox.container.background(spr_two_dl, theme.bar_bg_two),
|
|
||||||
wibox.container.background(s.volume, theme.bar_bg_two),
|
|
||||||
wibox.container.background(spr, theme.bar_bg_two),
|
|
||||||
spr_two_ld,
|
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
-- Brightness widget
|
|
||||||
wibox.container.background(spr_tre_dl, theme.bar_bg_tre),
|
|
||||||
wibox.container.background(s.brightness, theme.bar_bg_tre),
|
|
||||||
wibox.container.background(spr, theme.bar_bg_tre),
|
|
||||||
wibox.container.background(spr_tre_ld, theme.bar_bg_tre),
|
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
-- Battery widget
|
|
||||||
wibox.container.background(spr_for_dl, theme.bar_bg_for),
|
|
||||||
wibox.container.background(s.battery, theme.bar_bg_for),
|
|
||||||
wibox.container.background(spr, theme.bar_bg_for),
|
|
||||||
wibox.container.background(spr_for_ld, theme.bar_bg_for),
|
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
-- Wifi widget
|
|
||||||
wibox.container.background(spr_fiv_dl, theme.bar_bg_fiv),
|
|
||||||
wibox.container.background(s.wifi, theme.bar_bg_fiv),
|
|
||||||
wibox.container.background(spr, theme.bar_bg_fiv),
|
|
||||||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
-- [[ Center widgets ]]
|
-- [[ Center widgets ]]
|
||||||
-- Clock widget
|
-- Clock widget
|
||||||
wibox.container.background(mytextclock, theme.bar_clock),
|
wibox.container.background(mytextclock, theme.bar_clock, gears.shape.rounded_rect),
|
||||||
valign = "center",
|
valign = "center",
|
||||||
halign = "center",
|
halign = "center",
|
||||||
layout = wibox.container.place,
|
layout = wibox.container.place,
|
||||||
|
|
|
@ -1,106 +0,0 @@
|
||||||
local wibox = require("wibox")
|
|
||||||
local gears = require("gears")
|
|
||||||
local beautiful = require("beautiful")
|
|
||||||
|
|
||||||
-- Lain Cairo separators util submodule
|
|
||||||
-- lain.util.separators
|
|
||||||
local separators = { height = beautiful.separators_height or 0, width = beautiful.separators_width or 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
|
|
Before Width: | Height: | Size: 461 B After Width: | Height: | Size: 461 B |
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 866 B |
Before Width: | Height: | Size: 865 B After Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 265 B |
112
user/.config/awesome/ui/notif.lua
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
local awful = require("awful")
|
||||||
|
local beautiful = require("beautiful")
|
||||||
|
local dpi = beautiful.xresources.apply_dpi
|
||||||
|
local naughty = require("naughty")
|
||||||
|
local wibox = require("wibox")
|
||||||
|
local ruled = require("ruled")
|
||||||
|
|
||||||
|
naughty.config.defaults.ontop = true
|
||||||
|
naughty.config.defaults.timeout = 5
|
||||||
|
naughty.config.defaults.screen = awful.screen.focused()
|
||||||
|
naughty.config.defaults.border_width = 0
|
||||||
|
naughty.config.defaults.position = "top_right"
|
||||||
|
naughty.config.defaults.title = "Notification"
|
||||||
|
|
||||||
|
ruled.notification.connect_signal(
|
||||||
|
"request::rules",
|
||||||
|
function()
|
||||||
|
-- Critical
|
||||||
|
ruled.notification.append_rule {
|
||||||
|
rule = {
|
||||||
|
urgency = "critical"
|
||||||
|
},
|
||||||
|
properties = {
|
||||||
|
bg = beautiful.notification_bg,
|
||||||
|
fg = beautiful.notification_critical,
|
||||||
|
timeout = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-- Normal
|
||||||
|
ruled.notification.append_rule {
|
||||||
|
rule = {
|
||||||
|
urgency = "normal"
|
||||||
|
},
|
||||||
|
properties = {
|
||||||
|
bg = beautiful.notification_bg,
|
||||||
|
fg = beautiful.notification_fg,
|
||||||
|
timeout = 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-- Low
|
||||||
|
ruled.notification.append_rule {
|
||||||
|
rule = {
|
||||||
|
urgency = "low"
|
||||||
|
},
|
||||||
|
properties = {
|
||||||
|
bg = beautiful.notification_bg,
|
||||||
|
fg = beautiful.notification_fg,
|
||||||
|
timeout = 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
naughty.connect_signal(
|
||||||
|
"request::display",
|
||||||
|
function(n)
|
||||||
|
naughty.layout.box {
|
||||||
|
notification = n,
|
||||||
|
type = "notification",
|
||||||
|
bg = beautiful.bg_normal,
|
||||||
|
widget_template = {
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
naughty.widget.title,
|
||||||
|
forced_height = dpi(38),
|
||||||
|
layout = wibox.layout.align.horizontal
|
||||||
|
},
|
||||||
|
left = dpi(15),
|
||||||
|
right = dpi(15),
|
||||||
|
widget = wibox.container.margin
|
||||||
|
},
|
||||||
|
bg = beautiful.notification_bg_alt,
|
||||||
|
widget = wibox.container.background
|
||||||
|
},
|
||||||
|
strategy = "min",
|
||||||
|
width = dpi(300),
|
||||||
|
widget = wibox.container.constraint
|
||||||
|
},
|
||||||
|
strategy = "max",
|
||||||
|
width = dpi(400),
|
||||||
|
widget = wibox.container.constraint
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
naughty.widget.message,
|
||||||
|
left = dpi(15),
|
||||||
|
right = dpi(15),
|
||||||
|
top = dpi(15),
|
||||||
|
bottom = dpi(15),
|
||||||
|
widget = wibox.container.margin
|
||||||
|
},
|
||||||
|
strategy = "min",
|
||||||
|
height = dpi(60),
|
||||||
|
widget = wibox.container.constraint
|
||||||
|
},
|
||||||
|
strategy = "max",
|
||||||
|
width = dpi(400),
|
||||||
|
widget = wibox.container.constraint
|
||||||
|
},
|
||||||
|
layout = wibox.layout.align.vertical
|
||||||
|
},
|
||||||
|
id = "background_role",
|
||||||
|
widget = naughty.container.background
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
)
|
|
@ -1,6 +1,5 @@
|
||||||
-- {{{ Imports
|
-- {{{ Imports
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
local gcolor = require("gears.color")
|
|
||||||
local dpi = require("beautiful.xresources").apply_dpi
|
local dpi = require("beautiful.xresources").apply_dpi
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
-- }}}
|
-- }}}
|
||||||
|
@ -12,49 +11,53 @@ local theme = {}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ theme font
|
-- {{{ theme font
|
||||||
theme.font = "mononoki Nerd Font 12"
|
theme.font = "mononoki Nerd Font 13"
|
||||||
--- }}}
|
--- }}}
|
||||||
|
|
||||||
-- {{{ bar colors
|
-- {{{ bar colors
|
||||||
theme.bar_bg_one = "#9ece6a"
|
theme.bar_bg_one = "#f7768e"
|
||||||
theme.bar_bg_two = "#ff9e64"
|
theme.bar_bg_two = "#e0af68"
|
||||||
theme.bar_bg_tre = "#f7768e"
|
theme.bar_bg_tre = "#9ece6a"
|
||||||
theme.bar_bg_for = "#7aa2f7"
|
theme.bar_bg_for = "#7aa2f7"
|
||||||
theme.bar_bg_fiv = "#bb9af7"
|
theme.bar_bg_fiv = "#bb9af7"
|
||||||
theme.bar_clock = "#a9b1d6"
|
theme.bar_clock = "#9aa5ce"
|
||||||
--- }}}
|
--- }}}
|
||||||
|
|
||||||
-- {{{ Colors
|
-- {{{ Colors
|
||||||
theme.fg_normal = "#1a1b26"
|
theme.fg_normal = "#243b26"
|
||||||
theme.fg_focus = "#a9b1d6"
|
theme.fg_focus = "#a9b1d6"
|
||||||
theme.fg_urgent = "#c0caf5"
|
theme.fg_urgent = "#c0caf5"
|
||||||
theme.bg_normal = "#1a1b26"
|
theme.bg_normal = "#1a1b26"
|
||||||
theme.bg_focus = "#363b54"
|
theme.bg_focus = "#24283b"
|
||||||
theme.bg_urgent = "#787c99"
|
theme.bg_urgent = "#24283b"
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Borders
|
-- {{{ Borders
|
||||||
beautiful.gap_single_client = false
|
beautiful.gap_single_client = false
|
||||||
theme.useless_gap = dpi(0)
|
theme.useless_gap = dpi(0)
|
||||||
theme.border_width = dpi(1)
|
theme.border_width = dpi(0.5)
|
||||||
theme.border_normal = "#363b54"
|
theme.border_normal = "#363b58"
|
||||||
theme.border_focus = "#7aa2f7"
|
theme.border_focus = "#7aa2f7"
|
||||||
theme.border_marked = "#7aa2f7"
|
theme.border_marked = "#7aa2f7"
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Taglist
|
-- {{{ Taglist
|
||||||
theme.taglist_font = "mononoki Nerd Font Mono 22"
|
theme.taglist_font = "mononoki Nerd Font Mono 28"
|
||||||
theme.taglist_fg_focus = "#f7768e"
|
theme.taglist_bg = "#24283b"
|
||||||
theme.taglist_fg_occupied = "#c0caf5"
|
theme.taglist_fg_focus = "#d5d6db"
|
||||||
theme.taglist_fg_urgent = "#bb9af7"
|
theme.taglist_fg_occupied = "#9aa5ce"
|
||||||
|
theme.taglist_fg_urgent = "#f7758e"
|
||||||
theme.taglist_fg_empty = "#565f89"
|
theme.taglist_fg_empty = "#565f89"
|
||||||
theme.taglist_spacing = 5
|
theme.taglist_spacing = 5
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Notifications
|
-- {{{ Notifications
|
||||||
theme.notification_font = "mononoki Nerd Font 12"
|
theme.notification_font = "mononoki Nerd Font 12"
|
||||||
theme.notification_bg = "#1a1b26"
|
theme.notification_bg = "#24283b"
|
||||||
|
theme.notification_bg_alt = "#414868"
|
||||||
theme.notification_fg = "#c0caf5"
|
theme.notification_fg = "#c0caf5"
|
||||||
|
theme.notification_fg_alt = "#1a1b26"
|
||||||
|
theme.notification_critical = "#f7768e"
|
||||||
theme.notification_shape = gears.shape.rounded_rect
|
theme.notification_shape = gears.shape.rounded_rect
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
@ -75,24 +78,24 @@ theme.mouse_finder_radius = dpi(5)
|
||||||
theme.mouse_finder_timeout = 10
|
theme.mouse_finder_timeout = 10
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Layout
|
-- {{{ Layout Icons
|
||||||
theme.layout_tile = gcolor.recolor_image(themes_path .. "layout-icons/tilew.png", theme.fg_urgent)
|
theme.layout_tile = gears.color.recolor_image(themes_path .. "icons/tilew.png", theme.fg_urgent)
|
||||||
theme.layout_centerwork = gcolor.recolor_image(themes_path .. "layout-icons/centerworkw.png", theme.fg_urgent)
|
theme.layout_centerwork = gears.color.recolor_image(themes_path .. "icons/centerworkw.png", theme.fg_urgent)
|
||||||
theme.layout_tileleft = gcolor.recolor_image(themes_path .. "layout-icons/tileleftw.png", theme.fg_urgent)
|
theme.layout_tileleft = gears.color.recolor_image(themes_path .. "icons/tileleftw.png", theme.fg_urgent)
|
||||||
theme.layout_tilebottom = gcolor.recolor_image(themes_path .. "layout-icons/tilebottomw.png", theme.fg_urgent)
|
theme.layout_tilebottom = gears.color.recolor_image(themes_path .. "icons/tilebottomw.png", theme.fg_urgent)
|
||||||
theme.layout_tiletop = gcolor.recolor_image(themes_path .. "layout-icons/tiletopw.png", theme.fg_urgent)
|
theme.layout_tiletop = gears.color.recolor_image(themes_path .. "icons/tiletopw.png", theme.fg_urgent)
|
||||||
theme.layout_fairv = gcolor.recolor_image(themes_path .. "layout-icons/fairvw.png", theme.fg_urgent)
|
theme.layout_fairv = gears.color.recolor_image(themes_path .. "icons/fairvw.png", theme.fg_urgent)
|
||||||
theme.layout_fairh = gcolor.recolor_image(themes_path .. "layout-icons/fairhw.png", theme.fg_urgent)
|
theme.layout_fairh = gears.color.recolor_image(themes_path .. "icons/fairhw.png", theme.fg_urgent)
|
||||||
theme.layout_spiral = gcolor.recolor_image(themes_path .. "layout-icons/spiralw.png", theme.fg_urgent)
|
theme.layout_spiral = gears.color.recolor_image(themes_path .. "icons/spiralw.png", theme.fg_urgent)
|
||||||
theme.layout_dwindle = gcolor.recolor_image(themes_path .. "layout-icons/dwindlew.png", theme.fg_urgent)
|
theme.layout_dwindle = gears.color.recolor_image(themes_path .. "icons/dwindlew.png", theme.fg_urgent)
|
||||||
theme.layout_max = gcolor.recolor_image(themes_path .. "layout-icons/maxw.png", theme.fg_urgent)
|
theme.layout_max = gears.color.recolor_image(themes_path .. "icons/maxw.png", theme.fg_urgent)
|
||||||
theme.layout_fullscreen = gcolor.recolor_image(themes_path .. "layout-icons/fullscreenw.png", theme.fg_urgent)
|
theme.layout_fullscreen = gears.color.recolor_image(themes_path .. "icons/fullscreenw.png", theme.fg_urgent)
|
||||||
theme.layout_magnifier = gcolor.recolor_image(themes_path .. "layout-icons/magnifierw.png", theme.fg_urgent)
|
theme.layout_magnifier = gears.color.recolor_image(themes_path .. "icons/magnifierw.png", theme.fg_urgent)
|
||||||
theme.layout_floating = gcolor.recolor_image(themes_path .. "layout-icons/floatingw.png", theme.fg_urgent)
|
theme.layout_floating = gears.color.recolor_image(themes_path .. "icons/floatingw.png", theme.fg_urgent)
|
||||||
theme.layout_cornernw = gcolor.recolor_image(themes_path .. "layout-icons/cornernw.png", theme.fg_urgent)
|
theme.layout_cornernw = gears.color.recolor_image(themes_path .. "icons/cornernw.png", theme.fg_urgent)
|
||||||
theme.layout_cornerne = gcolor.recolor_image(themes_path .. "layout-icons/cornerne.png", theme.fg_urgent)
|
theme.layout_cornerne = gears.color.recolor_image(themes_path .. "icons/cornerne.png", theme.fg_urgent)
|
||||||
theme.layout_cornersw = gcolor.recolor_image(themes_path .. "layout-icons/cornersw.png", theme.fg_urgent)
|
theme.layout_cornersw = gears.color.recolor_image(themes_path .. "icons/cornersw.png", theme.fg_urgent)
|
||||||
theme.layout_cornerse = gcolor.recolor_image(themes_path .. "layout-icons/cornerse.png", theme.fg_urgent)
|
theme.layout_cornerse = gears.color.recolor_image(themes_path .. "icons/cornerse.png", theme.fg_urgent)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
return theme
|
return theme
|
||||||
|
|
|
@ -7,6 +7,5 @@ if [ "$constate" = "disconnected" ]; then
|
||||||
elif [ "$constate" = "connected" ]; then
|
elif [ "$constate" = "connected" ]; then
|
||||||
echo "直 $currentwfi"
|
echo "直 $currentwfi"
|
||||||
else
|
else
|
||||||
notify-send " Airplane mode activated"
|
echo "睊 "
|
||||||
echo " "
|
|
||||||
fi
|
fi
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
color_theme = "/usr/share/btop/themes/gruvbox_dark_v2.theme"
|
color_theme = "/usr/share/btop/themes/tokyo-night.theme"
|
||||||
|
|
||||||
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||||
theme_background = False
|
theme_background = False
|
||||||
|
|