bruh
This commit is contained in:
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
# Crylia Theme
|
||||||
|
|
||||||
|
This theme is inspired by simple bar and many other things that I think look good and fit my theme. AwesomeWM lets you configure your desktop as you want, no compromises, the sky is the limit!
|
||||||
|
This is the reason I choose AwesomeWM.
|
||||||
|
|
||||||
|
## FAQ - Wiki
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
If you feel lost, got a problem or just have a question, please check out the wiki first before opening an issue.
|
||||||
|
|
||||||
|
## Quick Install
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Installing my theme is rather easy, just copy the repo and put the awesome folder to ~/.config/
|
||||||
|
But in order for it to work as seen you need some dependencies installed along the way
|
||||||
|
|
||||||
|
||Arch|Ubuntu|Why?|
|
||||||
|
|:-:|:-:|:-:|:-:|
|
||||||
|
|Command|sudo pacman -S ( yay -S for <sup>aur</sup> )|sudo apt install||
|
||||||
|
|AwesomeWM|awesome|awesome|Its your Window Manager lol|
|
||||||
|
|Rofi|rofi|rofi|For the application launcher|
|
||||||
|
|Picom|picom-ibhagwan-git<sup>aur</sup>|[Guide here]()|Compositor, needed for transparency/blur/effects/animations etc|
|
||||||
|
|||||
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
This is my 1.0 release, meaning that I will add many more features as time goes on. At this state the config is usable on (hopefully) all systems complying with my dependency list.
|
||||||
|
|
||||||
|
- [ ] Independent Application launcher
|
||||||
|
- [ ] Alt+Tab like Window switcher
|
||||||
|
- [ ] Switching trough Keyboard layouts using \<*super*\>+\<*space*\>(like on gnome where you hold down super)
|
||||||
|
- [ ] System tray needs a lot of work (maybe an own implementation)
|
||||||
|
- [ ] Manual tiling layout like i3
|
||||||
|
- [ ] Interactive calendar with online support
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Some would say there are more features than a WM needs, I say you can never have enough features (as long as they make some sense).
|
||||||
|
|
||||||
|
- [x] Multi screen support
|
||||||
|
- [x] Interactive taskbar (left, right click and hover over)
|
||||||
|
- [x] Session option to reboot, shutdown etc
|
||||||
|
- [x] Multi keyboard layout support + switch widget
|
||||||
|
- [x] Calendar widget (not interactive)
|
||||||
|
- [x] Rofi application launcher and window switcher
|
||||||
|
- [x] Volume / Brightness switcher
|
||||||
|
|
||||||
|
I've added various widgets you can choose or remove how you like it.
|
||||||
|
|
||||||
|
__Including__:<br>
|
||||||
|
Battery, Network (Wifi, Ethernet), Bluetooth, Volume, Keyboardlayout, Date (with Calendar), Time, Session options, Taglist, Tasklist, Layoutswitcher.
|
||||||
|
|
||||||
165
awesome/crylia_bar/dock.lua
Normal file
165
awesome/crylia_bar/dock.lua
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
--------------------------------------------------------------------------------------------------------------
|
||||||
|
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
|
||||||
|
--------------------------------------------------------------------------------------------------------------
|
||||||
|
-- Awesome Libs
|
||||||
|
local awful = require("awful")
|
||||||
|
local colors = require ("theme.crylia.colors")
|
||||||
|
local dpi = require("beautiful").xresources.apply_dpi
|
||||||
|
local gears = require("gears")
|
||||||
|
local wibox = require("wibox")
|
||||||
|
|
||||||
|
return function(s, programs)
|
||||||
|
|
||||||
|
local function create_dock_element (program, name, size)
|
||||||
|
|
||||||
|
local function create_indicator()
|
||||||
|
local color = ""
|
||||||
|
local indicators = {layout = wibox.layout.flex.horizontal}
|
||||||
|
local t = 2
|
||||||
|
local naughty = require("naughty")
|
||||||
|
for i, indicator_screen in ipairs(screen) do
|
||||||
|
for j, indicator_client in ipairs(indicator_screen.clients) do
|
||||||
|
if indicator_client.class == program then
|
||||||
|
if indicator_client.maximized then
|
||||||
|
color = colors.color["Green200"]
|
||||||
|
elseif indicator_client.fullscreen then
|
||||||
|
color = colors.color["Red200"]
|
||||||
|
elseif indicator_client.focus then
|
||||||
|
color = colors.color["Blue200"]
|
||||||
|
elseif indicator_client.minimised then
|
||||||
|
color = colors.color["Pink200"]
|
||||||
|
else
|
||||||
|
color = colors.color["White"]
|
||||||
|
end
|
||||||
|
|
||||||
|
local indicator = wibox.widget{
|
||||||
|
widget = wibox.container.background,
|
||||||
|
shape = gears.shape.circle,
|
||||||
|
forced_height = dpi(5),
|
||||||
|
bg = color
|
||||||
|
}
|
||||||
|
indicators[t] = indicator
|
||||||
|
t = t + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return indicators
|
||||||
|
end
|
||||||
|
|
||||||
|
local dock_element = wibox.widget{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
resize = true,
|
||||||
|
forced_width = size,
|
||||||
|
forced_height = size,
|
||||||
|
image = Get_icon_by_class_name("Papirus-Dark",program),
|
||||||
|
widget = wibox.widget.imagebox
|
||||||
|
},
|
||||||
|
create_indicator(),
|
||||||
|
layout = wibox.layout.align.vertical,
|
||||||
|
id = "dock_layout"
|
||||||
|
},
|
||||||
|
margins = dpi(5),
|
||||||
|
widget = wibox.container.margin,
|
||||||
|
id = "margin"
|
||||||
|
},
|
||||||
|
shape = function (cr, width, height)
|
||||||
|
gears.shape.rounded_rect(cr, width, height, 10)
|
||||||
|
end,
|
||||||
|
bg = colors.color["Grey900"],
|
||||||
|
widget = wibox.container.background,
|
||||||
|
id = "background"
|
||||||
|
},
|
||||||
|
margins = dpi(5),
|
||||||
|
widget = wibox.container.margin
|
||||||
|
}
|
||||||
|
|
||||||
|
hover_signal(dock_element.background, colors.color["Grey800"], colors.color["White"])
|
||||||
|
|
||||||
|
dock_element:connect_signal(
|
||||||
|
"button::press",
|
||||||
|
function ()
|
||||||
|
awful.spawn(program)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
local dock_tooltip = awful.tooltip{
|
||||||
|
objects = {dock_element},
|
||||||
|
text = name,
|
||||||
|
mode = "outside",
|
||||||
|
preferred_alignments = "middle",
|
||||||
|
margins = dpi(10)
|
||||||
|
}
|
||||||
|
return dock_element
|
||||||
|
end
|
||||||
|
|
||||||
|
local dock = awful.popup{
|
||||||
|
widget = wibox.container.background,
|
||||||
|
ontop = true,
|
||||||
|
bg = colors.color["Grey900"],
|
||||||
|
visible = true,
|
||||||
|
screen = s,
|
||||||
|
type = "dock",
|
||||||
|
height = user_vars.vars.dock_icon_size + 10,
|
||||||
|
placement = function(c) awful.placement.bottom(c, {margins = dpi(10)}) end,
|
||||||
|
shape = function(cr, width, height)
|
||||||
|
gears.shape.rounded_rect(cr, width, height, 15)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
local function get_dock_elements(pr)
|
||||||
|
local dock_elements = {layout = wibox.layout.fixed.horizontal}
|
||||||
|
|
||||||
|
for i, p in ipairs(pr) do
|
||||||
|
dock_elements[i] = create_dock_element(p[1], p[2], user_vars.vars.dock_icon_size)
|
||||||
|
end
|
||||||
|
|
||||||
|
return dock_elements
|
||||||
|
end
|
||||||
|
|
||||||
|
dock:setup {
|
||||||
|
get_dock_elements(programs),
|
||||||
|
layout = wibox.layout.fixed.vertical
|
||||||
|
}
|
||||||
|
|
||||||
|
-- TODO: This function runs only every second, it can be optimized by
|
||||||
|
-- calling it every time the mouse is over the dock, a client changes it states ...
|
||||||
|
-- but im too lazy rn
|
||||||
|
local function check_for_dock_hide()
|
||||||
|
for i, screen in ipairs(screen) do
|
||||||
|
local mx, my = mouse.coords().x * 100 / screen.geometry.width, mouse.coords().y * 100 / screen.geometry.height
|
||||||
|
if ((mx > 30) and (mx < 70)) and (my > 95) then
|
||||||
|
dock.visible = true
|
||||||
|
break;
|
||||||
|
end
|
||||||
|
for j, c in ipairs(screen.clients) do
|
||||||
|
local y = c:geometry().y
|
||||||
|
local h = c.height
|
||||||
|
if (y + h) >= screen.geometry.height - user_vars.vars.dock_icon_size - 35 then
|
||||||
|
dock.visible = false
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
dock.visible = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local naughty = require("naughty")
|
||||||
|
awesome.connect_signal(
|
||||||
|
"manage",
|
||||||
|
function ()
|
||||||
|
naughty.notify({title = "hi"})
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
local dock_intelligent_hide = gears.timer{
|
||||||
|
timeout = 1,
|
||||||
|
autostart = true,
|
||||||
|
call_now = true,
|
||||||
|
callback = function ()
|
||||||
|
check_for_dock_hide()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
end
|
||||||
@@ -31,5 +31,6 @@ awful.screen.connect_for_each_screen(
|
|||||||
require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
|
require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
|
||||||
require("crylia_bar.center_bar")(s, s.tasklist)
|
require("crylia_bar.center_bar")(s, s.tasklist)
|
||||||
require("crylia_bar.right_bar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
|
require("crylia_bar.right_bar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
|
||||||
|
require("crylia_bar.dock")(s, user_vars.vars.dock_programs)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
-- Uservariables are stored in this file --
|
-- Uservariables are stored in this file --
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
|
local dpi = require("beautiful").xresources.apply_dpi
|
||||||
local home = os.getenv("HOME")
|
local home = os.getenv("HOME")
|
||||||
|
|
||||||
|
local function get_screen()
|
||||||
|
local screen = {}
|
||||||
|
for i, s in ipairs(screen) do
|
||||||
|
screen[i] = {screen.x, screen.y}
|
||||||
|
end
|
||||||
|
return screen
|
||||||
|
end
|
||||||
|
|
||||||
-- If you want different default programs, wallpaper path or modkey; edit this file.
|
-- If you want different default programs, wallpaper path or modkey; edit this file.
|
||||||
local _M = {
|
local _M = {
|
||||||
|
|
||||||
@@ -28,7 +37,27 @@ local _M = {
|
|||||||
file_manager = "thunar",
|
file_manager = "thunar",
|
||||||
|
|
||||||
-- Screenshot program to make a screenshot when print is hit
|
-- Screenshot program to make a screenshot when print is hit
|
||||||
screenshot_program = "flameshot gui"
|
screenshot_program = "flameshot gui",
|
||||||
|
|
||||||
|
-- If you use the dock here is how you control its size
|
||||||
|
dock_icon_size = dpi(50),
|
||||||
|
|
||||||
|
-- Add your programs exactly like in this example.
|
||||||
|
-- First entry has to be how you would start the program in the terminal (just try it if you dont know yahoo it)
|
||||||
|
-- Second can be what ever the fuck you want it to be (will be the displayed name if you hover over it)
|
||||||
|
dock_programs = {
|
||||||
|
{"firefox", "Firefox"},
|
||||||
|
{"discord", "Discord"},
|
||||||
|
{"spotify", "Spotify"},
|
||||||
|
{"code", "Visual Studio Code"},
|
||||||
|
{"arduino", "Arduino IDE"},
|
||||||
|
{"zoom", "Zoom"},
|
||||||
|
{"thunderbird", "Thunderbird"},
|
||||||
|
{"mattermost-desktop", "Mattermost"},
|
||||||
|
{"blender", "Blender"}
|
||||||
|
},
|
||||||
|
|
||||||
|
screens_size = get_screen()
|
||||||
}
|
}
|
||||||
|
|
||||||
return _M
|
return _M
|
||||||
@@ -70,4 +70,13 @@ Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
|
|||||||
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
|
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
|
||||||
|
|
||||||
Theme.bg_systray = colors.color["BlueGrey800"]
|
Theme.bg_systray = colors.color["BlueGrey800"]
|
||||||
Theme.systray_icon_spacing = dpi(10)
|
Theme.systray_icon_spacing = dpi(10)
|
||||||
|
|
||||||
|
Theme.hotkeys_bg = colors.color["Grey900"]
|
||||||
|
Theme.hotkeys_fg = colors.color["White"]
|
||||||
|
Theme.hotkeys_border_width = 0
|
||||||
|
Theme.hotkeys_shape = function (cr, width, height)
|
||||||
|
gears.shape.rounded_rect(cr, width, height, 10)
|
||||||
|
end
|
||||||
|
Theme.hotkeys_description_font = "JetBrains Mono, Bold 14"
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,13 @@
|
|||||||
-- This is the audio widget --
|
-- This is the audio widget --
|
||||||
------------------------------
|
------------------------------
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
|
local awful = require("awful")
|
||||||
|
|
||||||
function Get_icon(theme, c)
|
function Get_icon(theme, c)
|
||||||
if theme and c then
|
if theme and c then
|
||||||
local clientName = string.lower(c.class) .. ".svg"
|
local clientName
|
||||||
|
clientName = string.lower(c.class) .. ".svg"
|
||||||
local resolutions = {"128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16"}
|
local resolutions = {"128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16"}
|
||||||
local home = os.getenv("HOME")
|
|
||||||
for i, res in ipairs(resolutions) do
|
for i, res in ipairs(resolutions) do
|
||||||
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .."/apps/"
|
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .."/apps/"
|
||||||
local ioStream = io.open(iconDir .. clientName, "r")
|
local ioStream = io.open(iconDir .. clientName, "r")
|
||||||
@@ -18,4 +20,22 @@ function Get_icon(theme, c)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
return c:Get_icon(1)
|
return c:Get_icon(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Get_icon_by_class_name(theme, c)
|
||||||
|
if theme and c then
|
||||||
|
local c_name = string.lower(c) .. ".svg"
|
||||||
|
local resolutions = {"128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16"}
|
||||||
|
for i, res in ipairs(resolutions) do
|
||||||
|
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .."/apps/"
|
||||||
|
local ioStream = io.open(iconDir .. c_name, "r")
|
||||||
|
if ioStream ~= nil then
|
||||||
|
return iconDir .. c_name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Get_icon_by_desktop(theme, c)
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -62,8 +62,8 @@ return function ()
|
|||||||
local battery_tooltip = awful.tooltip{
|
local battery_tooltip = awful.tooltip{
|
||||||
objects = {battery_widget},
|
objects = {battery_widget},
|
||||||
text = "",
|
text = "",
|
||||||
mode = "inside",
|
mode = "outside",
|
||||||
align = "right",
|
preferred_alignments = "middle",
|
||||||
margins = dpi(10)
|
margins = dpi(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ return function ()
|
|||||||
local bluetooth_tooltip = awful.tooltip{
|
local bluetooth_tooltip = awful.tooltip{
|
||||||
objects = {bluetooth_widget},
|
objects = {bluetooth_widget},
|
||||||
text = "",
|
text = "",
|
||||||
mode = "inside",
|
mode = "outside",
|
||||||
align = "right",
|
preferred_alignments = "middle",
|
||||||
margins = dpi(10)
|
margins = dpi(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ return function ()
|
|||||||
|
|
||||||
local xkeyboard_country_code = {
|
local xkeyboard_country_code = {
|
||||||
{"ad", "", "AND"}, -- Andorra
|
{"ad", "", "AND"}, -- Andorra
|
||||||
{"af", "", "AFG"}, -- Afganistan
|
{"af", "", "AFG"}, -- Afghanistan
|
||||||
{"al", "", "ALB"}, -- Albania
|
{"al", "", "ALB"}, -- Albania
|
||||||
{"am", "", "ARM"}, -- Armenia
|
{"am", "", "ARM"}, -- Armenia
|
||||||
{"ara", "", "ARB"}, -- Arabic
|
{"ara", "", "ARB"}, -- Arabic
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ return function ()
|
|||||||
local network_tooltip = awful.tooltip{
|
local network_tooltip = awful.tooltip{
|
||||||
text = "Loading",
|
text = "Loading",
|
||||||
objects = {network_widget},
|
objects = {network_widget},
|
||||||
mode = "inside",
|
mode = "outside",
|
||||||
align = "right",
|
preferred_alignments = "middle",
|
||||||
margins = dpi(10)
|
margins = dpi(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ return function (s)
|
|||||||
width = dpi(100),
|
width = dpi(100),
|
||||||
strategy = "exact",
|
strategy = "exact",
|
||||||
layout = wibox.container.constraint,
|
layout = wibox.container.constraint,
|
||||||
|
id = "container"
|
||||||
},
|
},
|
||||||
widget = wibox.container.background,
|
widget = wibox.container.background,
|
||||||
shape = function (cr, width, height)
|
shape = function (cr, width, height)
|
||||||
@@ -34,7 +35,7 @@ return function (s)
|
|||||||
bg = color.color["BlueGrey800"]
|
bg = color.color["BlueGrey800"]
|
||||||
}
|
}
|
||||||
-- Signals
|
-- Signals
|
||||||
--hover_signal(systray, color.color["Red200"])
|
hover_signal(systray.container, color.color["Red200"])
|
||||||
|
|
||||||
return systray
|
return systray
|
||||||
end
|
end
|
||||||
@@ -90,10 +90,12 @@ local list_update = function (widget, buttons, label, data, objects)
|
|||||||
tag_widget:buttons(create_buttons(buttons, object))
|
tag_widget:buttons(create_buttons(buttons, object))
|
||||||
|
|
||||||
local text, bg_color, bg_image, icon, args = label(object, tag_label)
|
local text, bg_color, bg_image, icon, args = label(object, tag_label)
|
||||||
|
local naughty = require("naughty")
|
||||||
tag_label:set_text(object.index)
|
tag_label:set_text(object.index)
|
||||||
|
if object.urgent == true then
|
||||||
if object == awful.screen.focused().selected_tag then
|
tag_widget:set_bg(color.color["RedA200"])
|
||||||
|
tag_widget:set_fg(color.color["Grey900"])
|
||||||
|
elseif object == awful.screen.focused().selected_tag then
|
||||||
tag_widget:set_bg(color.color["White"])
|
tag_widget:set_bg(color.color["White"])
|
||||||
tag_widget:set_fg(color.color["Grey900"])
|
tag_widget:set_fg(color.color["Grey900"])
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -6,45 +6,42 @@ local color = require('theme.crylia.colors')
|
|||||||
|
|
||||||
local list_update = function (widget, buttons, label, data, objects)
|
local list_update = function (widget, buttons, label, data, objects)
|
||||||
widget:reset()
|
widget:reset()
|
||||||
|
|
||||||
for i, object in ipairs(objects) do
|
for i, object in ipairs(objects) do
|
||||||
|
|
||||||
local task_icon = wibox.widget{
|
|
||||||
nil,
|
|
||||||
{
|
|
||||||
id = "icon",
|
|
||||||
resize = true,
|
|
||||||
widget = wibox.widget.imagebox
|
|
||||||
},
|
|
||||||
nil,
|
|
||||||
layout = wibox.layout.align.horizontal
|
|
||||||
}
|
|
||||||
|
|
||||||
local task_icon_margin = wibox.widget{
|
|
||||||
task_icon,
|
|
||||||
forced_width = dpi(33),
|
|
||||||
margins = dpi(3),
|
|
||||||
widget = wibox.container.margin
|
|
||||||
}
|
|
||||||
|
|
||||||
local task_title = wibox.widget{
|
|
||||||
text = "",
|
|
||||||
align = "center",
|
|
||||||
valign = "center",
|
|
||||||
visible = true,
|
|
||||||
widget = wibox.widget.textbox
|
|
||||||
}
|
|
||||||
|
|
||||||
local task_widget = wibox.widget{
|
local task_widget = wibox.widget{
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
task_icon_margin,
|
{
|
||||||
task_title,
|
{
|
||||||
layout = wibox.layout.fixed.horizontal
|
nil,
|
||||||
|
{
|
||||||
|
id = "icon",
|
||||||
|
resize = true,
|
||||||
|
widget = wibox.widget.imagebox
|
||||||
|
},
|
||||||
|
nil,
|
||||||
|
layout = wibox.layout.align.horizontal,
|
||||||
|
id = "layout_icon"
|
||||||
|
},
|
||||||
|
forced_width = dpi(33),
|
||||||
|
margins = dpi(3),
|
||||||
|
widget = wibox.container.margin,
|
||||||
|
id = "margin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text = "",
|
||||||
|
align = "center",
|
||||||
|
valign = "center",
|
||||||
|
visible = true,
|
||||||
|
widget = wibox.widget.textbox,
|
||||||
|
id = "title"
|
||||||
|
},
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
id = "layout_it"
|
||||||
},
|
},
|
||||||
right = dpi(5),
|
right = dpi(5),
|
||||||
left = dpi(5),
|
left = dpi(5),
|
||||||
widget = wibox.container.margin
|
widget = wibox.container.margin,
|
||||||
|
id = "container"
|
||||||
},
|
},
|
||||||
bg = color.color["White"],
|
bg = color.color["White"],
|
||||||
fg = color.color["Grey900"],
|
fg = color.color["Grey900"],
|
||||||
@@ -87,11 +84,11 @@ local list_update = function (widget, buttons, label, data, objects)
|
|||||||
|
|
||||||
task_widget:buttons(create_buttons(buttons, object))
|
task_widget:buttons(create_buttons(buttons, object))
|
||||||
|
|
||||||
local text, bg, bg_image, icon, args = label(object, task_title)
|
local text, bg, bg_image, icon, args = label(object, task_widget.container.layout_it.title)
|
||||||
|
|
||||||
if object == client.focus then
|
if object == client.focus then
|
||||||
if text == nil or text == '' then
|
if text == nil or text == '' then
|
||||||
task_title:set_margins(0)
|
task_widget.container.layout_it.title:set_margins(0)
|
||||||
else
|
else
|
||||||
local text_full = text:match('>(.-)<')
|
local text_full = text:match('>(.-)<')
|
||||||
if text_full then
|
if text_full then
|
||||||
@@ -104,12 +101,12 @@ local list_update = function (widget, buttons, label, data, objects)
|
|||||||
end
|
end
|
||||||
task_widget:set_bg(color.color["White"])
|
task_widget:set_bg(color.color["White"])
|
||||||
task_widget:set_fg(color.color["Grey900"])
|
task_widget:set_fg(color.color["Grey900"])
|
||||||
task_title:set_text(text)
|
task_widget.container.layout_it.title:set_text(text)
|
||||||
else
|
else
|
||||||
task_widget:set_bg("#3A475C")
|
task_widget:set_bg("#3A475C")
|
||||||
task_title:set_text('')
|
task_widget.container.layout_it.title:set_text('')
|
||||||
end
|
end
|
||||||
task_icon.icon:set_image(Get_icon("Papirus-Dark", object))
|
task_widget.container.layout_it.margin.layout_icon.icon:set_image(Get_icon("Papirus-Dark", object))
|
||||||
widget:add(task_widget)
|
widget:add(task_widget)
|
||||||
widget:set_spacing(dpi(6))
|
widget:set_spacing(dpi(6))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user