forgot to add some things before commit, classic...

This commit is contained in:
elena 2018-12-24 02:06:45 +02:00
parent 235caa57cd
commit 514ba4d345
153 changed files with 4805 additions and 0 deletions

19
.xfiles/lovelace Normal file
View file

@ -0,0 +1,19 @@
*background: #1D1F28
*foreground: #FDFDFD
*cursorColor: #C574DD
*color0: #282A36
*color1: #F37F97
*color2: #5ADECD
*color3: #F2A272
*color4: #8897F4
*color5: #C574DD
*color6: #79E6F3
*color7: #FDFDFD
*color8: #414458
*color9: #FF4971
*color10: #18E3C8
*color11: #FF8037
*color12: #556FFF
*color13: #B043D1
*color14: #3FDCEE
*color15: #BEBEC1

View file

@ -0,0 +1,12 @@
#!/bin/bash
# Noodle Cleanup Script
# Some of my widgets (mpd, volume) rely on scripts that have to be
# run persistently in the background.
# They sleep until mpd/volume state changes, in an infinite loop.
# As a result when awesome restarts, they keep running in background, along with the new ones that are created after the restart.
# This script cleans up the old processes.
# Mpd widget
ps aux | grep "mpc idle player" | grep -v grep | awk '{print $2}' | xargs kill
# Volume widget
ps aux | grep "pactl subscribe" | grep -v grep | awk '{print $2}' | xargs kill

View file

@ -0,0 +1,280 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local naughty = require("naughty")
local helpers = require("helpers")
local pad = helpers.pad
local keygrabber = require("awful.keygrabber")
-- Appearance
local icon_size = beautiful.exit_screen_icon_size or 140
local text_font = beautiful.exit_screen_font or "sans 14"
-- Commands
local poweroff_command = function()
awful.spawn.with_shell("poweroff")
awful.keygrabber.stop(exit_screen_grabber)
end
local reboot_command = function()
awful.spawn.with_shell("reboot")
awful.keygrabber.stop(exit_screen_grabber)
end
local suspend_command = function()
awful.spawn.with_shell("i3lock & systemctl suspend")
exit_screen_hide()
end
local exit_command = function()
awesome.quit()
end
local lock_command = function()
awful.spawn.with_shell("i3lock")
exit_screen_hide()
end
local username = os.getenv("USER")
-- Capitalize username
local goodbye_widget = wibox.widget.textbox("Goodbye " .. username:sub(1,1):upper()..username:sub(2))
goodbye_widget.font = "sans 50"
local poweroff_icon = wibox.widget.imagebox(beautiful.poweroff_icon)
poweroff_icon.resize = true
poweroff_icon.forced_width = icon_size
poweroff_icon.forced_height = icon_size
local poweroff_text = wibox.widget.textbox("Poweroff")
poweroff_text.font = text_font
local poweroff = wibox.widget{
{
pad(0),
poweroff_icon,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
{
pad(1),
poweroff_text,
pad(1),
expand = "none",
layout = wibox.layout.align.horizontal
},
layout = wibox.layout.fixed.vertical
}
poweroff:buttons(gears.table.join(
awful.button({ }, 1, function ()
poweroff_command()
end)
))
local reboot_icon = wibox.widget.imagebox(beautiful.reboot_icon)
reboot_icon.resize = true
reboot_icon.forced_width = icon_size
reboot_icon.forced_height = icon_size
local reboot_text = wibox.widget.textbox("Reboot")
reboot_text.font = text_font
local reboot = wibox.widget{
{
pad(0),
reboot_icon,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
{
pad(0),
reboot_text,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
layout = wibox.layout.fixed.vertical
}
reboot:buttons(gears.table.join(
awful.button({ }, 1, function ()
reboot_command()
end)
))
local suspend_icon = wibox.widget.imagebox(beautiful.suspend_icon)
suspend_icon.resize = true
suspend_icon.forced_width = icon_size
suspend_icon.forced_height = icon_size
local suspend_text = wibox.widget.textbox("Suspend")
suspend_text.font = text_font
local suspend = wibox.widget{
{
pad(0),
suspend_icon,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
{
pad(0),
suspend_text,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
layout = wibox.layout.fixed.vertical
}
suspend:buttons(gears.table.join(
awful.button({ }, 1, function ()
suspend_command()
end)
))
local exit_icon = wibox.widget.imagebox(beautiful.exit_icon)
exit_icon.resize = true
exit_icon.forced_width = icon_size
exit_icon.forced_height = icon_size
local exit_text = wibox.widget.textbox("Exit")
exit_text.font = text_font
local exit = wibox.widget{
{
pad(0),
exit_icon,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
{
pad(0),
exit_text,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
layout = wibox.layout.fixed.vertical
}
exit:buttons(gears.table.join(
awful.button({ }, 1, function ()
exit_command()
end)
))
local lock_icon = wibox.widget.imagebox(beautiful.lock_icon)
lock_icon.resize = true
lock_icon.forced_width = icon_size
lock_icon.forced_height = icon_size
local lock_text = wibox.widget.textbox("Lock")
lock_text.font = text_font
local lock = wibox.widget{
{
pad(0),
lock_icon,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
{
pad(1),
lock_text,
pad(1),
expand = "none",
layout = wibox.layout.align.horizontal
},
layout = wibox.layout.fixed.vertical
}
lock:buttons(gears.table.join(
awful.button({ }, 1, function ()
lock_command()
end)
))
-- Get screen geometry
local screen_width = awful.screen.focused().geometry.width
local screen_height = awful.screen.focused().geometry.height
-- Create the widget
exit_screen = wibox({x = 0, y = 0, visible = false, ontop = true, type = "dock", height = screen_height, width = screen_width})
exit_screen.bg = beautiful.exit_screen_bg or beautiful.wibar_bg or "#111111"
exit_screen.fg = beautiful.exit_screen_fg or beautiful.wibar_fg or "#FEFEFE"
local exit_screen_grabber
function exit_screen_hide()
awful.keygrabber.stop(exit_screen_grabber)
exit_screen.visible = false
end
function exit_screen_show()
-- naughty.notify({text = "starting the keygrabber"})
exit_screen_grabber = awful.keygrabber.run(function(_, key, event)
if event == "release" then return end
if key == 's' then
suspend_command()
elseif key == 'e' then
exit_command()
elseif key == 'l' then
lock_command()
elseif key == 'p' then
poweroff_command()
elseif key == 'r' then
reboot_command()
elseif key == 'Escape' or key == 'q' or key == 'x' then
-- naughty.notify({text = "Cancel"})
exit_screen_hide()
-- else awful.keygrabber.stop(exit_screen_grabber)
end
end)
exit_screen.visible = true
end
exit_screen:buttons(gears.table.join(
-- Middle click - Hide exit_screen
awful.button({ }, 2, function ()
exit_screen_hide()
end),
-- Right click - Hide exit_screen
awful.button({ }, 3, function ()
exit_screen_hide()
end)
))
-- Item placement
exit_screen:setup {
pad(0),
{
{
pad(0),
goodbye_widget,
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
},
{
pad(0),
{
-- {
poweroff,
pad(3),
reboot,
pad(3),
suspend,
pad(3),
exit,
pad(3),
lock,
layout = wibox.layout.fixed.horizontal
-- },
-- widget = exit_screen_box
},
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
-- layout = wibox.layout.fixed.horizontal
},
layout = wibox.layout.fixed.vertical
},
pad(0),
expand = "none",
layout = wibox.layout.align.vertical
}

View file

@ -0,0 +1,46 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
-- Set colors
local active_color = beautiful.battery_bar_active_color or "#5AA3CC"
local background_color = beautiful.battery_bar_background_color or "#222222"
-- Configuration
local update_interval = 30 -- in seconds
local battery_bar = wibox.widget{
max_value = 100,
value = 50,
forced_height = 10,
margins = {
top = 10,
bottom = 10,
},
forced_width = 200,
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
color = active_color,
background_color = background_color,
border_width = 0,
border_color = beautiful.border_color,
widget = wibox.widget.progressbar,
}
local function update_widget(bat)
battery_bar.value = bat
end
local bat_script = [[
bash -c '
upower -i $(upower -e | grep BAT) | grep percentage
']]
awful.widget.watch(bat_script, update_interval, function(widget, stdout)
local bat = stdout:match(':%s*(.*)..')
-- bat = string.gsub(bat, '^%s*(.-)%s*$', '%1')
update_widget(bat)
end)
return battery_bar

View file

@ -0,0 +1,47 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
-- Set colors
local active_color = beautiful.cpu_bar_active_color or "#5AA3CC"
local background_color = beautiful.cpu_bar_background_color or "#222222"
-- Configuration
local update_interval = 5 -- in seconds
local cpu_bar = wibox.widget{
max_value = 100,
value = 50,
forced_height = 10,
margins = {
top = 10,
bottom = 10,
},
forced_width = 200,
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
color = active_color,
background_color = background_color,
border_width = 0,
border_color = beautiful.border_color,
widget = wibox.widget.progressbar,
}
local function update_widget(cpu_idle)
cpu_bar.value = 100 - cpu_idle
end
local cpu_idle_script = [[
bash -c "
vmstat 1 2 | tail -1 | awk '{printf \"%d\", $15}'
"]]
awful.widget.watch(cpu_idle_script, update_interval, function(widget, stdout)
-- local cpu_idle = stdout:match('+(.*)%.%d...(.*)%(')
local cpu_idle = stdout
cpu_idle = string.gsub(cpu_idle, '^%s*(.-)%s*$', '%1')
update_widget(cpu_idle)
end)
return cpu_bar

View file

@ -0,0 +1,72 @@
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local wibox = require("wibox")
-- Get theme variables
local floating_icon = beautiful.layout_floating
local tile_icon = beautiful.layout_tile
local max_icon = beautiful.layout_max
local desktop_control = wibox.widget.imagebox()
-- Mouse control
desktop_control:buttons(gears.table.join(
-- Left click - Cycle through layouts
awful.button({ }, 1, function ()
awful.layout.inc(1)
end),
-- Right click - Show clients in the current tag with rofi
awful.button({ }, 3, function ()
awful.spawn.with_shell("rofi -show windowcd")
end),
-- Middle click - Close focused client
awful.button({ }, 2, function ()
if client.focus ~= nil then
client.focus:kill()
end
end),
-- Scrolling - Scroll through clients
awful.button({ }, 4, function ()
awful.client.focus.byidx(-1)
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(1)
end),
-- Side buttons - Minimize and restore minimized
awful.button({ }, 9, function ()
if client.focus ~= nil then
client.focus.minimized = true
end
end),
awful.button({ }, 8, function ()
local c = awful.client.restore()
if c then
client.focus = c
c:raise()
end
end)
))
local function update_widget()
local current_layout = awful.layout.getname(awful.layout.get(awful.screen.focused()))
if current_layout == "max" then
desktop_control.image = max_icon
elseif current_layout == "tile" then
desktop_control.image = tile_icon
elseif current_layout == "floating" then
desktop_control.image = floating_icon
else
desktop_control.image = tile_icon
end
end
-- Signals
awful.tag.attached_connect_signal(s, "property::selected", function ()
update_widget()
end)
awful.tag.attached_connect_signal(s, "property::layout", function ()
update_widget()
end)
return desktop_control

View file

@ -0,0 +1,33 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
-- Configuration
local update_interval = 120 -- in seconds
local disk = wibox.widget{
text = "free disk space",
align = 'center',
valign = 'center',
widget = wibox.widget.textbox
}
local function update_widget(disk_space)
disk.markup = disk_space .. "B free"
end
-- Use /dev/sdXY according to your setup
local disk_script = [[
bash -c "
df -k -h /dev/sda1 | tail -1 | awk '{print $4}'
"]]
awful.widget.watch(disk_script, update_interval, function(widget, stdout)
local disk_space = stdout
-- Remove trailing white space
disk_space = string.gsub(disk_space, '^%s*(.-)%s*$', '%1')
update_widget(disk_space)
end)
return disk

View file

@ -0,0 +1,116 @@
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local wibox = require("wibox")
local naughty = require("naughty")
local capi = { screen = screen, client = client }
-- Get theme variables
local visible_clients_color = beautiful.icon_taglist_visible_clients_color or "#1D8CD2"
local visible_clients_text = beautiful.icon_taglist_visible_clients_text or "v: "
local hidden_clients_color = beautiful.icon_taglist_hidden_clients_color or "#2DD283"
local hidden_clients_text = beautiful.icon_taglist_hidden_clients_text or "h: "
local ntags = 10
local s = awful.screen.focused()
local tag_icons = {}
-- Create imageboxes and set their buttons
for i = 1, ntags do
table.insert(tag_icons, wibox.widget.imagebox())
tag_icons[i]:buttons(
gears.table.join(
-- Left click - Tag back and forth
awful.button({ }, 1, function ()
local current_tag = s.selected_tag
local clicked_tag = s.tags[i]
if clicked_tag == current_tag then
awful.tag.history.restore()
else
clicked_tag:view_only()
end
end),
-- Right click - Move focused client to tag
awful.button({ }, 3, function ()
local clicked_tag = s.tags[i]
if client.focus then
client.focus:move_to_tag(clicked_tag)
end
end),
-- Scroll - Cycle through tags
awful.button({ }, 4, function ()
awful.tag.viewprev()
end),
awful.button({ }, 5, function ()
awful.tag.viewnext()
end)
))
end
local icon_taglist = wibox.widget{
tag_icons[1],
tag_icons[2],
tag_icons[3],
tag_icons[4],
tag_icons[5],
tag_icons[6],
tag_icons[7],
tag_icons[8],
tag_icons[9],
tag_icons[10],
layout = wibox.layout.fixed.horizontal
}
local function update_widget()
for i = 1, ntags do
local tag_clients
if s.tags[i] then
tag_clients = s.tags[i]:clients()
end
if s.tags[i] == s.selected_tag then
tag_icons[i].image = beautiful.taglist_icons_focused[i]
elseif awful.tag.getproperty(s.tags[i], "urgent") then
tag_icons[i].image = beautiful.taglist_icons_urgent[i]
elseif tag_clients and #tag_clients > 0 then
tag_icons[i].image = beautiful.taglist_icons_occupied[i]
else
tag_icons[i].image = beautiful.taglist_icons_empty[i]
end
end
end
-- Signals
client.connect_signal("unmanage", function(c)
update_widget()
end)
client.connect_signal("untagged", function(c)
update_widget()
end)
client.connect_signal("tagged", function(c)
update_widget()
end)
client.connect_signal("screen", function(c)
update_widget()
end)
awful.tag.attached_connect_signal(s, "property::selected", function ()
update_widget()
end)
awful.tag.attached_connect_signal(s, "property::hide", function ()
update_widget()
end)
awful.tag.attached_connect_signal(s, "property::activated", function ()
update_widget()
end)
awful.tag.attached_connect_signal(s, "property::screen", function ()
update_widget()
end)
awful.tag.attached_connect_signal(s, "property::index", function ()
update_widget()
end)
awful.tag.attached_connect_signal(s, "property::urgent", function ()
update_widget()
end)
--capi.screen.connect_signal("removed", function(s)
-- instances[get_screen(s)] = nil
-- end)
return icon_taglist

View file

@ -0,0 +1,110 @@
-- NOTE:
-- This widget runs a script in the background
-- When awesome restarts, its process will remain alive!
-- Don't worry though! The cleanup script that runs in rc.lua takes care of it :)
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local naughty = require("naughty")
-- Set colors
local title_color = beautiful.mpd_song_title_color or beautiful.wibar_fg
local artist_color = beautiful.mpd_song_artist_color or beautiful.wibar_fg
local paused_color = beautiful.mpd_song_paused_color or beautiful.normal_fg
-- Set notification icon path
local notification_icon = beautiful.mpd_icon
local mpd_title = wibox.widget{
text = "---------",
align = "center",
valign = "center",
widget = wibox.widget.textbox
}
local mpd_artist = wibox.widget{
text = "---------",
align = "center",
valign = "center",
widget = wibox.widget.textbox
}
-- Main widget
local mpd_song = wibox.widget{
mpd_title,
mpd_artist,
layout = wibox.layout.fixed.vertical
}
local artist_fg
local artist_bg
local last_notification_id
local function send_notification(artist, title)
notification = naughty.notify({
-- title = "Now playing:",
-- text = title .. " -- " .. artist,
title = title,
text = artist,
icon = beautiful.music_icon,
-- width = 360,
-- height = 90,
icon_size = 60,
timeout = 4,
replaces_id = last_notification_id
})
last_notification_id = notification.id
end
local function update_widget()
awful.spawn.easy_async({"mpc", "-f", "[[%artist%@@%title%@]]"},
function(stdout)
local artist = stdout:match('(.*)@@')
local title = stdout:match('@@(.*)@')
title = string.gsub(title, '^%s*(.-)%s*$', '%1')
local status = stdout:match('%[(.*)%]')
status = string.gsub(status, '^%s*(.-)%s*$', '%1')
if status == "paused" then
artist_fg = paused_color
title_fg = paused_color
else
artist_fg = artist_color
title_fg = title_color
if sidebar.visible == false then
send_notification(artist, title)
end
end
-- Escape &'s
title = title:gsub("%&", "%&")
artist = artist:gsub("%&", "%&")
-- naughty.notify({text = artist .. " - " .. title})
mpd_title.markup =
"<span foreground='" .. title_fg .."'>"
.. title .. "</span>"
mpd_artist.markup =
"<span foreground='" .. artist_fg .."'>"
.. artist .. "</span>"
end
)
end
update_widget()
-- Sleeps until mpd changes state (pause/play/next/prev)
local mpd_script = [[
bash -c '
mpc idleloop player
']]
awful.spawn.with_line_callback(mpd_script, {
stdout = function(line)
update_widget()
end
})
return mpd_song

View file

@ -0,0 +1,47 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
-- Set colors
local active_color = beautiful.ram_bar_active_color or "#5AA3CC"
local background_color = beautiful.ram_bar_background_color or "#222222"
-- Configuration
local update_interval = 20 -- in seconds
local ram_bar = wibox.widget{
max_value = 100,
value = 50,
forced_height = 10,
margins = {
top = 10,
bottom = 10,
},
forced_width = 200,
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
color = active_color,
background_color = background_color,
border_width = 0,
border_color = beautiful.border_color,
widget = wibox.widget.progressbar,
}
local function update_widget(used_ram_percentage)
ram_bar.value = used_ram_percentage
end
local used_ram_script = [[
bash -c "
free -m | grep 'Mem:' | awk '{printf \"%d@@%d@\", $7, $2}'
"]]
awful.widget.watch(used_ram_script, update_interval, function(widget, stdout)
local available = stdout:match('(.*)@@')
local total = stdout:match('@@(.*)@')
local used_ram_percentage = (total - available) / total * 100
update_widget(used_ram_percentage)
end)
return ram_bar

View file

@ -0,0 +1,46 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
-- Set colors
local active_color = beautiful.temperature_bar_active_color or "#5AA3CC"
local background_color = beautiful.temperature_bar_background_color or "#222222"
-- Configuration
local update_interval = 15 -- in seconds
local temperature_bar = wibox.widget{
max_value = 100,
value = 50,
forced_height = 10,
margins = {
top = 10,
bottom = 10,
},
forced_width = 200,
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
color = active_color,
background_color = background_color,
border_width = 0,
border_color = beautiful.border_color,
widget = wibox.widget.progressbar,
}
local function update_widget(temp)
temperature_bar.value = temp
end
local temp_script = [[
bash -c "
sensors | grep Package | awk '{print $4}' | cut -c 2-3
"]]
awful.widget.watch(temp_script, update_interval, function(widget, stdout)
local temp = stdout
temp = string.gsub(temp, '^%s*(.-)%s*$', '%1')
update_widget(temp)
end)
return temperature_bar

View file

@ -0,0 +1,76 @@
-- NOTE:
-- This widget runs a script in the background
-- When awesome restarts, its process will remain alive!
-- Don't worry though! The cleanup script that runs in rc.lua takes care of it :)
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
-- Set colors
local active_color = beautiful.volume_bar_active_color or "#5AA3CC"
local muted_color = beautiful.volume_bar_muted_color or "#666666"
local active_background_color = beautiful.volume_bar_active_background_color or "#222222"
local muted_background_color = beautiful.volume_bar_muted_background_color or "#222222"
local volume_bar = wibox.widget{
max_value = 100,
value = 50,
forced_height = 10,
margins = {
top = 10,
bottom = 10,
},
forced_width = 200,
shape = gears.shape.rounded_bar,
bar_shape = gears.shape.rounded_bar,
color = active_color,
background_color = active_background_color,
border_width = 0,
border_color = beautiful.border_color,
widget = wibox.widget.progressbar,
}
local function update_widget()
awful.spawn.easy_async({"sh", "-c", "pactl list sinks"},
function(stdout)
local volume = stdout:match('(%d+)%% /')
local muted = stdout:match('Mute:(%s+)[yes]')
local fill_color
local bg_color
if muted ~= nil then
fill_color = muted_color
bg_color = muted_background_color
else
fill_color = active_color
bg_color = active_background_color
end
volume_bar.value = volume
volume_bar.color = fill_color
volume_bar.background_color = bg_color
end
)
end
-- Signals
-- volume_bar:connect_signal("mouse::enter", function ()
-- update_widget()
-- end)
update_widget()
-- Sleeps until pactl detects an event (volume up/down/toggle mute)
local volume_script = [[
bash -c '
pactl subscribe 2> /dev/null | grep --line-buffered "sink #0"
']]
awful.spawn.with_line_callback(volume_script, {
stdout = function(line)
update_widget()
end
})
return volume_bar

View file

@ -0,0 +1,91 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local naughty = require("naughty")
-- Configuration
-- Get your key and find your city id at https://openweathermap.org/
-- You will need to make an account!
local key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
local city_id = "yyyyyy"
local units = "metric"
local symbol = "°C"
-- Don't update too often, because your requests might get blocked for 24 hours
local update_interval = 1200 -- in seconds
local weather_text = wibox.widget{
text = "Loading...",
-- align = 'center',
valign = 'center',
-- font = "sans 14",
widget = wibox.widget.textbox
}
local weather_icon = wibox.widget.imagebox(beautiful.whatever_icon)
weather_icon.resize = true
weather_icon.forced_width = 40
weather_icon.forced_height = 40
local weather = wibox.widget{
weather_icon,
weather_text,
layout = wibox.layout.fixed.horizontal
}
local function update_widget(icon_code, weather_details)
-- Set icon
if string.find(icon_code, "01d") then
weather_icon.image = beautiful.sun_icon
elseif string.find(icon_code, "01n") then
weather_icon.image = beautiful.star_icon
elseif string.find(icon_code, "02d") then
weather_icon.image = beautiful.dcloud_icon
elseif string.find(icon_code, "02n") then
weather_icon.image = beautiful.ncloud_icon
elseif string.find(icon_code, "03") or string.find(icon_code, "04") then
weather_icon.image = beautiful.cloud_icon
elseif string.find(icon_code, "09") or string.find(icon_code, "10") then
weather_icon.image = beautiful.rain_icon
elseif string.find(icon_code, "11") then
weather_icon.image = beautiful.storm_icon
elseif string.find(icon_code, "13") then
weather_icon.image = beautiful.snow_icon
elseif string.find(icon_code, "50") or string.find(icon_code, "40") then
weather_icon.image = beautiful.mist_icon
else
weather_icon.image = beautiful.whatever_icon
end
-- Set text
weather_text.markup = weather_details
end
local weather_details_script = [[
bash -c '
KEY="]]..key..[["
CITY="]]..city_id..[["
UNITS="]]..units..[["
SYMBOL="]]..symbol..[["
weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID=$KEY&id=$CITY&units=$UNITS")
if [ ! -z "$weather" ]; then
weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)
weather_icon=$(echo "$weather" | jq -r ".weather[].icon" | head -1)
weather_description=$(echo "$weather" | jq -r ".weather[].description" | head -1)
echo "$weather_icon" "$weather_description" "$weather_temp$SYMBOL"
else
echo "... Info unavailable"
fi
']]
awful.widget.watch(weather_details_script, update_interval, function(widget, stdout)
local icon_code = string.sub(stdout, 1, 3)
local weather_details = string.sub(stdout, 5)
weather_details = string.gsub(weather_details, '^%s*(.-)%s*$', '%1')
update_widget(icon_code, weather_details)
end)
return weather

455
config/awesome/sidebar.lua Normal file
View file

@ -0,0 +1,455 @@
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local helpers = require("helpers")
local pad = helpers.pad
-- Item configuration
local exit_icon = wibox.widget.imagebox(beautiful.poweroff_icon)
exit_icon.resize = true
exit_icon.forced_width = 40
exit_icon.forced_height = 40
local exit_text = wibox.widget.textbox("Exit")
exit_text.font = "sans 13"
local exit = wibox.widget{
exit_icon,
exit_text,
layout = wibox.layout.fixed.horizontal
}
exit:buttons(gears.table.join(
awful.button({ }, 1, function ()
exit_screen_show()
sidebar.visible = false
end)
))
local weather_widget = require("noodle.weather")
local weather_widget_text = weather_widget:get_all_children()[2]
weather_widget_text.font = "sans 13"
-- Dummy weather_widget for testing
-- (avoid making requests with every awesome restart)
-- local weather_widget = wibox.widget.textbox("[icon] clear sky 8oC")
local weather = wibox.widget{
pad(0),
weather_widget,
pad(0),
layout = wibox.layout.align.horizontal,
expand = "none"
}
local temperature_icon = wibox.widget.imagebox(beautiful.temperature_icon)
temperature_icon.resize = true
temperature_icon.forced_width = 40
temperature_icon.forced_height = 40
local temperature_bar = require("noodle.temperature_bar")
local temperature = wibox.widget{
pad(0),
{
temperature_icon,
pad(1),
temperature_bar,
layout = wibox.layout.fixed.horizontal
},
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
}
local battery_icon = wibox.widget.imagebox(beautiful.battery_icon)
battery_icon.resize = true
battery_icon.forced_width = 40
battery_icon.forced_height = 40
awesome.connect_signal(
"charger_plugged", function(c)
battery_icon.image = beautiful.battery_charging_icon
end)
awesome.connect_signal(
"charger_unplugged", function(c)
battery_icon.image = beautiful.battery_icon
end)
local battery_bar = require("noodle.battery_bar")
local battery = wibox.widget{
pad(0),
{
battery_icon,
pad(1),
battery_bar,
layout = wibox.layout.fixed.horizontal
},
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
}
local cpu_icon = wibox.widget.imagebox(beautiful.cpu_icon)
cpu_icon.resize = true
cpu_icon.forced_width = 40
cpu_icon.forced_height = 40
local cpu_bar = require("noodle.cpu_bar")
local cpu = wibox.widget{
pad(0),
{
cpu_icon,
pad(1),
cpu_bar,
layout = wibox.layout.fixed.horizontal
},
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
}
cpu:buttons(
gears.table.join(
awful.button({ }, 1, function ()
local matcher = function (c)
return awful.rules.match(c, {name = 'htop'})
end
awful.client.run_or_raise(terminal .." -e htop", matcher)
end),
awful.button({ }, 3, function ()
local matcher = function (c)
return awful.rules.match(c, {class = 'Lxtask'})
end
awful.client.run_or_raise("lxtask", matcher)
end)
))
local ram_icon = wibox.widget.imagebox(beautiful.ram_icon)
ram_icon.resize = true
ram_icon.forced_width = 40
ram_icon.forced_height = 40
local ram_bar = require("noodle.ram_bar")
local ram = wibox.widget{
pad(0),
{
ram_icon,
pad(1),
ram_bar,
layout = wibox.layout.fixed.horizontal
},
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
}
ram:buttons(
gears.table.join(
awful.button({ }, 1, function ()
local matcher = function (c)
return awful.rules.match(c, {name = 'htop'})
end
awful.client.run_or_raise(terminal .." -e htop", matcher)
end),
awful.button({ }, 3, function ()
local matcher = function (c)
return awful.rules.match(c, {class = 'Lxtask'})
end
awful.client.run_or_raise("lxtask", matcher)
end)
))
local playerctl_button_size = 50
local playerctl_toggle_icon = wibox.widget.imagebox(beautiful.playerctl_toggle_icon)
playerctl_toggle_icon.resize = true
playerctl_toggle_icon.forced_width = playerctl_button_size
playerctl_toggle_icon.forced_height = playerctl_button_size
playerctl_toggle_icon:buttons(gears.table.join(
awful.button({ }, 1, function ()
awful.spawn.with_shell("mpc toggle")
end),
awful.button({ }, 3, function ()
awful.spawn.with_shell("mpvc toggle")
end)
))
local playerctl_prev_icon = wibox.widget.imagebox(beautiful.playerctl_prev_icon)
playerctl_prev_icon.resize = true
playerctl_prev_icon.forced_width = playerctl_button_size
playerctl_prev_icon.forced_height = playerctl_button_size
playerctl_prev_icon:buttons(gears.table.join(
awful.button({ }, 1, function ()
awful.spawn.with_shell("mpc prev")
end),
awful.button({ }, 3, function ()
awful.spawn.with_shell("mpvc prev")
end)
))
local playerctl_next_icon = wibox.widget.imagebox(beautiful.playerctl_next_icon)
playerctl_next_icon.resize = true
playerctl_next_icon.forced_width = playerctl_button_size
playerctl_next_icon.forced_height = playerctl_button_size
playerctl_next_icon:buttons(gears.table.join(
awful.button({ }, 1, function ()
awful.spawn.with_shell("mpc next")
end),
awful.button({ }, 3, function ()
awful.spawn.with_shell("mpvc next")
end)
))
local playerctl_buttons = wibox.widget {
pad(0),
{
playerctl_prev_icon,
pad(1),
playerctl_toggle_icon,
pad(1),
playerctl_next_icon,
layout = wibox.layout.fixed.horizontal
},
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal,
}
local time = wibox.widget.textclock("%H %M")
time.align = "center"
time.valign = "center"
time.font = "sans 50"
local date = wibox.widget.textclock("%A, %B %d")
-- local date = wibox.widget.textclock("%A, %B %d, %Y")
date.align = "center"
date.valign = "center"
date.font = "sans medium 15"
local fancy_date = wibox.widget.textclock("%j days around the sun")
fancy_date.align = "center"
fancy_date.valign = "center"
fancy_date.font = "sans 11"
local mpd_song = require("noodle.mpd_song")
local mpd_widget_children = mpd_song:get_all_children()
local mpd_title = mpd_widget_children[1]
local mpd_artist = mpd_widget_children[2]
mpd_title.font = "sans medium 13"
mpd_artist.font = "sans 11"
-- Set forced height in order to limit the widgets to one line.
-- Might need to be adjusted depending on the font.
mpd_title.forced_height = 22
mpd_artist.forced_height = 22
mpd_song:buttons(gears.table.join(
awful.button({ }, 1, function ()
awful.spawn.with_shell("mpc toggle")
end),
awful.button({ }, 3, function ()
awful.spawn(terminal .. " -e ncmpcpp", {floating = true})
end),
awful.button({ }, 4, function ()
awful.spawn.with_shell("mpc prev")
end),
awful.button({ }, 5, function ()
awful.spawn.with_shell("mpc next")
end)
))
local disk_space = require("noodle.disk")
disk_space.font = "sans 13"
local disk_icon = wibox.widget.imagebox(beautiful.files_icon)
disk_icon.resize = true
disk_icon.forced_width = 40
disk_icon.forced_height = 40
local disk = wibox.widget{
pad(0),
{
disk_icon,
disk_space,
layout = wibox.layout.fixed.horizontal
},
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
}
disk:buttons(gears.table.join(
awful.button({ }, 1, function ()
awful.spawn(filemanager, {floating = true})
end),
awful.button({ }, 3, function ()
awful.spawn(filemanager .. " /data", {floating = true})
end)
))
local search_icon = wibox.widget.imagebox(beautiful.search_icon)
search_icon.resize = true
search_icon.forced_width = 40
search_icon.forced_height = 40
local search_text = wibox.widget.textbox("Search")
search_text.font = "sans 13"
local search = wibox.widget{
search_icon,
search_text,
layout = wibox.layout.fixed.horizontal
}
search:buttons(gears.table.join(
awful.button({ }, 1, function ()
awful.spawn.with_shell("rofi -show combi")
end),
awful.button({ }, 3, function ()
awful.spawn.with_shell("rofi -show run")
end)
))
local volume_icon = wibox.widget.imagebox(beautiful.volume_icon)
volume_icon.resize = true
volume_icon.forced_width = 40
volume_icon.forced_height = 40
local volume_bar = require("noodle.volume_bar")
local volume = wibox.widget{
pad(0),
{
volume_icon,
pad(1),
volume_bar,
layout = wibox.layout.fixed.horizontal
},
pad(0),
expand = "none",
layout = wibox.layout.align.horizontal
}
volume:buttons(gears.table.join(
-- Left click - Mute / Unmute
awful.button({ }, 1, function ()
awful.spawn.with_shell("volume-control.sh toggle")
end),
-- Right click - Run or raise pavucontrol
awful.button({ }, 3, function ()
local matcher = function (c)
return awful.rules.match(c, {class = 'Pavucontrol'})
end
awful.client.run_or_raise("pavucontrol", matcher)
end),
-- Scroll - Increase / Decrease volume
awful.button({ }, 4, function ()
awful.spawn.with_shell("volume-control.sh up")
end),
awful.button({ }, 5, function ()
awful.spawn.with_shell("volume-control.sh down")
end)
))
-- Create the sidebar
sidebar = wibox({x = 0, y = 0, visible = false, ontop = true, type = "dock"})
sidebar.bg = beautiful.sidebar_bg or beautiful.wibar_bg or "#111111"
sidebar.fg = beautiful.sidebar_fg or beautiful.wibar_fg or "#FFFFFF"
sidebar.opacity = beautiful.sidebar_opacity or 1
sidebar.height = beautiful.sidebar_height or awful.screen.focused().geometry.height
sidebar.width = beautiful.sidebar_width or 300
sidebar.y = beautiful.sidebar_y or 0
local radius = beautiful.sidebar_border_radius or 0
if beautiful.sidebar_position == "right" then
sidebar.x = awful.screen.focused().geometry.width - sidebar.width
sidebar.shape = helpers.prrect(radius, true, false, false, true)
else
sidebar.x = 0
sidebar.shape = helpers.prrect(radius, false, true, true, false)
end
sidebar:buttons(gears.table.join(
-- Middle click - Hide sidebar
awful.button({ }, 2, function ()
sidebar.visible = false
end)
))
-- Hide sidebar when mouse leaves
if beautiful.sidebar_hide_on_mouse_leave then
sidebar:connect_signal("mouse::leave", function ()
sidebar.visible = false
end)
end
-- Activate sidebar by moving the mouse at the edge of the screen
if beautiful.sidebar_hide_on_mouse_leave then
local sidebar_activator = wibox({y = 0, width = 1, height = awful.screen.focused().geometry.height, visible = true, ontop = false, opacity = 0, below = true})
sidebar_activator:connect_signal("mouse::enter", function ()
sidebar.visible = true
end)
if beautiful.sidebar_position == "right" then
sidebar_activator.x = awful.screen.focused().geometry.width - sidebar_activator.width
else
sidebar_activator.x = 0
end
sidebar_activator:buttons(
gears.table.join(
awful.button({ }, 2, function ()
sidebar.visible = not sidebar.visible
end),
awful.button({ }, 4, function ()
awful.tag.viewprev()
end),
awful.button({ }, 5, function ()
awful.tag.viewnext()
end)
))
end
-- Item placement
sidebar:setup {
{ ----------- TOP GROUP -----------
pad(1),
pad(1),
time,
date,
fancy_date,
pad(1),
weather,
pad(1),
pad(1),
layout = wibox.layout.fixed.vertical
},
{ ----------- MIDDLE GROUP -----------
playerctl_buttons,
{
-- Put some padding at the left and right edge so that
-- it looks better with extremely long titles/artists
pad(2),
mpd_song,
pad(2),
layout = wibox.layout.align.horizontal,
},
pad(1),
pad(1),
volume,
cpu,
temperature,
ram,
battery,
pad(1),
disk,
pad(1),
pad(1),
layout = wibox.layout.fixed.vertical
},
{ ----------- BOTTOM GROUP -----------
{ -- Search and exit screen
pad(0),
{
search,
pad(5),
exit,
pad(2),
layout = wibox.layout.fixed.horizontal
},
pad(0),
layout = wibox.layout.align.horizontal,
expand = "none"
},
pad(1),
layout = wibox.layout.fixed.vertical
},
layout = wibox.layout.align.vertical,
-- expand = "none"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View file

@ -0,0 +1,467 @@
--
-- ██ ██
-- ░██ ░██
-- ░██ ██████ ██ ██ █████ ░██ ██████ █████ █████
-- ░██ ██░░░░██░██ ░██ ██░░░██ ░██ ░░░░░░██ ██░░░██ ██░░░██
-- ░██░██ ░██░░██ ░██ ░███████ ░██ ███████ ░██ ░░ ░███████
-- ░██░██ ░██ ░░████ ░██░░░░ ░██ ██░░░░██ ░██ ██░██░░░░
-- ███░░██████ ░░██ ░░██████ ███░░████████░░█████ ░░██████
-- ░░░ ░░░░░░ ░░ ░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░░░░
local theme_name = "lovelace"
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir()
local icon_path = os.getenv("HOME") .. "/.config/awesome/themes/" .. theme_name .. "/icons/"
local layout_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/" .. theme_name .. "/layout/"
local titlebar_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/" .. theme_name .. "/titlebar/"
local weather_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/" .. theme_name .. "/weather/"
local taglist_icon_path = os.getenv("HOME") .. "/.config/awesome/themes/" .. theme_name .. "/taglist/"
local tip = titlebar_icon_path --alias to save time/space
local xrdb = xresources.get_current_theme()
-- local theme = dofile(themes_path.."default/theme.lua")
local theme = {}
-- theme.tip = titlebar_icon_path -- NOT local so that scripts can access it
-- This is used to make it easier to align the panels in specific monitor positions
local awful = require("awful")
local screen_width = awful.screen.focused().geometry.width
local screen_height = awful.screen.focused().geometry.height
-- Set theme wallpaper.
-- It won't change anything if you are using feh to set the wallpaper like I do.
theme.wallpaper = os.getenv("HOME") .. "/.config/awesome/themes/" .. theme_name .. "/wall.png"
-- Set the theme font. This is the font that will be used by default in menus, bars, titlebars etc.
-- theme.font = "sans 11"
theme.font = "monospace bold 11"
-- Get colors from .Xresources and set fallback colors
local xbackground = xrdb.background or "#1D1F28"
local xforeground = xrdb.foreground or "#FDFDFD"
local xcolor0 = xrdb.color0 or "#282A36"
local xcolor1 = xrdb.color1 or "#F37F97"
local xcolor2 = xrdb.color2 or "#5ADECD"
local xcolor3 = xrdb.color3 or "#F2A272"
local xcolor4 = xrdb.color4 or "#8897F4"
local xcolor5 = xrdb.color5 or "#C574DD"
local xcolor6 = xrdb.color6 or "#79E6F3"
local xcolor7 = xrdb.color7 or "#FDFDFD"
local xcolor8 = xrdb.color8 or "#414458"
local xcolor9 = xrdb.color9 or "#FF4971"
local xcolor10 = xrdb.color10 or "#18E3C8"
local xcolor11 = xrdb.color11 or "#FF8037"
local xcolor12 = xrdb.color12 or "#556FFF"
local xcolor13 = xrdb.color13 or "#B043D1"
local xcolor14 = xrdb.color14 or "#3FDCEE"
local xcolor15 = xrdb.color15 or "#BEBEC1"
-- Set some colors that are used frequently as local variables
local accent_color = xcolor14
local focused_color = xcolor14
local unfocused_color = xcolor7
local urgent_color = xcolor9
-- This is how to get other .Xresources values (beyond colors 0-15, or custom variables)
-- local cool_color = awesome.xrdb_get_value("", "color16")
theme.bg_dark = xbackground
theme.bg_normal = xbackground
theme.bg_focus = xbackground
theme.bg_urgent = xbackground
theme.bg_minimize = xcolor8
theme.bg_systray = xbackground
theme.fg_normal = xcolor7
theme.fg_focus = focused_color
theme.fg_urgent = urgent_color
theme.fg_minimize = xcolor8
-- Gaps
theme.useless_gap = dpi(3)
-- This could be used to manually determine how far away from the
-- screen edge the bars / notifications should be.
theme.screen_margin = dpi(3)
-- Borders
theme.border_width = dpi(0)
theme.border_color = xcolor0
theme.border_normal = xcolor0
theme.border_focus = xcolor0
-- Rounded corners
theme.border_radius = dpi(6)
-- Titlebars
-- (Titlebar items can be customized in titlebars.lua)
theme.titlebars_enabled = true
theme.titlebar_size = dpi(35)
theme.titlebar_title_enabled = false
theme.titlebar_font = theme.font -- BUG: Uses theme.font regardless
-- Window title alignment: left, right, center
theme.titlebar_title_align = "center"
-- Titlebar position: top, bottom, left, right
theme.titlebar_position = "top"
-- Use 4 titlebars around the window to imitate borders
theme.titlebars_imitate_borders = false
theme.titlebar_bg = xcolor0
-- theme.titlebar_bg_focus = xcolor5
-- theme.titlebar_bg_normal = xcolor13
theme.titlebar_fg_focus = xcolor7
theme.titlebar_fg_normal = xcolor15
--theme.titlebar_fg = xcolor7
-- Notifications
-- Position: bottom_left, bottom_right, bottom_middle,
-- top_left, top_right, top_middle
theme.notification_position = "top_right" -- BUG: some notifications appear at top_right regardless
theme.notification_border_width = 0
theme.notification_border_radius = theme.border_radius
theme.notification_border_color = xcolor10
theme.notification_bg = xbackground
theme.notification_fg = xcolor7
theme.notification_crit_bg = urgent_color
theme.notification_crit_fg = xcolor0
theme.notification_icon_size = dpi(60)
-- theme.notification_height = dpi(80)
-- theme.notification_width = dpi(300)
theme.notification_margin = dpi(15)
theme.notification_opacity = 1
theme.notification_font = theme.font
theme.notification_padding = theme.screen_margin * 2
theme.notification_spacing = theme.screen_margin * 2
-- Edge snap
theme.snap_bg = theme.bg_focus
if theme.border_width == 0 then
theme.snap_border_width = dpi(8)
else
theme.snap_border_width = theme.border_width * 2
end
-- Doesnt work with 4.2, need awesome-git?
--theme.snapper_gap = theme.useless_gap
-- Tag names
theme.tagnames = {
"1", -- tag 1
"2", -- tag 2
"3", -- tag 3
"4", -- tag 4
"5", -- tag 5
"6", -- tag 6
"7", -- tag 7
"8", -- tag 8
"9", -- tag 9
"10" -- tag 10
}
-- Widget separator
theme.separator_text = "|"
--theme.separator_text = " :: "
--theme.separator_text = " • "
-- theme.separator_text = " •• "
theme.separator_fg = xcolor8
-- Wibar(s)
-- (Bar items can be customized in bars.lua)
theme.wibar_position = "bottom"
theme.wibar_detached = false
theme.wibar_height = dpi(45)
theme.wibar_fg = xcolor7
theme.wibar_bg = xcolor0 .. "00"
--theme.wibar_opacity = 0.7
theme.wibar_border_color = xcolor0
theme.wibar_border_width = 0
theme.wibar_border_radius = 0
theme.wibar_border_radius = theme.border_radius
--theme.wibar_width = screen_width - theme.screen_margin * 4 -theme.wibar_border_width * 2
theme.wibar_width = 620
--theme.wibar_x = screen_width / 2 - theme.wibar_width - theme.screen_margin * 2
--theme.wibar_x = theme.screen_margin * 2
--theme.wibar_x = screen_width - theme.wibar_width - theme.wibar_border_width * 2 - theme.screen_margin * 2
--theme.wibar_y = theme.screen_margin * 2
-- Widgets
theme.prefix_fg = xcolor8
--There are other variable sets
--overriding the default one when
--defined, the sets are:
--taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
--tasklist_[bg|fg]_[focus|urgent]
--titlebar_[bg|fg]_[normal|focus]
--tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
--mouse_finder_[color|timeout|animate_timeout|radius|factor]
--prompt_[fg|bg|fg_cursor|bg_cursor|font]
--hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
--Example:
--theme.taglist_bg_focus = "#ff0000"
--Tasklist
theme.tasklist_disable_icon = true
theme.tasklist_plain_task_name = true
theme.tasklist_bg_focus = xcolor0 .. "00"
theme.tasklist_fg_focus = focused_color
theme.tasklist_bg_normal = xcolor0 .. "00"
theme.tasklist_fg_normal = unfocused_color
theme.tasklist_bg_minimize = xcolor0 .. "00"
theme.tasklist_fg_minimize = theme.fg_minimize
theme.tasklist_bg_urgent = xcolor0 .. "00"
theme.tasklist_fg_urgent = urgent_color
theme.tasklist_spacing = 5
theme.tasklist_align = "center"
-- Sidebar
-- (Sidebar items can be customized in sidebar.lua)
theme.sidebar_bg = xbackground
theme.sidebar_bg_alt = xcolor0
theme.sidebar_fg = xcolor7
theme.sidebar_opacity = 1
theme.sidebar_position = "left" -- left or right
theme.sidebar_width = 300
theme.sidebar_height = screen_height
theme.sidebar_y = 0
theme.sidebar_border_radius = 0
theme.sidebar_hide_on_mouse_leave = true
theme.sidebar_show_on_mouse_edge = true
-- Exit screen
theme.exit_screen_bg = xcolor0 .. "CC"
theme.exit_screen_fg = xcolor7
theme.exit_screen_font = "sans 14"
theme.exit_screen_icon_size = 140
-- Other icons (mostly used in sidebar and menu)
theme.playerctl_toggle_icon = icon_path .. "playerctl_toggle.png"
theme.playerctl_prev_icon = icon_path .. "playerctl_prev.png"
theme.playerctl_next_icon = icon_path .. "playerctl_next.png"
theme.stats_icon = icon_path .. "stats.png"
theme.search_icon = icon_path .. "search.png"
theme.volume_icon = icon_path .. "volume.png"
theme.muted_icon = icon_path .. "muted.png"
theme.mpd_icon = icon_path .. "mpd.png"
theme.firefox_icon = icon_path .. "firefox.png"
theme.youtube_icon = icon_path .. "youtube.png"
theme.reddit_icon = icon_path .. "reddit.png"
theme.discord_icon = icon_path .. "discord.png"
theme.telegram_icon = icon_path .. "telegram.png"
theme.steam_icon = icon_path .. "steam.png"
theme.lutris_icon = icon_path .. "lutris.png"
theme.files_icon = icon_path .. "files.png"
theme.manual_icon = icon_path .. "manual.png"
theme.keyboard_icon = icon_path .. "keyboard.png"
theme.appearance_icon = icon_path .. "appearance.png"
theme.editor_icon = icon_path .. "editor.png"
theme.gimp_icon = icon_path .. "gimp.png"
theme.terminal_icon = icon_path .. "terminal.png"
theme.mail_icon = icon_path .. "mail.png"
theme.music_icon = icon_path .. "music.png"
theme.temperature_icon = icon_path .. "temperature.png"
theme.battery_icon = icon_path .. "battery.png"
theme.battery_charging_icon = icon_path .. "battery_charging.png"
theme.cpu_icon = icon_path .. "cpu.png"
theme.compositor_icon = icon_path .. "compositor.png"
theme.sidebar_icon = icon_path .. "sidebar.png"
theme.ram_icon = icon_path .. "ram.png"
theme.screenshot_icon = icon_path .. "screenshot.png"
theme.home_icon = icon_path .. "home.png"
-- Weather icons
theme.cloud_icon = weather_icon_path .. "cloud.png"
theme.dcloud_icon = weather_icon_path .. "dcloud.png"
theme.ncloud_icon = weather_icon_path .. "ncloud.png"
theme.sun_icon = weather_icon_path .. "sun.png"
theme.star_icon = weather_icon_path .. "star.png"
theme.rain_icon = weather_icon_path .. "rain.png"
theme.snow_icon = weather_icon_path .. "snow.png"
theme.mist_icon = weather_icon_path .. "mist.png"
theme.storm_icon = weather_icon_path .. "storm.png"
theme.whatever_icon = weather_icon_path .. "whatever.png"
-- Exit screen icons
theme.exit_icon = icon_path .. "exit.png"
theme.poweroff_icon = icon_path .. "poweroff.png"
theme.reboot_icon = icon_path .. "reboot.png"
theme.suspend_icon = icon_path .. "suspend.png"
theme.lock_icon = icon_path .. "lock.png"
-- theme.hibernate_icon = icon_path .. "hibernate.png"
-- Icon taglist
local ntags = 10
theme.taglist_icons_empty = {}
theme.taglist_icons_occupied = {}
theme.taglist_icons_focused = {}
theme.taglist_icons_urgent = {}
-- table.insert(tag_icons, tag)
for i = 1, ntags do
theme.taglist_icons_empty[i] = taglist_icon_path .. tostring(i) .. "_empty.png"
theme.taglist_icons_occupied[i] = taglist_icon_path .. tostring(i) .. "_occupied.png"
theme.taglist_icons_focused[i] = taglist_icon_path .. tostring(i) .. "_focused.png"
theme.taglist_icons_urgent[i] = taglist_icon_path .. tostring(i) .. "_urgent.png"
end
-- Prompt
theme.prompt_fg = accent_color
-- Text Taglist
theme.taglist_font = "Iosevka Nerd Font 12"
-- theme.taglist_font = theme.font
theme.taglist_bg_focus = xcolor0 .. "00"
theme.taglist_fg_focus = xcolor14
theme.taglist_bg_occupied = xcolor0 .. "00"
theme.taglist_fg_occupied = xcolor4
theme.taglist_bg_empty = xcolor0 .. "00"
theme.taglist_fg_empty = xcolor8
theme.taglist_bg_urgent = xcolor0 .. "00"
theme.taglist_fg_urgent = urgent_color
theme.taglist_disable_icon = true
theme.taglist_spacing = dpi(0)
--theme.taglist_item_roundness = 0
theme.taglist_item_roundness = theme.border_radius
-- Generate taglist squares:
local taglist_square_size = dpi(0)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size, theme.fg_focus
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size, theme.fg_normal
)
-- Variables set for theming the menu:
theme.menu_submenu_icon = icon_path.."submenu.png"
theme.menu_height = dpi(35)
theme.menu_width = dpi(180)
theme.menu_bg_normal = xcolor0
theme.menu_fg_normal= xcolor7
theme.menu_bg_focus = xcolor8 .. "55"
theme.menu_fg_focus= xcolor7
theme.menu_border_width = 0
theme.menu_border_color = xcolor0
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.bg_widget = "#cc0000"
-- Titlebar buttons
-- Define the images to load
theme.titlebar_close_button_normal = tip .. "close_normal.svg"
theme.titlebar_close_button_focus = tip .. "close_focus.svg"
theme.titlebar_minimize_button_normal = tip .. "minimize_normal.svg"
theme.titlebar_minimize_button_focus = tip .. "minimize_focus.svg"
theme.titlebar_ontop_button_normal_inactive = tip .. "ontop_normal_inactive.svg"
theme.titlebar_ontop_button_focus_inactive = tip .. "ontop_focus_inactive.svg"
theme.titlebar_ontop_button_normal_active = tip .. "ontop_normal_active.svg"
theme.titlebar_ontop_button_focus_active = tip .. "ontop_focus_active.svg"
theme.titlebar_sticky_button_normal_inactive = tip .. "sticky_normal_inactive.svg"
theme.titlebar_sticky_button_focus_inactive = tip .. "sticky_focus_inactive.svg"
theme.titlebar_sticky_button_normal_active = tip .. "sticky_normal_active.svg"
theme.titlebar_sticky_button_focus_active = tip .. "sticky_focus_active.svg"
theme.titlebar_floating_button_normal_inactive = tip .. "floating_normal_inactive.svg"
theme.titlebar_floating_button_focus_inactive = tip .. "floating_focus_inactive.svg"
theme.titlebar_floating_button_normal_active = tip .. "floating_normal_active.svg"
theme.titlebar_floating_button_focus_active = tip .. "floating_focus_active.svg"
theme.titlebar_maximized_button_normal_inactive = tip .. "maximized_normal_inactive.svg"
theme.titlebar_maximized_button_focus_inactive = tip .. "maximized_focus_inactive.svg"
theme.titlebar_maximized_button_normal_active = tip .. "maximized_normal_active.svg"
theme.titlebar_maximized_button_focus_active = tip .. "maximized_focus_active.svg"
-- (hover)
theme.titlebar_close_button_normal_hover = tip .. "close_normal_hover.svg"
theme.titlebar_close_button_focus_hover = tip .. "close_focus_hover.svg"
theme.titlebar_minimize_button_normal_hover = tip .. "minimize_normal_hover.svg"
theme.titlebar_minimize_button_focus_hover = tip .. "minimize_focus_hover.svg"
theme.titlebar_ontop_button_normal_inactive_hover = tip .. "ontop_normal_inactive_hover.svg"
theme.titlebar_ontop_button_focus_inactive_hover = tip .. "ontop_focus_inactive_hover.svg"
theme.titlebar_ontop_button_normal_active_hover = tip .. "ontop_normal_active_hover.svg"
theme.titlebar_ontop_button_focus_active_hover = tip .. "ontop_focus_active_hover.svg"
theme.titlebar_sticky_button_normal_inactive_hover = tip .. "sticky_normal_inactive_hover.svg"
theme.titlebar_sticky_button_focus_inactive_hover = tip .. "sticky_focus_inactive_hover.svg"
theme.titlebar_sticky_button_normal_active_hover = tip .. "sticky_normal_active_hover.svg"
theme.titlebar_sticky_button_focus_active_hover = tip .. "sticky_focus_active_hover.svg"
theme.titlebar_floating_button_normal_inactive_hover = tip .. "floating_normal_inactive_hover.svg"
theme.titlebar_floating_button_focus_inactive_hover = tip .. "floating_focus_inactive_hover.svg"
theme.titlebar_floating_button_normal_active_hover = tip .. "floating_normal_active_hover.svg"
theme.titlebar_floating_button_focus_active_hover = tip .. "floating_focus_active_hover.svg"
theme.titlebar_maximized_button_normal_inactive_hover = tip .. "maximized_normal_inactive_hover.svg"
theme.titlebar_maximized_button_focus_inactive_hover = tip .. "maximized_focus_inactive_hover.svg"
theme.titlebar_maximized_button_normal_active_hover = tip .. "maximized_normal_active_hover.svg"
theme.titlebar_maximized_button_focus_active_hover = tip .. "maximized_focus_active_hover.svg"
-- You can use your own layout icons like this:
theme.layout_fairh = layout_icon_path .. "fairh.png"
theme.layout_fairv = layout_icon_path .. "fairv.png"
theme.layout_floating = layout_icon_path .. "floating.png"
theme.layout_magnifier = layout_icon_path .. "magnifier.png"
theme.layout_max = layout_icon_path .. "max.png"
theme.layout_fullscreen = layout_icon_path .. "fullscreen.png"
theme.layout_tilebottom = layout_icon_path .. "tilebottom.png"
theme.layout_tileleft = layout_icon_path .. "tileleft.png"
theme.layout_tile = layout_icon_path .. "tile.png"
theme.layout_tiletop = layout_icon_path .. "tiletop.png"
theme.layout_spiral = layout_icon_path .. "spiral.png"
theme.layout_dwindle = layout_icon_path .. "dwindle.png"
theme.layout_cornernw = layout_icon_path .. "cornernw.png"
theme.layout_cornerne = layout_icon_path .. "cornerne.png"
theme.layout_cornersw = layout_icon_path .. "cornersw.png"
theme.layout_cornerse = layout_icon_path .. "cornerse.png"
-- Recolor layout icons
--theme = theme_assets.recolor_layout(theme, xcolor1)
-- Noodle widgets customization --
-- Desktop mode widget variables
-- Symbols   
-- theme.desktop_mode_color_floating = xcolor4
-- theme.desktop_mode_color_tile = xcolor3
-- theme.desktop_mode_color_max = xcolor1
-- theme.desktop_mode_text_floating = "f"
-- theme.desktop_mode_text_tile = "t"
-- theme.desktop_mode_text_max = "m"
-- Minimal tasklist widget variables
theme.minimal_tasklist_visible_clients_color = focused_color
theme.minimal_tasklist_visible_clients_text = "+ "
theme.minimal_tasklist_hidden_clients_color = xcolor8
theme.minimal_tasklist_hidden_clients_text = " - "
-- Mpd song
theme.mpd_song_title_color = xcolor7
theme.mpd_song_artist_color = xcolor7
theme.mpd_song_paused_color = xcolor8
-- Volume bar
theme.volume_bar_active_color = xcolor6
theme.volume_bar_active_background_color = xcolor6 .. "33"
theme.volume_bar_muted_color = xcolor8
theme.volume_bar_muted_background_color = xcolor8 .. "33"
-- Temperature bar
theme.temperature_bar_active_color = xcolor1
theme.temperature_bar_background_color = xcolor1 .. "33"
-- Battery bar
theme.battery_bar_active_color = xcolor5
theme.battery_bar_background_color = xcolor5 .. "33"
-- CPU bar
theme.cpu_bar_active_color = xcolor2
theme.cpu_bar_background_color = xcolor2 .. "33"
-- RAM bar
theme.ram_bar_active_color = xcolor12
theme.ram_bar_background_color = xcolor12 .. "33"
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus
)
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = "/usr/share/icons/Numix"
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="40"
height="50"
viewBox="-25 -50 100 300"
version="1.1"
id="svg8"
inkscape:version="0.91 r13725"
sodipodi:docname="cross.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="-11.895218"
inkscape:cy="30.6447"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1572"
inkscape:window-height="1114"
inkscape:window-x="10"
inkscape:window-y="68"
inkscape:window-maximized="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:none;stroke:#F37F97;stroke-width:40.88542557;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M -8.4863203,66.513663 58.486311,133.48632"
id="path817"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#f37f97;stroke-width:40.88542557;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 58.486311,66.513682 -8.4863203,133.48634"
id="path817-3"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Some files were not shown because too many files have changed in this diff Show more