Skip to content

Commit

Permalink
huge module cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomashighbaugh committed Dec 28, 2023
1 parent 086613d commit d1aea9d
Show file tree
Hide file tree
Showing 32 changed files with 680 additions and 2,460 deletions.
146 changes: 70 additions & 76 deletions configuration/keybindings/tags.lua
Original file line number Diff line number Diff line change
@@ -1,79 +1,73 @@
-- _______
-- |_ _|.---.-.-----.-----.
-- | | | _ | _ |__ --|
-- |___| |___._|___ |_____|
-- |_____|
-- -------------------------------------------------------------------------- --
--
local tagswitch = Effects.request_effect("tagswitch")

local tagswitch = effects.request_effect("tagswitch")

awful.keyboard.append_global_keybindings({
awful.key({
modifiers = { modkey },
keygroup = "numrow",
description = "only view tag",
group = "Tags",
on_press = function(index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
tag:view_only()
end
if tagswitch then
local t = awful.screen.focused().selected_tag
tagswitch.animate(tostring(t.index))
end
collectgarbage("collect")
end,
}),
-- -------------------------------------------------------------------------- --
--
awful.key({
modifiers = { modkey, "Control" },
keygroup = "numrow",
description = "toggle tag",
group = "Tags",
on_press = function(index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
awful.tag.viewtoggle(tag)
end
collectgarbage("collect")
end,
}),
-- -------------------------------------------------------------------------- --
--
awful.key({
modifiers = { modkey, "Shift" },
keygroup = "numrow",
description = "move focused client to tag",
group = "Tags",
on_press = function(index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:move_to_tag(tag)
end
end
collectgarbage("collect")
end,
}),
-- -------------------------------------------------------------------------- --
--
awful.key({
modifiers = { modkey, "Control", "Shift" },
keygroup = "numrow",
description = "toggle focused client on tag",
group = "Tags",
on_press = function(index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:toggle_tag(tag)
end
collectgarbage("collect")
end
end,
}),
awful.key({
modifiers = { modkey },
keygroup = "numrow",
description = "only view tag",
group = "Tags",
on_press = function(index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
tag:view_only()
end
if tagswitch then
local t = awful.screen.focused().selected_tag
tagswitch.animate(tostring(t.index))
end
collectgarbage("collect")
end,
}),
-- -------------------------------------------------------------------------- --
--
awful.key({
modifiers = { modkey, "Control" },
keygroup = "numrow",
description = "toggle tag",
group = "Tags",
on_press = function(index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
awful.tag.viewtoggle(tag)
end
collectgarbage("collect")
end,
}),
-- -------------------------------------------------------------------------- --
--
awful.key({
modifiers = { modkey, "Shift" },
keygroup = "numrow",
description = "move focused client to tag",
group = "Tags",
on_press = function(index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:move_to_tag(tag)
end
end
collectgarbage("collect")
end,
}),
-- -------------------------------------------------------------------------- --
--
awful.key({
modifiers = { modkey, "Control", "Shift" },
keygroup = "numrow",
description = "toggle focused client on tag",
group = "Tags",
on_press = function(index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:toggle_tag(tag)
end
collectgarbage("collect")
end
end,
}),
})
3 changes: 1 addition & 2 deletions configuration/variables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ modules = require("modules")
icons = require("themes.assets.icons")
scheme = require("themes.scheme")
fade = require("modules.effects.fade")
animation = require("modules.animation")
Effects = require("modules.effects.effects")

effects = require("modules.effects")
-- ┏╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍┓
-- ╏ ╏
Expand Down
7 changes: 4 additions & 3 deletions modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
## Module Directory

| Module | Description |
|------------|---------------------------------------------------------------------|
| ---------- | ------------------------------------------------------------------- |
| Animations | Provide effects to client transitions and other events |
| Battery | Provides current battery state information |
| Dropdown | Enables the scratch buffer aka `quake-like terminal` |
| Filesystem | Access to the filesystem, useful for cache files |
| Icon Theme | Make sure the icons match other applications and use the same theme |
| Layouts | The custom layouts for this config cobbled together from all over |
| Overflow | Enable scrolling in boxes larger than their container |
| Screenshot | Snap screenshots with maim |
| Snap Edge | `Aero-like` window snapping for floating clients |

| SFX | Sound effects renderer, for startup sound |
| Tab Bar | For the MS Tab layout, renders a tab bar for stacked clients |
Loading

0 comments on commit d1aea9d

Please sign in to comment.