feat: awesome battery, brightness and volume modules, modified shortcuts.
This commit is contained in:
parent
08f10df67b
commit
4591b6b394
1
.config/awesome/awesome-wm-widgets
Submodule
1
.config/awesome/awesome-wm-widgets
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 01a4f428e0361f4222e8d2f14607fb03bbd6d94e
|
@ -15,6 +15,9 @@ local naughty = require("naughty")
|
|||||||
local menubar = require("menubar")
|
local menubar = require("menubar")
|
||||||
local hotkeys_popup = require("awful.hotkeys_popup")
|
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||||
-- Widgets
|
-- Widgets
|
||||||
|
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
|
||||||
|
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
|
||||||
|
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
|
||||||
|
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
if awesome.startup_errors then
|
if awesome.startup_errors then
|
||||||
@ -62,13 +65,13 @@ mytags = {
|
|||||||
{name = "MED", layout = awful.layout.suit.max },
|
{name = "MED", layout = awful.layout.suit.max },
|
||||||
{name = "DOC", layout = awful.layout.suit.max },
|
{name = "DOC", layout = awful.layout.suit.max },
|
||||||
{name = "GFX", layout = awful.layout.suit.max },
|
{name = "GFX", layout = awful.layout.suit.max },
|
||||||
{name = "ETC" }
|
{name = "ETC" },
|
||||||
}
|
}
|
||||||
|
|
||||||
terminal = "alacritty"
|
terminal = "alacritty"
|
||||||
editor = os.getenv("EDITOR")
|
editor = os.getenv("EDITOR")
|
||||||
editor_cmd = terminal .. " -e " .. editor
|
editor_cmd = terminal .. " -e " .. editor
|
||||||
browser = "firefox"
|
browser = "brave"
|
||||||
files = "pcmanfm"
|
files = "pcmanfm"
|
||||||
wallpaper = "mount_cook.jpg"
|
wallpaper = "mount_cook.jpg"
|
||||||
lock = "i3lock -fti" .. wallpaper_dir .. "lock.png"
|
lock = "i3lock -fti" .. wallpaper_dir .. "lock.png"
|
||||||
@ -80,7 +83,6 @@ modkey = "Mod4"
|
|||||||
awful.layout.layouts = {
|
awful.layout.layouts = {
|
||||||
awful.layout.suit.tile,
|
awful.layout.suit.tile,
|
||||||
awful.layout.suit.max,
|
awful.layout.suit.max,
|
||||||
--awful.layout.suit.floating,
|
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
@ -169,17 +171,7 @@ local function set_clock(s)
|
|||||||
local dpi = require("beautiful.xresources").apply_dpi
|
local dpi = require("beautiful.xresources").apply_dpi
|
||||||
|
|
||||||
s.mytextclock = wibox.widget.textclock()
|
s.mytextclock = wibox.widget.textclock()
|
||||||
s.month_calendar = awful.widget.calendar_popup.month({
|
s.month_calendar = awful.widget.calendar_popup.month({screen = s})
|
||||||
screen = s,
|
|
||||||
style_year = {border_width = dpi(1)},
|
|
||||||
style_month = {border_width = dpi(1)},
|
|
||||||
style_yearheader = {border_width = dpi(1)},
|
|
||||||
style_header = {border_width = dpi(1)},
|
|
||||||
style_weekday = {border_width = dpi(1)},
|
|
||||||
style_weeknumber = {border_width = dpi(1)},
|
|
||||||
style_normal = {border_width = dpi(1)},
|
|
||||||
style_focus = {border_width = dpi(1)}
|
|
||||||
})
|
|
||||||
s.month_calendar:attach(s.mytextclock)
|
s.month_calendar:attach(s.mytextclock)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -195,8 +187,7 @@ awful.screen.connect_for_each_screen(
|
|||||||
-- Each screen has its own tag table.
|
-- Each screen has its own tag table.
|
||||||
for i, tag in pairs(mytags) do
|
for i, tag in pairs(mytags) do
|
||||||
awful.tag.add(
|
awful.tag.add(
|
||||||
tag.name,
|
tag.name, {
|
||||||
{
|
|
||||||
layout = tag.layout or awful.layout.layouts[1],
|
layout = tag.layout or awful.layout.layouts[1],
|
||||||
screen = s,
|
screen = s,
|
||||||
selected = i == 1
|
selected = i == 1
|
||||||
@ -261,6 +252,9 @@ awful.screen.connect_for_each_screen(
|
|||||||
{ -- Right widgets
|
{ -- Right widgets
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
wibox.widget.systray(),
|
wibox.widget.systray(),
|
||||||
|
battery_widget{margin_left = 5, margin_right = 5, show_current_level = true},
|
||||||
|
brightness_widget{program = "xbacklight", step = 10},
|
||||||
|
volume_widget(),
|
||||||
s.mytextclock,
|
s.mytextclock,
|
||||||
s.mylayoutbox,
|
s.mylayoutbox,
|
||||||
},
|
},
|
||||||
@ -278,7 +272,7 @@ globalkeys = gears.table.join(
|
|||||||
{description="show help", group="awesome"}
|
{description="show help", group="awesome"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Control"}, "r",
|
{modkey, "Shift"}, "r",
|
||||||
awesome.restart,
|
awesome.restart,
|
||||||
{description = "reload awesome", group = "awesome"}
|
{description = "reload awesome", group = "awesome"}
|
||||||
),
|
),
|
||||||
@ -390,18 +384,18 @@ globalkeys = gears.table.join(
|
|||||||
),
|
),
|
||||||
|
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey}, "space",
|
{modkey}, "m",
|
||||||
function()
|
function(c)
|
||||||
awful.layout.inc(1)
|
awful.layout.set(awful.layout.suit.max)
|
||||||
end,
|
end,
|
||||||
{description = "select next", group = "layout"}
|
{description = "switch to max layout", group = "layout"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"}, "space",
|
{modkey}, "t",
|
||||||
function()
|
function(c)
|
||||||
awful.layout.inc(-1)
|
awful.layout.set(awful.layout.suit.tile)
|
||||||
end,
|
end,
|
||||||
{description = "select previous", group = "layout"}
|
{description = "switch to tiling layout", group = "layout"}
|
||||||
),
|
),
|
||||||
|
|
||||||
-- Hotkeys
|
-- Hotkeys
|
||||||
@ -410,14 +404,14 @@ globalkeys = gears.table.join(
|
|||||||
function()
|
function()
|
||||||
awful.spawn.with_shell("pactl set-sink-mute 0 0 && pactl set-sink-volume 0 +2%")
|
awful.spawn.with_shell("pactl set-sink-mute 0 0 && pactl set-sink-volume 0 +2%")
|
||||||
end,
|
end,
|
||||||
{description = "increase volume by 2%", group = "hotkeys"}
|
{description = "increase volume", group = "hotkeys"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{}, "XF86AudioLowerVolume",
|
{}, "XF86AudioLowerVolume",
|
||||||
function()
|
function()
|
||||||
awful.spawn.with_shell("pactl set-sink-mute 0 0 && pactl set-sink-volume 0 -2%")
|
awful.spawn.with_shell("pactl set-sink-mute 0 0 && pactl set-sink-volume 0 -2%")
|
||||||
end,
|
end,
|
||||||
{description = "decrease volume by 2%", group = "hotkeys"}
|
{description = "decrease volume", group = "hotkeys"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{}, "XF86AudioMute",
|
{}, "XF86AudioMute",
|
||||||
@ -447,20 +441,6 @@ globalkeys = gears.table.join(
|
|||||||
end,
|
end,
|
||||||
{description = "play / pause media", group = "hotkeys"}
|
{description = "play / pause media", group = "hotkeys"}
|
||||||
),
|
),
|
||||||
awful.key(
|
|
||||||
{}, "XF86AudioPrev",
|
|
||||||
function()
|
|
||||||
awful.spawn("playerctl previous")
|
|
||||||
end,
|
|
||||||
{description = "play previous media", group = "hotkeys"}
|
|
||||||
),
|
|
||||||
awful.key(
|
|
||||||
{"Control"}, "PageUP",
|
|
||||||
function()
|
|
||||||
awful.spawn("playerctl previous")
|
|
||||||
end,
|
|
||||||
{description = "play previous media", group = "hotkeys"}
|
|
||||||
),
|
|
||||||
awful.key(
|
awful.key(
|
||||||
{}, "XF86AudioNext",
|
{}, "XF86AudioNext",
|
||||||
function()
|
function()
|
||||||
@ -469,12 +449,26 @@ globalkeys = gears.table.join(
|
|||||||
{description = "play next media", group = "hotkeys"}
|
{description = "play next media", group = "hotkeys"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{"Control"}, "PageDown",
|
{"Control"}, "Next",
|
||||||
function()
|
function()
|
||||||
awful.spawn("playerctl next")
|
awful.spawn("playerctl next")
|
||||||
end,
|
end,
|
||||||
{description = "play next media", group = "hotkeys"}
|
{description = "play next media", group = "hotkeys"}
|
||||||
),
|
),
|
||||||
|
awful.key(
|
||||||
|
{}, "XF86AudioPrev",
|
||||||
|
function()
|
||||||
|
awful.spawn("playerctl previous")
|
||||||
|
end,
|
||||||
|
{description = "play previous media", group = "hotkeys"}
|
||||||
|
),
|
||||||
|
awful.key(
|
||||||
|
{"Control"}, "Prior",
|
||||||
|
function()
|
||||||
|
awful.spawn("playerctl previous")
|
||||||
|
end,
|
||||||
|
{description = "play previous media", group = "hotkeys"}
|
||||||
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{"Control"}, "F4",
|
{"Control"}, "F4",
|
||||||
function()
|
function()
|
||||||
@ -482,19 +476,19 @@ globalkeys = gears.table.join(
|
|||||||
end,
|
end,
|
||||||
{description = "toggle touchpad", group = "hotkeys"}
|
{description = "toggle touchpad", group = "hotkeys"}
|
||||||
),
|
),
|
||||||
awful.key(
|
|
||||||
{}, "XF86MonBrightnessDown",
|
|
||||||
function()
|
|
||||||
awful.spawn("xbacklight -dec 10")
|
|
||||||
end,
|
|
||||||
{description = "decrease brightness", group = "hotkeys"}
|
|
||||||
),
|
|
||||||
awful.key(
|
awful.key(
|
||||||
{}, "XF86MonBrightnessUp",
|
{}, "XF86MonBrightnessUp",
|
||||||
function()
|
function()
|
||||||
awful.spawn("xbacklight -inc 10")
|
brightness_widget:inc()
|
||||||
end,
|
end,
|
||||||
{description = "increase brightness", group = "hotkeys"}
|
{description = "increase brightness", group = "hotkeys"}
|
||||||
|
),
|
||||||
|
awful.key(
|
||||||
|
{}, "XF86MonBrightnessDown",
|
||||||
|
function()
|
||||||
|
brightness_widget:dec()
|
||||||
|
end,
|
||||||
|
{description = "decrease brightness", group = "hotkeys"}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -515,7 +509,7 @@ clientkeys = gears.table.join(
|
|||||||
{description = "close", group = "client"}
|
{description = "close", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"}, "space",
|
{modkey}, "space",
|
||||||
awful.client.floating.toggle,
|
awful.client.floating.toggle,
|
||||||
{description = "toggle floating", group = "client"}
|
{description = "toggle floating", group = "client"}
|
||||||
),
|
),
|
||||||
@ -525,14 +519,6 @@ clientkeys = gears.table.join(
|
|||||||
c:move_to_screen()
|
c:move_to_screen()
|
||||||
end,
|
end,
|
||||||
{description = "move to screen", group = "client"}
|
{description = "move to screen", group = "client"}
|
||||||
),
|
|
||||||
awful.key(
|
|
||||||
{modkey}, "m",
|
|
||||||
function(c)
|
|
||||||
c.maximized = not c.maximized
|
|
||||||
c:raise()
|
|
||||||
end,
|
|
||||||
{description = "(un)maximize", group = "client"}
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -697,7 +683,7 @@ apps = {
|
|||||||
"redshift",
|
"redshift",
|
||||||
"nm-applet",
|
"nm-applet",
|
||||||
"flameshot",
|
"flameshot",
|
||||||
terminal
|
terminal,
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, app in ipairs(apps) do
|
for _, app in ipairs(apps) do
|
||||||
|
@ -11,7 +11,7 @@ local themes_path = gfs.get_themes_dir()
|
|||||||
|
|
||||||
local theme = {}
|
local theme = {}
|
||||||
|
|
||||||
theme.font = "sans 10"
|
theme.font = "sans 9"
|
||||||
|
|
||||||
theme.bg_normal = "#222222"
|
theme.bg_normal = "#222222"
|
||||||
theme.bg_focus = "#535d6c"
|
theme.bg_focus = "#535d6c"
|
||||||
@ -25,7 +25,7 @@ theme.fg_urgent = "#ffffff"
|
|||||||
theme.fg_minimize = "#ffffff"
|
theme.fg_minimize = "#ffffff"
|
||||||
|
|
||||||
theme.useless_gap = dpi(4)
|
theme.useless_gap = dpi(4)
|
||||||
theme.border_width = dpi(4)
|
theme.border_width = dpi(1)
|
||||||
theme.border_normal = "#000000"
|
theme.border_normal = "#000000"
|
||||||
theme.border_focus = "#d75f5f"
|
theme.border_focus = "#d75f5f"
|
||||||
theme.border_marked = "#91231c"
|
theme.border_marked = "#91231c"
|
||||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,3 +4,6 @@
|
|||||||
[submodule ".config/nvim/pack/plugins/opt/nvim-treesitter"]
|
[submodule ".config/nvim/pack/plugins/opt/nvim-treesitter"]
|
||||||
path = .config/nvim/pack/plugins/opt/nvim-treesitter
|
path = .config/nvim/pack/plugins/opt/nvim-treesitter
|
||||||
url = https://github.com/nvim-treesitter/nvim-treesitter
|
url = https://github.com/nvim-treesitter/nvim-treesitter
|
||||||
|
[submodule ".config/awesome/awesome-wm-widgets"]
|
||||||
|
path = .config/awesome/awesome-wm-widgets
|
||||||
|
url = https://github.com/streetturtle/awesome-wm-widgets.git
|
||||||
|
2
.zshrc
2
.zshrc
@ -103,4 +103,4 @@ alias pls="sudo"
|
|||||||
alias -g G="|grep -i"
|
alias -g G="|grep -i"
|
||||||
alias config="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
|
alias config="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
|
||||||
alias mkdebug="CFLAGS+=-ggdb make re"
|
alias mkdebug="CFLAGS+=-ggdb make re"
|
||||||
alias svim="$EDITOR $HOME/.config/sway"
|
alias wconfig="$EDITOR $HOME/.config/awesome"
|
||||||
|
Loading…
Reference in New Issue
Block a user