mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
Added volume widget
This commit is contained in:
parent
b0d56edd56
commit
1524a5948f
@ -186,8 +186,8 @@ draw_bold_text_with_bright_colors: true
|
|||||||
colors:
|
colors:
|
||||||
# Default colors
|
# Default colors
|
||||||
primary:
|
primary:
|
||||||
background: '#1d1f21'
|
background: "#282a36"
|
||||||
foreground: '#c5c8c6'
|
foreground: "#f8f8f2"
|
||||||
|
|
||||||
# Bright and dim foreground colors
|
# Bright and dim foreground colors
|
||||||
#
|
#
|
||||||
@ -195,8 +195,8 @@ colors:
|
|||||||
# present. If the bright foreground color is not set, or
|
# present. If the bright foreground color is not set, or
|
||||||
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
|
# `draw_bold_text_with_bright_colors` is `false`, the normal foreground
|
||||||
# color will be used.
|
# color will be used.
|
||||||
dim_foreground: '#828482'
|
dim_foreground: "#828482"
|
||||||
bright_foreground: '#eaeaea'
|
bright_foreground: "#ffffff"
|
||||||
|
|
||||||
# Cursor colors
|
# Cursor colors
|
||||||
#
|
#
|
||||||
@ -224,16 +224,16 @@ colors:
|
|||||||
search:
|
search:
|
||||||
# Allowed values are CellForeground/CellBackground, whichq reference the
|
# Allowed values are CellForeground/CellBackground, whichq reference the
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
# matches:
|
matches:
|
||||||
# foreground: '#000000'
|
foreground: '#44475a'
|
||||||
# background: '#ffffff'
|
background: '#50fa7b'
|
||||||
# focused_match:
|
focused_match:
|
||||||
# foreground: '#ffffff'
|
foreground: '#44475a'
|
||||||
# background: '#000000'
|
background: '#ffb86c'
|
||||||
|
|
||||||
bar:
|
bar:
|
||||||
background: '#282828'
|
background: "#282a36"
|
||||||
foreground: '#EBEBE9'
|
foreground: "#f8f8f2"
|
||||||
|
|
||||||
# Keyboard regex hints
|
# Keyboard regex hints
|
||||||
hints:
|
hints:
|
||||||
@ -242,16 +242,16 @@ colors:
|
|||||||
# Allowed values are CellForeground/CellBackground, which reference the
|
# Allowed values are CellForeground/CellBackground, which reference the
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
start:
|
start:
|
||||||
foreground: '#1d1f21'
|
foreground: "#282a36"
|
||||||
background: '#e9ff5e'
|
background: "#f1fa8c"
|
||||||
|
|
||||||
# All characters after the first one in the hint label
|
# All characters after the first one in the hint label
|
||||||
#
|
#
|
||||||
# Allowed values are CellForeground/CellBackground, which reference the
|
# Allowed values are CellForeground/CellBackground, which reference the
|
||||||
# affected cell, or hexadecimal colors like #ff00ff.
|
# affected cell, or hexadecimal colors like #ff00ff.
|
||||||
end:
|
end:
|
||||||
foreground: '#e9ff5e'
|
foreground: "#f1fa8c"
|
||||||
background: '#1d1f21'
|
background: "#282a36"
|
||||||
|
|
||||||
# Line indicator
|
# Line indicator
|
||||||
#
|
#
|
||||||
@ -275,39 +275,39 @@ colors:
|
|||||||
|
|
||||||
# Normal colors
|
# Normal colors
|
||||||
normal:
|
normal:
|
||||||
black: '#313539'
|
black: '#21222c'
|
||||||
red: '#b02626'
|
red: '#ff5555'
|
||||||
green: '#40a62f'
|
green: '#50fa7b'
|
||||||
yellow: '#f1e635'
|
yellow: '#f1fa8c'
|
||||||
blue: '#314ad0'
|
blue: '#bd93f9'
|
||||||
magenta: '#b30ad0'
|
magenta: '#ff79c6'
|
||||||
cyan: '#32d0fc'
|
cyan: '#8be9fd'
|
||||||
white: '#acadb1'
|
white: '#f8f8f2'
|
||||||
|
|
||||||
# Bright colors
|
# Bright colors
|
||||||
bright:
|
bright:
|
||||||
black: '#717174'
|
black: '#6272a4'
|
||||||
red: '#b02626'
|
red: '#ff6e6e'
|
||||||
green: '#40a62f'
|
green: '#69ff94'
|
||||||
yellow: '#f1e635'
|
yellow: '#ffffa5'
|
||||||
blue: '#314ad0'
|
blue: '#d6acff'
|
||||||
magenta: '#b30ad0'
|
magenta: '#ff92df'
|
||||||
cyan: '#32d0fc'
|
cyan: '#a4ffff'
|
||||||
white: '#acadb1'
|
white: '#ffffff'
|
||||||
|
|
||||||
# Dim colors
|
# Dim colors
|
||||||
#
|
#
|
||||||
# If the dim colors are not set, they will be calculated automatically based
|
# If the dim colors are not set, they will be calculated automatically based
|
||||||
# on the `normal` colors.
|
# on the `normal` colors.
|
||||||
dim:
|
# dim:
|
||||||
black: '#676f78'
|
# black: "#676f78"
|
||||||
red: '#b55454'
|
# red: "#b55454"
|
||||||
green: '#78a670'
|
# green: "#78a670"
|
||||||
yellow: '#faf380'
|
# yellow: "#faf380"
|
||||||
blue: '#707fd0'
|
# blue: "#707fd0"
|
||||||
magenta: '#c583d0'
|
# magenta: "#c583d0"
|
||||||
cyan: '#8adaf1'
|
# cyan: "#8adaf1"
|
||||||
white: '#e0e3e7'
|
# white: "#e0e3e7"
|
||||||
|
|
||||||
# Indexed Colors
|
# Indexed Colors
|
||||||
#
|
#
|
||||||
@ -871,6 +871,3 @@ key_bindings:
|
|||||||
|
|
||||||
# Print all received window events.
|
# Print all received window events.
|
||||||
#print_events: false
|
#print_events: false
|
||||||
|
|
||||||
import:
|
|
||||||
- ~/.config/alacritty/dracula.yml
|
|
||||||
|
|||||||
@ -4,13 +4,15 @@ pcall(require, "luarocks.loader")
|
|||||||
|
|
||||||
-- Awesome Wm Widgets
|
-- Awesome Wm Widgets
|
||||||
local batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc")
|
local batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc")
|
||||||
local cpu_widget = require("awesome-wm-widgets.cpu-widget.cpu-widget")
|
|
||||||
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
|
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
|
||||||
local spotify_widget = require("awesome-wm-widgets.spotify-widget.spotify")
|
|
||||||
local spotify_shell = require("awesome-wm-widgets.spotify-shell.spotify-shell")
|
|
||||||
local calendar_widget = require("awesome-wm-widgets.calendar-widget.calendar")
|
local calendar_widget = require("awesome-wm-widgets.calendar-widget.calendar")
|
||||||
|
local cpu_widget = require("awesome-wm-widgets.cpu-widget.cpu-widget")
|
||||||
|
local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu")
|
||||||
local net_speed_widget = require("awesome-wm-widgets.net-speed-widget.net-speed")
|
local net_speed_widget = require("awesome-wm-widgets.net-speed-widget.net-speed")
|
||||||
local ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget")
|
local ram_widget = require("awesome-wm-widgets.ram-widget.ram-widget")
|
||||||
|
local spotify_shell = require("awesome-wm-widgets.spotify-shell.spotify-shell")
|
||||||
|
local spotify_widget = require("awesome-wm-widgets.spotify-widget.spotify")
|
||||||
|
local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
|
||||||
local weather_widget = require("awesome-wm-widgets.weather-widget.weather")
|
local weather_widget = require("awesome-wm-widgets.weather-widget.weather")
|
||||||
|
|
||||||
-- Standard awesome library
|
-- Standard awesome library
|
||||||
@ -32,7 +34,7 @@ require("awful.hotkeys_popup.keys")
|
|||||||
|
|
||||||
-- OpenWeather API
|
-- OpenWeather API
|
||||||
-- !Create file ~/.config/awesome/weather and paste API from OpenWeather, latitude and longitude, each on separate lines
|
-- !Create file ~/.config/awesome/weather and paste API from OpenWeather, latitude and longitude, each on separate lines
|
||||||
local weather_file = "/home/kristofers/.config/awesome/weather" -- absolute path to `weather` file
|
local WEATHER_FILE = os.getenv("HOME") .. "/.config/awesome/weather"
|
||||||
-- see if the file exists
|
-- see if the file exists
|
||||||
local function file_exists(file)
|
local function file_exists(file)
|
||||||
local f = io.open(file, "rb")
|
local f = io.open(file, "rb")
|
||||||
@ -55,7 +57,7 @@ local function lines_from(file)
|
|||||||
return lines
|
return lines
|
||||||
end
|
end
|
||||||
|
|
||||||
local weather_output = lines_from(weather_file)
|
local weather_output = lines_from(WEATHER_FILE)
|
||||||
local API = weather_output[1]
|
local API = weather_output[1]
|
||||||
local latitude = tonumber(weather_output[2])
|
local latitude = tonumber(weather_output[2])
|
||||||
local longitude = tonumber(weather_output[3])
|
local longitude = tonumber(weather_output[3])
|
||||||
@ -116,16 +118,16 @@ awful.layout.layouts = {
|
|||||||
awful.layout.suit.fair.horizontal,
|
awful.layout.suit.fair.horizontal,
|
||||||
awful.layout.suit.tile.top,
|
awful.layout.suit.tile.top,
|
||||||
awful.layout.suit.tile.bottom,
|
awful.layout.suit.tile.bottom,
|
||||||
--[[ awful.layout.suit.spiral.dwindle, ]]
|
-- awful.layout.suit.spiral.dwindle,
|
||||||
--[[ awful.layout.suit.spiral, ]]
|
-- awful.layout.suit.spiral,
|
||||||
--[[ awful.layout.suit.floating, ]]
|
-- awful.layout.suit.floating,
|
||||||
--[[ awful.layout.suit.max, ]]
|
-- awful.layout.suit.max,
|
||||||
--[[ awful.layout.suit.max.fullscreen, ]]
|
-- awful.layout.suit.max.fullscreen,
|
||||||
--[[ awful.layout.suit.magnifier, ]]
|
-- awful.layout.suit.magnifier,
|
||||||
--[[ awful.layout.suit.corner.nw, ]]
|
-- awful.layout.suit.corner.nw,
|
||||||
--[[ awful.layout.suit.corner.ne, ]]
|
-- awful.layout.suit.corner.ne,
|
||||||
--[[ awful.layout.suit.corner.sw, ]]
|
-- awful.layout.suit.corner.sw,
|
||||||
--[[ awful.layout.suit.corner.se, ]]
|
-- awful.layout.suit.corner.se,
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
@ -292,26 +294,92 @@ awful.screen.connect_for_each_screen(function(s)
|
|||||||
{ -- Right widgets
|
{ -- Right widgets
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
wibox.widget.systray(),
|
wibox.widget.systray(),
|
||||||
cpu_widget(),
|
cpu_widget({
|
||||||
ram_widget(),
|
width = 50,
|
||||||
|
step_width = 2,
|
||||||
|
step_spacing = 0,
|
||||||
|
color = beautiful.fg_nromal,
|
||||||
|
enable_kill_button = true,
|
||||||
|
process_info_max_length = -1,
|
||||||
|
timeout = 1,
|
||||||
|
}),
|
||||||
|
ram_widget({
|
||||||
|
color_used = beautiful.bg_urgent,
|
||||||
|
color_free = beautiful.fg_normal,
|
||||||
|
color_buf = beautiful.border_color_active,
|
||||||
|
widget_height = 25,
|
||||||
|
widget_width = 25,
|
||||||
|
widget_show_buf = false,
|
||||||
|
timeout = 1,
|
||||||
|
}),
|
||||||
net_speed_widget(),
|
net_speed_widget(),
|
||||||
spotify_widget({
|
spotify_widget({
|
||||||
font = "JetBrainsMono NF 10",
|
|
||||||
play_icon = "/usr/share/icons/Papirus-Light/24x24/categories/spotify.svg",
|
play_icon = "/usr/share/icons/Papirus-Light/24x24/categories/spotify.svg",
|
||||||
pause_icon = "/usr/share/icons/Papirus-Dark/24x24/panel/spotify-indicator.svg",
|
pause_icon = "/usr/share/icons/Papirus-Dark/24x24/panel/spotify-indicator.svg",
|
||||||
|
font = "JetBrainsMono NF 10",
|
||||||
dim_when_paused = true,
|
dim_when_paused = true,
|
||||||
dim_opacity = 0.5,
|
dim_opacity = 0.5,
|
||||||
max_lenght = -1,
|
max_length = -1,
|
||||||
|
show_tooltip = true,
|
||||||
|
timeout = 1,
|
||||||
}),
|
}),
|
||||||
batteryarc_widget({
|
batteryarc_widget({
|
||||||
|
font = "JetBrainsMono NF 10",
|
||||||
|
arc_thickness = 2,
|
||||||
show_current_level = true,
|
show_current_level = true,
|
||||||
size = 32,
|
size = 32,
|
||||||
|
timeout = 1,
|
||||||
|
main_color = beautiful.fg_color,
|
||||||
|
bg_color = "#ffffff11",
|
||||||
|
low_level_color = "#e53935",
|
||||||
|
medium_level_color = "#c0ca33",
|
||||||
|
charging_color = "#43a047",
|
||||||
|
warning_mdg_title = "Huston, we have a problem",
|
||||||
|
warning_msg_text = "Battery is dying",
|
||||||
|
warning_msg_possition = "top_right",
|
||||||
|
enable_battery_warning = true,
|
||||||
|
show_notification_mode = "on_hover",
|
||||||
|
Notification_position = "top_right",
|
||||||
}),
|
}),
|
||||||
brightness_widget({
|
brightness_widget({
|
||||||
|
type = "arc",
|
||||||
program = "brightnessctl",
|
program = "brightnessctl",
|
||||||
step = 5,
|
step = 1,
|
||||||
base = 60,
|
base = 60,
|
||||||
|
font = "JetBrainsMono NF 10",
|
||||||
tooltip = true,
|
tooltip = true,
|
||||||
|
timeout = 1,
|
||||||
|
tooltip = true,
|
||||||
|
percentage = true,
|
||||||
|
}),
|
||||||
|
volume_widget({
|
||||||
|
mixer_cmd = "pulsemixer",
|
||||||
|
step = 1,
|
||||||
|
widget_type = "arc",
|
||||||
|
device = "pulse",
|
||||||
|
thickness = 2,
|
||||||
|
main_color = beautiful.fg_normal,
|
||||||
|
bg_color = "#ffffff11",
|
||||||
|
mute_color = "#4b4b4bff",
|
||||||
|
size = 18,
|
||||||
|
}),
|
||||||
|
logout_menu_widget({
|
||||||
|
font = "JetBrainsMono NF 10",
|
||||||
|
onlogout = function()
|
||||||
|
awful.spawn.with_shell("loginctl kill-session self")
|
||||||
|
end,
|
||||||
|
onlock = function()
|
||||||
|
awful.spawn.with_shell("xlock -mode random -duration 10")
|
||||||
|
end,
|
||||||
|
onreboot = function()
|
||||||
|
awful.spawn.with_shell("systemctl reboot")
|
||||||
|
end,
|
||||||
|
onsuspend = function()
|
||||||
|
awful.spawn.with_shell("systemctl suspend")
|
||||||
|
end,
|
||||||
|
onpoweroff = function()
|
||||||
|
awful.spawn.with_shell("systemctl poweroff")
|
||||||
|
end,
|
||||||
}),
|
}),
|
||||||
weather_widget({
|
weather_widget({
|
||||||
api_key = API,
|
api_key = API,
|
||||||
@ -319,7 +387,6 @@ awful.screen.connect_for_each_screen(function(s)
|
|||||||
show_hourly_forecst = true,
|
show_hourly_forecst = true,
|
||||||
show_daily_forecast = true,
|
show_daily_forecast = true,
|
||||||
}),
|
}),
|
||||||
-- logout_menu_widget(),
|
|
||||||
mytextclock,
|
mytextclock,
|
||||||
s.mylayoutbox,
|
s.mylayoutbox,
|
||||||
},
|
},
|
||||||
@ -341,21 +408,22 @@ root.buttons(gears.table.join(
|
|||||||
local globalkeys = gears.table.join(
|
local globalkeys = gears.table.join(
|
||||||
|
|
||||||
awful.key({}, "#233", function()
|
awful.key({}, "#233", function()
|
||||||
brightness_widget:inc()
|
brightness_widget:inc(5)
|
||||||
end), -- increase brightness
|
end), -- increase brightness
|
||||||
awful.key({}, "#232", function()
|
awful.key({}, "#232", function()
|
||||||
brightness_widget:dec()
|
brightness_widget:dec(5)
|
||||||
end), -- decrease brightness
|
end), -- decrease brightness
|
||||||
|
|
||||||
awful.key({}, "#123", function()
|
awful.key({}, "#123", function()
|
||||||
awful.spawn.with_shell("pulsemixer --change-volume +5")
|
volume_widget:inc(5)
|
||||||
end), -- increase volume
|
end), -- increase volume
|
||||||
awful.key({}, "#122", function()
|
awful.key({}, "#122", function()
|
||||||
awful.spawn.with_shell("pulsemixer --change-volume -5")
|
volume_widget:dec(5)
|
||||||
end), -- decrease volume
|
end), -- decrease volume
|
||||||
awful.key({}, "#121", function()
|
awful.key({}, "#121", function()
|
||||||
awful.spawn.with_shell("pulsemixer --toggle-mute")
|
volume_widget:toggle()
|
||||||
end), -- mute
|
end), -- mute
|
||||||
|
|
||||||
awful.key({}, "#172", function()
|
awful.key({}, "#172", function()
|
||||||
awful.spawn.with_shell("sp play")
|
awful.spawn.with_shell("sp play")
|
||||||
end), -- play/pause
|
end), -- play/pause
|
||||||
@ -447,17 +515,13 @@ local globalkeys = gears.table.join(
|
|||||||
awful.layout.inc(-1)
|
awful.layout.inc(-1)
|
||||||
end, { description = "select previous", group = "layout" }),
|
end, { description = "select previous", group = "layout" }),
|
||||||
|
|
||||||
-- awful.key({ modkey, "Control" }, "n",
|
-- awful.key({ modkey, "Control" }, "n", function()
|
||||||
-- function ()
|
-- local c = awful.client.restore()
|
||||||
-- local c = awful.client.restore()
|
-- -- Focus restored client
|
||||||
-- -- Focus restored client
|
-- if c then
|
||||||
-- if c then
|
-- c:emit_signal("request::activate", "key.unminimize", { raise = true })
|
||||||
-- c:emit_signal(
|
-- end
|
||||||
-- "request::activate", "key.unminimize", {raise = true}
|
-- end, { description = "restore minimized", group = "client" }),
|
||||||
-- )
|
|
||||||
-- end
|
|
||||||
-- end,
|
|
||||||
-- {description = "restore minimized", group = "client"}),
|
|
||||||
|
|
||||||
-- Prompt
|
-- Prompt
|
||||||
awful.key({ modkey }, "r", function()
|
awful.key({ modkey }, "r", function()
|
||||||
@ -501,11 +565,11 @@ local clientkeys = gears.table.join(
|
|||||||
awful.key({ modkey }, "t", function(c)
|
awful.key({ modkey }, "t", function(c)
|
||||||
c.ontop = not c.ontop
|
c.ontop = not c.ontop
|
||||||
end, { description = "toggle keep on top", group = "client" }),
|
end, { description = "toggle keep on top", group = "client" }),
|
||||||
awful.key({ modkey }, "n", function(c)
|
-- awful.key({ modkey }, "n", function(c)
|
||||||
-- The client currently has the input focus, so it cannot be
|
-- -- The client currently has the input focus, so it cannot be
|
||||||
-- minimized, since minimized clients can't have the focus.
|
-- -- minimized, since minimized clients can't have the focus.
|
||||||
c.minimized = true
|
-- c.minimized = true
|
||||||
end, { description = "minimize", group = "client" }),
|
-- end, { description = "minimize", group = "client" }),
|
||||||
awful.key({ modkey }, "m", function(c)
|
awful.key({ modkey }, "m", function(c)
|
||||||
c.maximized = not c.maximized
|
c.maximized = not c.maximized
|
||||||
c:raise()
|
c:raise()
|
||||||
|
|||||||
1
.local/share/fonts/.uuid
Normal file
1
.local/share/fonts/.uuid
Normal file
@ -0,0 +1 @@
|
|||||||
|
0f590ecd-d644-44a2-bef6-f151d889e861
|
||||||
1
.local/share/fonts/jetbrainsmono/.uuid
Normal file
1
.local/share/fonts/jetbrainsmono/.uuid
Normal file
@ -0,0 +1 @@
|
|||||||
|
d4bd66e7-0ef2-4449-b5f2-15429a6f8347
|
||||||
Loading…
Reference in New Issue
Block a user