update: some stuff

This commit is contained in:
rxyhn 2022-03-10 11:33:42 +07:00
parent 452e1be6ab
commit 058c7ede85
6 changed files with 79 additions and 49 deletions

View file

@ -4,25 +4,36 @@
local awful = require("awful")
local naughty = require("naughty")
-- Uptime Script from https://github.com/niraj998
local uptime_script = [[
sh -c "
cmd=$(uptime)
cmd=$(uptime)
hr=$( echo $cmd | cut -d \":\" -f3 | awk '{print $NF}')
mt=$( echo $cmd | cut -d \":\" -f4 | cut -c1-2 )
day=$(echo $cmd | grep day)
if [ -z \"$day\" ]; then
hr=$( echo $cmd | cut -d \":\" -f3 | awk '{print $NF}')
mt=$( echo $cmd | cut -d \":\" -f4 | cut -c1-2 )
day=$(echo $cmd | grep day)
if [ -z \"$day\" ]; then
hour=$(uptime -p | grep hour)
if [ -z \"$hour\" ]; then
uptime -p | awk '{print $2$3}' | cut -c1-3
else
echo \"${hr}h ${mt}m\"
fi
else
if [ -z \"$hour\" ]; then
uptime -p | awk '{print $2 \"m\"}'
else
if [ \"$mt\" -lt \"10\"]; then
mt=$( echo $cmd | cut -d \":\" -f4 | cut -c2 )
echo \"${hr}h ${mt}m\"
else
echo \"${hr}h ${mt}m\"
fi
fi
else
day=$(echo $day | cut -d \" \" -f3)
echo \"${day}d ${hr}h ${mt}m\"
fi
if [ \"$mt\" -lt \"10\" ]; then
mt=$( echo $cmd | cut -d \":\" -f4 | cut -c2 )
echo \"${day}d ${hr}h ${mt}m\"
else
echo \"${day}d ${hr}h ${mt}m\"
fi
fi
"]]
local update_interval = 60

View file

@ -77,10 +77,10 @@ theme.fg_minimize = theme.xcolor8
theme.button_close = theme.xcolor1
-- Borders
theme.border_width = dpi(0)
theme.border_width = dpi(5)
theme.oof_border_width = dpi(0)
theme.border_normal = theme.xbackground
theme.border_focus = theme.xbackground
theme.border_normal = theme.darker_bg
theme.border_focus = theme.darker_bg
theme.border_radius = dpi(3)
theme.client_radius = dpi(3)
theme.widget_border_width = dpi(3)
@ -198,7 +198,7 @@ theme.menu_bg_focus = theme.lighter_bg
theme.menu_bg_normal = theme.xbackground
theme.menu_fg_focus = theme.xforeground
theme.menu_fg_normal = theme.xforeground
theme.menu_border_color = theme.xcolor8
theme.menu_border_color = theme.darker_bg
theme.menu_border_width = theme.border_width / 2
theme.menu_submenu = "» "
theme.menu_submenu_icon = nil

View file

@ -105,7 +105,7 @@ local create_notif = function(icon, n, width)
local box = {}
local dismiss = wibox.widget {
markup = "",
markup = helpers.colorize_text("", beautiful.xcolor1),
font = beautiful.icon_font_name .. "9",
align = "center",
valign = "center",

View file

@ -101,10 +101,15 @@ awesome.connect_signal("signal::volume", function(value, muted)
end
end)
local bri_first_time = true
awesome.connect_signal("signal::brightness", function(value)
pop_icon.markup = ""
pop_bar.value = value
pop_bar.color = beautiful.pop_brightness_color
if bri_first_time then
bri_first_time = false
else
pop_icon.markup = ""
pop_bar.value = value
pop_bar.color = beautiful.pop_brightness_color
toggle_pop()
toggle_pop()
end
end)

View file

@ -205,7 +205,7 @@ local time_min = wibox.widget{
-- Wifi
local wifi_status_icon = wibox.widget{
markup = "Offline",
font = beautiful.icon_font_name .. "Round 15",
font = beautiful.icon_font_name .. "Round 14",
valign = "center",
align = "center",
widget = wibox.widget.textbox
@ -213,11 +213,11 @@ local wifi_status_icon = wibox.widget{
local wifi = wibox.widget{
wifi_status_icon,
forced_width = dpi(40),
forced_height = dpi(40),
forced_width = dpi(35),
forced_height = dpi(35),
bg = beautiful.xcolor0,
shape = helpers.rrect(beautiful.tooltip_box_border_radius),
shape_border_width = dpi(2.25),
shape_border_width = dpi(3),
shape_border_color = beautiful.xcolor1,
widget = wibox.container.background
}

View file

@ -13,32 +13,47 @@ configuration {
bg: #061115;
fg: #d9d7d6;
accent: #1c252c;
inactive: #484e5b;
hightlight: #6791c9;
darker-bg: #0A1419;
active: #484e5b;
rad: 4px;
background-color: @bg;
text-color: @fg;
}
window {
width: 30%;
border: 2px;
border-radius: 4px;
border-color: @accent;
border: 4px;
border-color: @darker-bg;
}
inputbar {
margin: 24px 0 24px 24px;
children: [ textbox, entry ];
expand: false;
margin: 20px 20px 0;
border-radius: @rad;
background-color: @darker-bg;
}
prompt, entry {
text-color: @fg;
padding: 8px;
}
prompt {
textbox {
str: "";
expand: false;
padding: 0 1% 0;
horizontal-align: 0.5;
vertical-align: 0.5;
border-radius: @rad;
background-color: @accent;
text-color: @hightlight;
border-radius: 4px 0 0 4px;
text-color: @bg;
font: "Material Icons 17";
}
entry{
expand: true;
padding: 2%;
placeholder: "Search";
border-radius: @rad;
background-color: @darker-bg;
}
listview {
@ -47,7 +62,7 @@ listview {
cycle: false;
dynamic: true;
layout: vertical;
margin: 0 24px 14px 24px;
margin: 15px 20px 15px 20px;
}
element {
@ -63,26 +78,25 @@ element-text {
}
element selected {
background-color: @accent;
background-color: @darker-bg;
text-color: @fg;
border-radius: 4px;
border-radius: @rad;
}
mode-switcher {
background-color: @accent;
background-color: @darker-bg;
padding: 0 0 4px 0;
}
button {
text-color: @inactive;
background-color: @accent;
text-color: @accent;
background-color: @darker-bg;
padding: 6px 6px 6px 6px;
border-radius: 0;
horizontal-align: 0.5;
}
button selected {
text-color: @hightlight;
text-color: @active;
background-color: @bg;
border-radius: 0 0 4px 4px;
}