systray, dock, icon_handler some major revision
This commit is contained in:
@@ -41,7 +41,8 @@ font:
|
||||
y: 0
|
||||
draw_bold_text_with_bright_colors: false
|
||||
# Background opacity from 0.0 transparent, 1.0 Opaque
|
||||
background_opacity: 0.4
|
||||
window:
|
||||
opacity: 0.4
|
||||
# Terminal colors
|
||||
colors:
|
||||
primary:
|
||||
|
||||
@@ -161,7 +161,7 @@ return function()
|
||||
{ modkey },
|
||||
"d",
|
||||
function ()
|
||||
awful.spawn("rofi -show drun -theme ~/.config/rofi/launcher/launcher.rasi")
|
||||
awful.spawn("/home/crylia/.local/bin/rofi -show drun -theme ~/.config/rofi/rofi.rasi")
|
||||
end,
|
||||
{ descripton = "Application launcher", group = "Application" }
|
||||
),
|
||||
@@ -169,7 +169,15 @@ return function()
|
||||
{ modkey },
|
||||
"Tab",
|
||||
function ()
|
||||
awful.spawn("rofi -show window -theme ~/.config/rofi/launcher/launcher.rasi")
|
||||
awful.spawn("/home/crylia/.local/bin/rofi -show window -theme ~/.config/rofi/window.rasi")
|
||||
end,
|
||||
{ descripton = "Client switcher (alt+tab)", group = "Application" }
|
||||
),
|
||||
awful.key(
|
||||
{ "Mod1" },
|
||||
"Tab",
|
||||
function ()
|
||||
awful.spawn("/home/crylia/.local/bin/rofi -show window -theme ~/.config/rofi/window.rasi")
|
||||
end,
|
||||
{ descripton = "Client switcher (alt+tab)", group = "Application" }
|
||||
),
|
||||
|
||||
@@ -11,6 +11,7 @@ local wibox = require("wibox")
|
||||
return function (s, widget)
|
||||
|
||||
local top_center = awful.popup{
|
||||
screen = s,
|
||||
widget = wibox.container.background,
|
||||
ontop = false,
|
||||
bg = colors.color["Grey900"],
|
||||
@@ -21,7 +22,7 @@ return function (s, widget)
|
||||
gears.shape.rounded_rect(cr, width, height, 10)
|
||||
end
|
||||
}
|
||||
|
||||
local naught = require("naughty")
|
||||
top_center:setup{
|
||||
nil,
|
||||
{
|
||||
@@ -34,10 +35,48 @@ return function (s, widget)
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
awesome.connect_signal(
|
||||
"hide_centerbar",
|
||||
function (hide)
|
||||
top_center.visible = hide
|
||||
client.connect_signal(
|
||||
"manage",
|
||||
function (c)
|
||||
if #s:get_clients() < 1 then
|
||||
top_center.visible = false
|
||||
else
|
||||
top_center.visible = true
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
client.connect_signal(
|
||||
"unmanage",
|
||||
function (c)
|
||||
if #s:get_clients() < 1 then
|
||||
top_center.visible = false
|
||||
else
|
||||
top_center.visible = true
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
client.connect_signal(
|
||||
"tag::switched",
|
||||
function (c)
|
||||
if #s:get_clients() < 1 then
|
||||
top_center.visible = false
|
||||
else
|
||||
top_center.visible = true
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
awesome.connect_signal(
|
||||
"refresh",
|
||||
function (c)
|
||||
if #s:get_clients() < 1 then
|
||||
top_center.visible = false
|
||||
else
|
||||
top_center.visible = true
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
@@ -10,41 +10,8 @@ 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 function create_dock_element (program, name, is_steam, size)
|
||||
is_steam = is_steam or false
|
||||
|
||||
local dock_element = wibox.widget{
|
||||
{
|
||||
@@ -54,10 +21,14 @@ return function(s, programs)
|
||||
resize = true,
|
||||
forced_width = size,
|
||||
forced_height = size,
|
||||
image = Get_icon_by_class_name("Papirus-Dark",program),
|
||||
image = Get_icon("Papirus-Dark",program, is_steam),
|
||||
widget = wibox.widget.imagebox
|
||||
},
|
||||
create_indicator(),
|
||||
{
|
||||
widget = nil,
|
||||
layout = wibox.layout.align.horizontal,
|
||||
id = "indicator"
|
||||
},
|
||||
layout = wibox.layout.align.vertical,
|
||||
id = "dock_layout"
|
||||
},
|
||||
@@ -81,17 +52,57 @@ return function(s, programs)
|
||||
dock_element:connect_signal(
|
||||
"button::press",
|
||||
function ()
|
||||
awful.spawn(program)
|
||||
if is_steam then
|
||||
awful.spawn("steam steam://rungameid/" .. program)
|
||||
else
|
||||
awful.spawn(program)
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
local dock_tooltip = awful.tooltip{
|
||||
awful.tooltip {
|
||||
objects = {dock_element},
|
||||
text = name,
|
||||
mode = "outside",
|
||||
preferred_alignments = "middle",
|
||||
margins = dpi(10)
|
||||
}
|
||||
|
||||
local function create_indicator()
|
||||
local color = ""
|
||||
local indicators
|
||||
local t = 1
|
||||
for indicator_screen in screen do
|
||||
for j,indicator_client in ipairs(indicator_screen.get_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(50),
|
||||
bg = color
|
||||
}
|
||||
indicators.add(indicator)
|
||||
t = t + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return indicators
|
||||
end
|
||||
|
||||
dock_element.background.margin.dock_layout.indicator = create_indicator()
|
||||
|
||||
return dock_element
|
||||
end
|
||||
|
||||
@@ -113,7 +124,7 @@ return function(s, programs)
|
||||
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)
|
||||
dock_elements[i] = create_dock_element(p[1], p[2], p[3], user_vars.vars.dock_icon_size)
|
||||
end
|
||||
|
||||
return dock_elements
|
||||
@@ -123,21 +134,21 @@ return function(s, programs)
|
||||
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 naughty = require("naughty")
|
||||
--[[ TODO: This function runs every 0.1 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
|
||||
for s in screen do
|
||||
local mx, my = mouse.coords().x * 100 / s.geometry.width, mouse.coords().y * 100 / s.geometry.height
|
||||
if ((mx > 30) and (mx < 70)) and (my > 99) then
|
||||
dock.visible = true
|
||||
break;
|
||||
end
|
||||
for j, c in ipairs(screen.clients) do
|
||||
for j,c in ipairs(s.get_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
|
||||
if (y + h) >= s.geometry.height - user_vars.vars.dock_icon_size - 35 then
|
||||
dock.visible = false
|
||||
break;
|
||||
else
|
||||
@@ -146,11 +157,11 @@ return function(s, programs)
|
||||
end
|
||||
end
|
||||
end
|
||||
local naughty = require("naughty")
|
||||
awesome.connect_signal(
|
||||
|
||||
client.connect_signal(
|
||||
"manage",
|
||||
function ()
|
||||
naughty.notify({title = "hi"})
|
||||
check_for_dock_hide()
|
||||
end
|
||||
)
|
||||
|
||||
@@ -162,4 +173,18 @@ return function(s, programs)
|
||||
check_for_dock_hide()
|
||||
end
|
||||
}
|
||||
|
||||
dock:connect_signal(
|
||||
"mouse::enter",
|
||||
function ()
|
||||
dock_intelligent_hide:stop()
|
||||
end
|
||||
)
|
||||
|
||||
dock:connect_signal(
|
||||
"mouse::leave",
|
||||
function ()
|
||||
dock_intelligent_hide:again()
|
||||
end
|
||||
)
|
||||
end
|
||||
@@ -5,10 +5,14 @@
|
||||
local awful = require("awful")
|
||||
|
||||
awful.screen.connect_for_each_screen(
|
||||
-- For each screen this function is called once
|
||||
-- If you want to change the modules per screen use the indices
|
||||
-- e.g. 1 would be the primary screen and 2 the secondary screen.
|
||||
function (s)
|
||||
-- Modules
|
||||
|
||||
require("theme.crylia.modules.powermenu")(s)
|
||||
require("theme.crylia.modules.calendar_osd")(s)
|
||||
-- TODO: rewrite calendar osd, maybe write an own inplementation
|
||||
-- require("theme.crylia.modules.calendar_osd")(s)
|
||||
require("theme.crylia.modules.volume_osd")(s)
|
||||
require("theme.crylia.modules.brightness_osd")(s)
|
||||
require("theme.crylia.modules.titlebar")
|
||||
@@ -22,15 +26,31 @@ awful.screen.connect_for_each_screen(
|
||||
s.bluetooth = require("theme.crylia.widgets.bluetooth")()
|
||||
s.layoutlist = require("theme.crylia.widgets.layout_list")()
|
||||
s.powerbutton = require("theme.crylia.widgets.power")()
|
||||
s.kblayout = require("theme.crylia.widgets.kblayout")()
|
||||
s.kblayout = require("theme.crylia.widgets.kblayout")(s)
|
||||
s.taglist = require("theme.crylia.widgets.taglist")(s)
|
||||
s.tasklist = require("theme.crylia.widgets.tasklist")(s)
|
||||
s.systray = require("theme.crylia.widgets.systray")(s)
|
||||
|
||||
-- Add more of these if statements if you want to change
|
||||
-- the modules/widgets per screen.
|
||||
-- uncomment this example and dont forget to remove/comment the other code below
|
||||
--[[ if s.index == 1 then
|
||||
require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
|
||||
require("crylia_bar.center_bar")(s, s.tasklist)
|
||||
require("crylia_bar.right_bar")(s, {s.date, s.clock,s.powerbutton})
|
||||
require("crylia_bar.dock")(s, user_vars.vars.dock_programs)
|
||||
end ]]
|
||||
|
||||
--[[ if s.index == 2 then
|
||||
require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
|
||||
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})
|
||||
end ]]
|
||||
-- Bars
|
||||
require("crylia_bar.left_bar")(s, {s.layoutlist, s.systray, s.taglist})
|
||||
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.dock")(s, user_vars.vars.dock_programs)
|
||||
|
||||
end
|
||||
)
|
||||
|
||||
@@ -11,6 +11,7 @@ local wibox = require("wibox")
|
||||
return function (s, widgets)
|
||||
|
||||
local top_left = awful.popup{
|
||||
screen = s,
|
||||
widget = wibox.container.background,
|
||||
ontop = false,
|
||||
bg = colors.color["Grey900"],
|
||||
|
||||
@@ -34,5 +34,5 @@ return function()
|
||||
{ "Open Terminal", user_vars.vars.terminal },
|
||||
{ "Settings", settings },
|
||||
}
|
||||
return menu_ttems
|
||||
return menu_items
|
||||
end
|
||||
@@ -2,6 +2,20 @@
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
screen.connect_signal(
|
||||
"added",
|
||||
function ()
|
||||
awesome.restart()
|
||||
end
|
||||
)
|
||||
|
||||
screen.connect_signal(
|
||||
"removed",
|
||||
function ()
|
||||
awesome.restart()
|
||||
end
|
||||
)
|
||||
|
||||
client.connect_signal(
|
||||
"manage",
|
||||
function (c)
|
||||
|
||||
@@ -22,13 +22,13 @@ local _M = {
|
||||
modkey = "Mod4",
|
||||
|
||||
-- place your wallpaper at this path with this name, you could also try to change the path
|
||||
wallpaper = home .. "/.config/awesome/theme/crylia/assets/wallpaper.jpg",
|
||||
wallpaper = home .. "/.config/awesome/theme/crylia/assets/space.jpg",
|
||||
|
||||
-- Naming scheme for the powermenu, userhost = "user@hostname", fullname = "Firstname Surname", something else ...
|
||||
namestyle = "userhost",
|
||||
|
||||
-- List every Keyboard layout you use here comma seperated. (run localectl list-keymaps to list all averiable keymaps)
|
||||
kblayout = {"de", "ru", "us"},
|
||||
kblayout = {"de", "ru"},
|
||||
|
||||
-- Set to false if you dont have a controller
|
||||
bluetooth = true,
|
||||
@@ -45,6 +45,7 @@ local _M = {
|
||||
-- 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)
|
||||
-- For steam games please use this format {"394360", "Name", true} true will tell the func that it's a steam game
|
||||
dock_programs = {
|
||||
{"firefox", "Firefox"},
|
||||
{"discord", "Discord"},
|
||||
|
||||
BIN
awesome/theme/crylia/assets/blueminimalistic.png
Normal file
BIN
awesome/theme/crylia/assets/blueminimalistic.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1008 KiB |
BIN
awesome/theme/crylia/assets/space.jpg
Normal file
BIN
awesome/theme/crylia/assets/space.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 930 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 245 KiB |
@@ -120,6 +120,7 @@ return function (s)
|
||||
}
|
||||
|
||||
local calendar_osd_container = awful.popup{
|
||||
screen = s,
|
||||
widget = wibox.container.background,
|
||||
ontop = true,
|
||||
bg = color.color["Grey900"],
|
||||
|
||||
@@ -14,7 +14,7 @@ Theme = { }
|
||||
dofile(Theme_path .. "theme_variables.lua")
|
||||
dofile(Theme_path .. "layouts.lua")
|
||||
|
||||
Theme.wallpaper = Theme_path .. "assets/wallpaper.png"
|
||||
--Theme.wallpaper = Theme_path .. "assets/space.jpg"
|
||||
Theme.awesome_icon = Theme_path .. "assets/icons/icon.png"
|
||||
Theme.awesome_subicon = Theme_path .. "assets/icons/icon.png"
|
||||
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
------------------------------
|
||||
-- This is the audio widget --
|
||||
------------------------------
|
||||
local naughty = require("naughty")
|
||||
local awful = require("awful")
|
||||
-----------------------------------------------------
|
||||
-- Helper to get icons from a program/program name --
|
||||
-----------------------------------------------------
|
||||
|
||||
function Get_icon(theme, c)
|
||||
-- tries to find a matching file name in /usr/share/icons/THEME/RESOLUTION/apps/ and if not found tried with first letter
|
||||
-- as uppercase, this should get almost all icons to work with the papirus theme atleast
|
||||
-- TODO: try with more icon themes
|
||||
function Get_icon(theme, c, is_steam)
|
||||
if theme and c then
|
||||
local clientName
|
||||
clientName = string.lower(c.class) .. ".svg"
|
||||
-- TODO: Access steamdb api to fetch the clienticon if there is no icon found in this theme
|
||||
if is_steam then
|
||||
clientName = "steam_icon_" .. tostring(c) .. ".svg"
|
||||
else
|
||||
if type(c) == type("") then
|
||||
clientName = string.lower(c) .. ".svg"
|
||||
else
|
||||
clientName = string.lower(c.class) .. ".svg"
|
||||
end
|
||||
end
|
||||
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/"
|
||||
@@ -15,27 +25,29 @@ function Get_icon(theme, c)
|
||||
if ioStream ~= nil then
|
||||
return iconDir .. clientName
|
||||
else
|
||||
return c.icon
|
||||
clientName = clientName:gsub("^%l", string.upper)
|
||||
iconDir = "/usr/share/icons/" .. theme .. "/" .. res .."/apps/"
|
||||
ioStream = io.open(iconDir .. clientName, "r")
|
||||
if ioStream ~= nil then
|
||||
return iconDir .. clientName
|
||||
elseif type(c) ~= type("") then
|
||||
local naughty = require("naughty")
|
||||
if pcall(
|
||||
function ()
|
||||
if c:Get_icon(1) then
|
||||
error("icon error")
|
||||
else
|
||||
return c:Get_icon(1)
|
||||
end
|
||||
end
|
||||
) then
|
||||
return nil
|
||||
end
|
||||
return "/usr/share/icons/Papirus-Dark/128x128/apps/Zoom.svg"
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
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)
|
||||
|
||||
return nil
|
||||
end
|
||||
@@ -53,7 +53,7 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local get_volume = function ()
|
||||
|
||||
@@ -56,7 +56,7 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local battery_tooltip = awful.tooltip{
|
||||
|
||||
@@ -37,7 +37,7 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local bluetooth_tooltip = awful.tooltip{
|
||||
|
||||
@@ -54,7 +54,7 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local set_clock = function ()
|
||||
|
||||
@@ -54,7 +54,7 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local set_date = function ()
|
||||
|
||||
@@ -13,7 +13,7 @@ require("main.signals")
|
||||
-- Icon directory path
|
||||
local icondir = awful.util.getdir("config") .. "theme/crylia/assets/icons/kblayout/"
|
||||
|
||||
return function ()
|
||||
return function (s)
|
||||
local kblayout_widget = wibox.widget{
|
||||
{
|
||||
{
|
||||
@@ -52,7 +52,7 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local layout = "";
|
||||
@@ -246,6 +246,7 @@ return function ()
|
||||
end
|
||||
|
||||
local kb_menu_widget = awful.popup{
|
||||
screen = s,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
|
||||
@@ -66,7 +66,7 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local network_tooltip = awful.tooltip{
|
||||
|
||||
@@ -47,7 +47,7 @@ return function ()
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, height, width, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
-- Signals
|
||||
|
||||
@@ -16,14 +16,14 @@ return function (s)
|
||||
local systray = wibox.widget{
|
||||
{
|
||||
{
|
||||
wibox.widget.systray,
|
||||
wibox.widget.systray(),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
left = dpi(6),
|
||||
right = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
widget = wibox.container.margin,
|
||||
id = 'st'
|
||||
},
|
||||
width = dpi(100),
|
||||
strategy = "exact",
|
||||
layout = wibox.container.constraint,
|
||||
id = "container"
|
||||
@@ -36,6 +36,6 @@ return function (s)
|
||||
}
|
||||
-- Signals
|
||||
hover_signal(systray.container, color.color["Red200"])
|
||||
|
||||
systray.container.st.widget:set_base_size(dpi(20))
|
||||
return systray
|
||||
end
|
||||
@@ -60,7 +60,7 @@ local list_update = function (widget, buttons, label, data, objects)
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local function create_buttons(buttons, object)
|
||||
@@ -235,8 +235,7 @@ local tag_list = function (s)
|
||||
awful.tag.viewprev(t.screen)
|
||||
end
|
||||
)
|
||||
)
|
||||
,
|
||||
),
|
||||
{},
|
||||
list_update,
|
||||
wibox.layout.fixed.horizontal()
|
||||
|
||||
@@ -6,7 +6,9 @@ local color = require('theme.crylia.colors')
|
||||
|
||||
local list_update = function (widget, buttons, label, data, objects)
|
||||
widget:reset()
|
||||
local count
|
||||
for i, object in ipairs(objects) do
|
||||
count = i
|
||||
local task_widget = wibox.widget{
|
||||
{
|
||||
{
|
||||
@@ -48,7 +50,7 @@ local list_update = function (widget, buttons, label, data, objects)
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
widget = wibox.widget.background
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
local task_tool_tip = awful.tooltip{
|
||||
@@ -81,11 +83,9 @@ local list_update = function (widget, buttons, label, data, objects)
|
||||
return btns
|
||||
end
|
||||
end
|
||||
|
||||
task_widget:buttons(create_buttons(buttons, object))
|
||||
|
||||
local text, bg, bg_image, icon, args = label(object, task_widget.container.layout_it.title)
|
||||
|
||||
if object == client.focus then
|
||||
if text == nil or text == '' then
|
||||
task_widget.container.layout_it.title:set_margins(0)
|
||||
@@ -109,7 +109,6 @@ local list_update = function (widget, buttons, label, data, objects)
|
||||
task_widget.container.layout_it.margin.layout_icon.icon:set_image(Get_icon("Papirus-Dark", object))
|
||||
widget:add(task_widget)
|
||||
widget:set_spacing(dpi(6))
|
||||
|
||||
local old_wibox, old_cursor, old_bg
|
||||
task_widget:connect_signal(
|
||||
"mouse::enter",
|
||||
@@ -161,16 +160,10 @@ local list_update = function (widget, buttons, label, data, objects)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
if (widget.children and #widget.children or 0) == 0 then
|
||||
awesome.emit_signal("hide_centerbar", false)
|
||||
else
|
||||
awesome.emit_signal("hide_centerbar", true)
|
||||
end
|
||||
return widget
|
||||
end
|
||||
|
||||
return function(s)
|
||||
local tasklist = function(s)
|
||||
return awful.widget.tasklist(
|
||||
s,
|
||||
awful.widget.tasklist.filter.currenttags,
|
||||
@@ -204,3 +197,5 @@ return function(s)
|
||||
wibox.layout.fixed.horizontal()
|
||||
)
|
||||
end
|
||||
|
||||
return tasklist
|
||||
|
||||
192
rofi/rofi.rasi
192
rofi/rofi.rasi
@@ -1,149 +1,113 @@
|
||||
configuration {
|
||||
font: "Inter Regular 10";
|
||||
show-icons: true;
|
||||
drun-display-format: "{name}";
|
||||
fullscreen: false;
|
||||
threads: 0;
|
||||
matching: "fuzzy";
|
||||
scroll-method: 0;
|
||||
disable-history: false;
|
||||
fullscreen: true;
|
||||
window-thumbnail: true;
|
||||
font: "JetBrainsMono NF 12";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus-Dark";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
* {
|
||||
transparent: #00000000;
|
||||
foreground: #F2F2F2EE;
|
||||
background-selected: #F2F2F245;
|
||||
background-active: #F2F2F230;
|
||||
background-white: #F2F2F211;
|
||||
background-black: #00000066;
|
||||
urgent: #E91E6366;
|
||||
urgent-selected: #E91E6377;
|
||||
background: #00000060;
|
||||
background-alt: #00000000;
|
||||
background-bar: #f2f2f215;
|
||||
foreground: #f2f2f2EE;
|
||||
accent: #ffffff66;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @transparent;
|
||||
text-color: @foreground;
|
||||
location: northwest;
|
||||
anchor: northwest;
|
||||
transparency: "real";
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
border: 0px;
|
||||
border-color: @border;
|
||||
border-radius: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: false;
|
||||
}
|
||||
|
||||
button {
|
||||
action: "ok";
|
||||
str: " ";
|
||||
font: "FantasqueSansMono Nerd Font 11";
|
||||
expand: false;
|
||||
text-color: @foreground;
|
||||
background-color: @transparent;
|
||||
vertical-align: 0.7;
|
||||
horizontal-align: 0.5;
|
||||
enabled: true;
|
||||
padding: 0.30% -0.5% 0% 0.5%;
|
||||
background-color: @background-alt;
|
||||
text-color: @foreground;
|
||||
font: "JetBrainsMono Nerd Font 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
font: "Inter Regular 11";
|
||||
background-color: @transparent;
|
||||
text-color: @foreground;
|
||||
expand: true;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
placeholder: "Type to search";
|
||||
placeholder-color: @foreground;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
case-indicator {
|
||||
background-color: @transparent;
|
||||
text-color: @foreground;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
entry-wrapper {
|
||||
orientation: horizontal;
|
||||
vertical-align: 0.5;
|
||||
spacing: 4px;
|
||||
background-color: @transparent;
|
||||
children: [ button, entry, case-indicator ];
|
||||
background-color: @background-alt;
|
||||
text-color: @foreground;
|
||||
placeholder-color: @foreground;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search";
|
||||
padding: 0% 0% 0% 0%;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
background-color: @background-white;
|
||||
text-color: @foreground;
|
||||
expand: false;
|
||||
border-radius: 6px;
|
||||
margin: 0px calc((100% - 640px) / 2) 0px calc((100% - 640px) / 2);
|
||||
padding: 10px 10px 10px 10px;
|
||||
position: north;
|
||||
children: [ entry-wrapper ];
|
||||
children: [ prompt, entry ];
|
||||
background-color: @background-bar;
|
||||
text-color: @foreground;
|
||||
expand: false;
|
||||
border: 0.1%;
|
||||
border-radius: 8px;
|
||||
border-color: @accent;
|
||||
margin: 0% 25% 0% 25%;
|
||||
padding: 1%;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @transparent;
|
||||
columns: 6;
|
||||
spacing: 5px;
|
||||
cycle: false;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
background-color: @background-alt;
|
||||
columns: 7;
|
||||
lines: 4;
|
||||
spacing: 2%;
|
||||
cycle: false;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background-black;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 25px;
|
||||
padding: 70px 15% 0 15%;
|
||||
/*padding: 70px 135px 0 135px;*/
|
||||
background-color: @background-alt;
|
||||
border: 0% 0% 0% 0%;
|
||||
border-radius: 0% 0% 0% 0%;
|
||||
border-color: @accent;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 8%;
|
||||
padding: 10% 8.5% 10% 8.5%;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @transparent;
|
||||
text-color: @foreground;
|
||||
orientation: vertical;
|
||||
border-radius: 12px;
|
||||
padding: 25px 0 25px 0;
|
||||
background-color: @background-alt;
|
||||
text-color: @foreground;
|
||||
orientation: vertical;
|
||||
border-radius: 0%;
|
||||
padding: 2.5% 0% 2.5% 0%;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 72px;
|
||||
border: 0;
|
||||
background-color: @background-alt;
|
||||
text-color: inherit;
|
||||
horizontal-align: 0.5;
|
||||
vertical-align: 0.5;
|
||||
size: 81px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
expand: true;
|
||||
horizontal-align: 0.5;
|
||||
vertical-align: 0.5;
|
||||
margin: 0 10px 0 10px;
|
||||
}
|
||||
|
||||
element normal.urgent,
|
||||
element alternate.urgent {
|
||||
background-color: @urgent;
|
||||
text-color: @foreground;
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
element normal.active,
|
||||
element alternate.active {
|
||||
background-color: @background-active;
|
||||
text-color: @foreground;
|
||||
background-color: @background-alt;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0.5;
|
||||
vertical-align: 0.5;
|
||||
margin: 0.5% 0.5% -0.5% 0.5%;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @background-selected;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
element selected.urgent {
|
||||
background-color: @urgent-selected;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
element selected.active {
|
||||
background-color: @background-active;
|
||||
color: @foreground-selected;
|
||||
background-color: @background-bar;
|
||||
text-color: @foreground;
|
||||
border: 0% 0% 0% 0%;
|
||||
border-radius: 12px;
|
||||
border-color: @accent;
|
||||
}
|
||||
|
||||
86
rofi/window.rasi
Normal file
86
rofi/window.rasi
Normal file
@@ -0,0 +1,86 @@
|
||||
configuration {
|
||||
font: "JetBrainsMono NF 12";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus-Dark";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
|
||||
* {
|
||||
background: #00000000;
|
||||
background-alt: #00000000;
|
||||
background-bar: #f2f2f215;
|
||||
foreground: #f2f2f2EE;
|
||||
accent: #3DAEE966;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: #21212188;
|
||||
text-color: @foreground;
|
||||
border: 1px;
|
||||
border-color: @border;
|
||||
border-radius: 25px;
|
||||
//width: 26%;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt, entry, inputbar {
|
||||
enabled: false;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @background-alt;
|
||||
columns: 100;
|
||||
lines: 1;
|
||||
spacing: 1%;
|
||||
cycle: false;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background-alt;
|
||||
border: 0% 0% 0% 0%;
|
||||
border-color: @accent;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 2%;
|
||||
padding: 2% 1% 2% 1%;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @background-alt;
|
||||
text-color: @foreground;
|
||||
orientation: vertical;
|
||||
padding: 2.5% 0% 2.5% 0%;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: @background-alt;
|
||||
text-color: inherit;
|
||||
horizontal-align: 0.5;
|
||||
vertical-align: 0.5;
|
||||
size: 6%;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: @background-alt;
|
||||
text-color: inherit;
|
||||
expand: false;
|
||||
horizontal-align: 0.5;
|
||||
vertical-align: 0.5;
|
||||
margin: 0.5% 0.5% -0.5% 0.5%;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: #40404088;
|
||||
text-color: @foreground;
|
||||
border: 0% 0% 0% 0%;
|
||||
border-radius: 12px;
|
||||
border-color: @accent;
|
||||
}
|
||||
Reference in New Issue
Block a user