aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/misc
diff options
context:
space:
mode:
Diffstat (limited to '.config/awesome/misc')
-rw-r--r--.config/awesome/misc/autostart.lua4
-rw-r--r--.config/awesome/misc/cfg.lua40
-rw-r--r--.config/awesome/misc/keys.lua19
3 files changed, 50 insertions, 13 deletions
diff --git a/.config/awesome/misc/autostart.lua b/.config/awesome/misc/autostart.lua
index 1747db6..3cd70f9 100644
--- a/.config/awesome/misc/autostart.lua
+++ b/.config/awesome/misc/autostart.lua
@@ -11,9 +11,9 @@ local programs = {
"wezterm start --class code_term",
"firefox",
"discord",
- "env LD_PRELOAD=/usr/lib/spotify-adblock.so spotify"
+ "LD_PRELOAD=/usr/lib/spotify-adblock.so spotify"
}
for _, program in ipairs(programs) do
- awful.spawn(program)
+ awful.spawn.with_shell(program .. " 1>/dev/null 2>&1")
end
diff --git a/.config/awesome/misc/cfg.lua b/.config/awesome/misc/cfg.lua
index 0d9bcba..05534b1 100644
--- a/.config/awesome/misc/cfg.lua
+++ b/.config/awesome/misc/cfg.lua
@@ -1,6 +1,38 @@
-local c = {
- titlebars_enabled = false,
- terminal = "wezterm"
+local awful = require "awful"
+local phosphor = require "assets.phosphor"
+
+local cfg = {
+ terminal = "wezterm",
+ tags = {
+ {
+ layout = awful.layout.suit.floating,
+ selected = true,
+ icon = phosphor.house_fill
+ },
+ {
+ layout = awful.layout.suit.floating,
+ icon = phosphor.browser_fill
+ },
+ {
+ layout = awful.layout.suit.tile.left,
+ master_width_factor = 0.7,
+ icon = phosphor.discord_logo_fill
+ },
+ {
+ layout = awful.layout.suit.tile.top,
+ master_width_factor = 0.2,
+ icon = phosphor.spotify_logo_fill
+ },
+ {
+ layout = awful.layout.suit.tile.right,
+ master_width_factor = 0.7,
+ icon = phosphor.code_fill
+ },
+ {
+ layout = awful.layout.suit.floating,
+ icon = phosphor.game_controller_fill
+ }
+ }
}
-return c
+return cfg
diff --git a/.config/awesome/misc/keys.lua b/.config/awesome/misc/keys.lua
index 432f3eb..646be52 100644
--- a/.config/awesome/misc/keys.lua
+++ b/.config/awesome/misc/keys.lua
@@ -1,12 +1,13 @@
local awful = require "awful"
+local beautiful = require "beautiful"
local cfg = require "misc.cfg"
local fresnel = require "ui.fresnel"
local gtimer = require "gears.timer"
local insightful = require "ui.insightful"
local naughty = require "naughty"
+local playerctl = require "services.playerctl"
local qbind = require "quarrel.bind"
local qvars = require "quarrel.vars"
-local playerctl = require "services.playerctl"
local recording = { false, "" }
@@ -120,7 +121,6 @@ awful.keyboard.append_global_keybindings {
},
qbind:new {
- mods = {},
triggers = "XF86AudioMute",
press = function()
awful.spawn("wpctl set-mute @DEFAULT_SINK@ toggle")
@@ -129,7 +129,6 @@ awful.keyboard.append_global_keybindings {
desc = "mute"
},
qbind:new {
- mods = {},
triggers = {
{ "XF86AudioRaiseVolume", true },
{ "XF86AudioLowerVolume", false }
@@ -145,7 +144,6 @@ awful.keyboard.append_global_keybindings {
desc = "increase/decrease volume"
},
qbind:new {
- mods = {},
triggers = {
{ "XF86AudioNext", true },
{ "XF86AudioPrev", false }
@@ -161,7 +159,6 @@ awful.keyboard.append_global_keybindings {
desc = "previous/next song"
},
qbind:new {
- mods = {},
triggers = "XF86AudioPlay",
press = function()
playerctl:play_pause()
@@ -171,7 +168,6 @@ awful.keyboard.append_global_keybindings {
},
qbind:new {
- mods = {},
triggers = {
{ "XF86MonBrightnessUp", true },
{ "XF86MonBrightnessDown", false }
@@ -198,7 +194,6 @@ awful.keyboard.append_global_keybindings {
},
qbind:new {
- mods = {},
triggers = "Print",
press = function()
local date = os.date("%Y%m%d_%H%M%S")
@@ -283,5 +278,15 @@ awful.keyboard.append_global_keybindings {
press = awful.tag.viewnext,
group = "tag",
desc = "switch to next"
+ },
+ qbind:new {
+ mods = qvars.mods.MC,
+ triggers = "x",
+ press = function()
+ local tag = awful.screen.focused().selected_tag
+ tag.master_width_factor = cfg.tags[tonumber(tag.name)].master_width_factor or beautiful.master_width_factor
+ end,
+ group = "tag",
+ desc = "reset master width"
}
}