Fuxx
This commit is contained in:
parent
8268fba83d
commit
7ed2a6e110
9565 changed files with 1315332 additions and 90 deletions
214
home/.config/awesome/ui/bar/init.lua
Normal file
214
home/.config/awesome/ui/bar/init.lua
Normal file
|
@ -0,0 +1,214 @@
|
|||
-- ## Bar ##
|
||||
-- ~~~~~~~~~
|
||||
|
||||
-- requirements
|
||||
-- ~~~~~~~~~~~~
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local beautiful = require("beautiful")
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
|
||||
-- # Bar Widgets :
|
||||
local taglist = require("ui.bar.taglist")
|
||||
local tasklist = require("ui.bar.tasklist")
|
||||
local layoutbox = require("ui.bar.layoutbox")
|
||||
mylayoutbox = wibox.container.margin(layoutbox(s), dpi(4), dpi(4), dpi(4), dpi(4))
|
||||
|
||||
-- # Widgets :
|
||||
-- Keyboard :
|
||||
--local logout_menu_widget = require("widgets.logout-menu")
|
||||
local clock_widget = require('widgets.clock')
|
||||
local keyboardlayout_widget = require('widgets.keyboardlayout')
|
||||
local mem_widget = require('widgets.memory')
|
||||
local cpu_widget = require('widgets.cpu')
|
||||
local temprature_widget = require('widgets.temprature')
|
||||
local battery_widget = require('widgets.battery')
|
||||
local brightness_widget = require('widgets.brightness')
|
||||
local netspeed_widget = require('widgets.net')
|
||||
mylauncher = wibox.container.margin(mylauncher, dpi(2), dpi(2), dpi(2), dpi(2))
|
||||
|
||||
|
||||
|
||||
|
||||
-- Barcontainer :
|
||||
local function barcontainer(widget)
|
||||
local container = wibox.widget
|
||||
{
|
||||
widget,
|
||||
top = dpi(0),
|
||||
bottom = dpi(0),
|
||||
left = dpi(2),
|
||||
right = dpi(2),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
local box = wibox.widget{
|
||||
{
|
||||
container,
|
||||
top = dpi(2),
|
||||
bottom = dpi(2),
|
||||
left = dpi(4),
|
||||
right = dpi(4),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
bg = colors.container,
|
||||
shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,0) end,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
return wibox.widget{
|
||||
box,
|
||||
top = dpi(2),
|
||||
bottom = dpi(2),
|
||||
right = dpi(2),
|
||||
left = dpi(2),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
-- Separator :
|
||||
local separator = wibox.widget{
|
||||
markup = '<span font="' .. theme.font .. '">| </span>',
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
}
|
||||
|
||||
-- Systray
|
||||
local systray = wibox.widget {
|
||||
visible = true,
|
||||
base_size = dpi(30),
|
||||
horizontal = true,
|
||||
screen = 'primary',
|
||||
{
|
||||
{
|
||||
{
|
||||
wibox.widget.systray,
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
margins = {top = dpi(0), bottom = dpi(0), left = dpi(0), right = dpi(0)},
|
||||
widget = wibox.container.margin,
|
||||
},
|
||||
shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,0) end,
|
||||
bg = colors.black,
|
||||
widget = wibox.container.background,
|
||||
},
|
||||
margins = {top = dpi(2), bottom = dpi(2)},
|
||||
widget = wibox.container.margin,
|
||||
}
|
||||
|
||||
-- Logout menu
|
||||
--local logout_menu = wibox.widget {
|
||||
-- {
|
||||
-- {
|
||||
-- {
|
||||
-- logout_menu_widget(),
|
||||
-- layout = wibox.layout.fixed.horizontal,
|
||||
-- },
|
||||
-- margins = {top = dpi(0), bottom = dpi(0), left = dpi(0), right = dpi(0)},
|
||||
-- widget = wibox.container.margin,
|
||||
-- },
|
||||
-- shape = function(cr,w,h) gears.shape.rounded_rect(cr,w,h,0) end,
|
||||
-- bg = colors.black,
|
||||
-- widget = wibox.container.background,
|
||||
-- },
|
||||
-- margins = {top = dpi(2), bottom = dpi(4)},
|
||||
-- widget = wibox.container.margin,
|
||||
--}
|
||||
|
||||
|
||||
--local btn = wibox.widget {
|
||||
-- wibox.widget.systray,
|
||||
-- logout_menu_widget(),
|
||||
-- spacing = dpi(2),
|
||||
-- layout = wibox.layout.fixed.horizontal
|
||||
--}
|
||||
|
||||
-- Right
|
||||
local right = wibox.widget {
|
||||
{
|
||||
-- # Updates :
|
||||
barcontainer(netspeed_widget),
|
||||
-- # Brightness :
|
||||
--barcontainer(brightness_widget),
|
||||
-- # CPU TEMP :
|
||||
barcontainer(temprature_widget),
|
||||
-- # CPU :
|
||||
barcontainer(cpu_widget),
|
||||
-- # RAM :
|
||||
barcontainer(mem_widget),
|
||||
-- # Keybord :
|
||||
barcontainer(keyboardlayout_widget),
|
||||
-- # Clock :
|
||||
barcontainer(clock_widget),
|
||||
-- # Systry :
|
||||
systray,
|
||||
-- # Logout :
|
||||
--logout_menu,
|
||||
-- # Layoutbox :
|
||||
--layoutbox(s),
|
||||
spacing = dpi(4),
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
margins = {top = dpi(2), bottom = dpi(2),},
|
||||
widget = wibox.container.margin,
|
||||
}
|
||||
|
||||
|
||||
local function get_bar(s)
|
||||
s.mywibar = awful.wibar({
|
||||
position = "bottom",
|
||||
type = "dock",
|
||||
ontop = false,
|
||||
stretch = false,
|
||||
visible = true,
|
||||
height = dpi(36),
|
||||
width = s.geometry.width,
|
||||
screen = s,
|
||||
bg = colors.black,
|
||||
--bg = colors.transparent,
|
||||
--opacity = 0.85,
|
||||
})
|
||||
|
||||
--s.mywibar:struts { bottom = dpi(60), top = dpi(36), left = dpi(20), right = dpi(20) }
|
||||
|
||||
s.mywibar:setup({
|
||||
{
|
||||
{
|
||||
layout = wibox.layout.align.horizontal,
|
||||
--expand = "none",
|
||||
{ -- Left widgets :
|
||||
--mylauncher,
|
||||
barcontainer(taglist(s)),
|
||||
--taglist(s),
|
||||
separator,
|
||||
spacing = dpi(8),
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
{ -- Middle widget :
|
||||
tasklist(s),
|
||||
layout = wibox.layout.align.horizontal,
|
||||
},
|
||||
--tasklist(s),
|
||||
{ -- Right widgets :
|
||||
right,
|
||||
-- # Layoutbox :
|
||||
mylayoutbox,
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
},
|
||||
left = dpi(5),
|
||||
right = dpi(5),
|
||||
widget = wibox.container.margin,
|
||||
},
|
||||
shape = function(cr,w,h) gears.shape.rounded_rect(cr, w, h, 0) end,
|
||||
widget = wibox.container.background,
|
||||
})
|
||||
end
|
||||
|
||||
screen.connect_signal("request::desktop_decoration", function(s)
|
||||
get_bar(s)
|
||||
end)
|
||||
|
||||
|
24
home/.config/awesome/ui/bar/layoutbox.lua
Normal file
24
home/.config/awesome/ui/bar/layoutbox.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
-- ## Layoutbox ##
|
||||
-- ~~~~~~~~~~~~~~~
|
||||
|
||||
-- requirements
|
||||
-- ~~~~~~~~~~~~
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
|
||||
return function(s)
|
||||
-- Create a layoutbox widget
|
||||
local layoutbox = awful.widget.layoutbox {
|
||||
screen = s,
|
||||
buttons = {
|
||||
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
||||
awful.button({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 5, function () awful.layout.inc( 1) end),
|
||||
}
|
||||
}
|
||||
layoutbox = wibox.container.margin(layoutbox, dpi(4), dpi(4), dpi(4), dpi(4))
|
||||
return layoutbox
|
||||
end
|
41
home/.config/awesome/ui/bar/taglist.lua
Normal file
41
home/.config/awesome/ui/bar/taglist.lua
Normal file
|
@ -0,0 +1,41 @@
|
|||
-- ## Tag ##
|
||||
-- ~~~~~~~~~
|
||||
|
||||
-- requirements
|
||||
-- ~~~~~~~~~~~~
|
||||
local awful = require("awful")
|
||||
|
||||
|
||||
-- Tags :
|
||||
awful.util.tagnames = { "", "", "", "", "", "", "", "", ""}
|
||||
|
||||
-- Each screen has its own tag table.
|
||||
screen.connect_signal("request::desktop_decoration", function(s)
|
||||
awful.tag(awful.util.tagnames, s, awful.layout.layouts[1])
|
||||
end)
|
||||
|
||||
return function(s)
|
||||
-- Create a taglist widget
|
||||
local taglist = awful.widget.taglist {
|
||||
screen = s,
|
||||
--filter = awful.widget.taglist.filter.all, -- Show All Tags
|
||||
filter = function (t) return t.selected or #t:clients() > 0 end, -- Show only used Tags
|
||||
buttons = {
|
||||
awful.button({ }, 1, function(t) t:view_only() end),
|
||||
awful.button({ modkey }, 1, function(t)
|
||||
if client.focus then
|
||||
client.focus:move_to_tag(t)
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 3, awful.tag.viewtoggle),
|
||||
awful.button({ modkey }, 3, function(t)
|
||||
if client.focus then
|
||||
client.focus:toggle_tag(t)
|
||||
end
|
||||
end),
|
||||
--awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
|
||||
--awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
|
||||
}
|
||||
}
|
||||
return taglist
|
||||
end
|
81
home/.config/awesome/ui/bar/tasklist.lua
Normal file
81
home/.config/awesome/ui/bar/tasklist.lua
Normal file
|
@ -0,0 +1,81 @@
|
|||
-- ## Tasklist ##
|
||||
-- ~~~~~~~~~~~~~~
|
||||
|
||||
-- requirements
|
||||
-- ~~~~~~~~~~~~
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
|
||||
|
||||
return function(s)
|
||||
-- Create a tasklist widget
|
||||
local tasklist = awful.widget.tasklist {
|
||||
screen = s,
|
||||
filter = awful.widget.tasklist.filter.currenttags,
|
||||
buttons = {
|
||||
awful.button({ }, 1, function (c)
|
||||
c:activate { context = "tasklist", action = "toggle_minimization" }
|
||||
end),
|
||||
awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end),
|
||||
awful.button({ }, 4, function() awful.client.focus.byidx(-1) end),
|
||||
awful.button({ }, 5, function() awful.client.focus.byidx( 1) end),
|
||||
},
|
||||
style = {
|
||||
border_width = 0,
|
||||
border_color = colors.black,
|
||||
-- Text Enabeld :
|
||||
shape = function(cr,w,h) gears.shape.rounded_rect(cr, w, h, 0) end,
|
||||
-- Text disabeld :
|
||||
--shape = gears.shape.circle,
|
||||
bg_minimize = colors.black,
|
||||
bg_normal = colors.brightblack,
|
||||
bg_focus = colors.brightblack,
|
||||
},
|
||||
layout = {
|
||||
spacing = 2,
|
||||
spacing_widget = {
|
||||
{
|
||||
forced_width = 0,
|
||||
shape = gears.shape.circle,
|
||||
widget = wibox.widget.separator
|
||||
},
|
||||
valign = "center",
|
||||
halign = "center",
|
||||
widget = wibox.container.place,
|
||||
},
|
||||
layout = wibox.layout.flex.horizontal
|
||||
},
|
||||
widget_template = {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
-- Icon :
|
||||
{
|
||||
id = "clienticon",
|
||||
widget = awful.widget.clienticon,
|
||||
},
|
||||
margins = 2,
|
||||
widget = wibox.container.margin,
|
||||
},
|
||||
-- Text :
|
||||
--{
|
||||
-- id = "text_role",
|
||||
-- widget = wibox.widget.textbox,
|
||||
--},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
left = 5,
|
||||
right = 5,
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
id = "background_role",
|
||||
widget = wibox.container.background,
|
||||
},
|
||||
margins = 4,
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
}
|
||||
return tasklist
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue