Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
taggrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Henrik Tjäder
taggrid
Commits
89cfe6a8
Commit
89cfe6a8
authored
5 years ago
by
Henrik Tjäder
Browse files
Options
Downloads
Patches
Plain Diff
Add installation instructions
parent
b86d7a7f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+122
-1
122 additions, 1 deletion
README.md
with
122 additions
and
1 deletion
README.md
+
122
−
1
View file @
89cfe6a8
#Extension providing a grid layout for Awesomewm 4.3
#Extension providing a grid layout for Awesomewm 4.3
## Installation
Clone this repo, for ease of use in the same folder where
`rc.lua`
is.
Add something like
```
lua
-- Include taggrid, a mxn grid of tags
taggrid
=
require
(
"taggrid.taggrid"
)
taggridkeys
=
require
(
"taggrid.taggridkeys"
)
```
Below the awesome libraries but nearby the top of
`rc.lua`
.
Comment and replace
`awful.tag()`
like this:
```
lua
-- Each screen has its own tag table.
--awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
-- Replace the tag setup with the one provided from taggrid
awful
.
tag
(
taggrid
.
tags
,
s
,
awful
.
layout
.
layouts
[
1
])
```
And provide the
`gridlayout`
for the
`taglist`
:
```
lua
-- Create a taglist widget
-- using the gridlayout from taggrid
s
.
mytaglist
=
awful
.
widget
.
taglist
{
screen
=
s
,
filter
=
awful
.
widget
.
taglist
.
filter
.
all
,
buttons
=
taglist_buttons
,
layout
=
taggrid
.
gridlayout
}
```
## Keybindings
Most of the keybindings will be imported from
`taggridkeys`
but
`viewprev`
and
`viewnext`
will be changed in-place.
Change to the following if wrapping around on the same row is desirable:
```
lua
awful
.
key
({
modkey
,
},
"Left"
,
taggrid
.
viewprev
,
--awful.tag.viewprev
{
description
=
"view previous"
,
group
=
"tag"
}),
awful
.
key
({
modkey
,
},
"Right"
,
taggrid
.
viewnext
,
--awful.tag.viewnext
{
description
=
"view next"
,
group
=
"tag"
}),
```
The last modification is to fully replace the number key bindings:
```
lua
-- Replaced by taggrid
-- @DOC_NUMBER_KEYBINDINGS@
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
--for i = 1, 9 do
--globalkeys = gears.table.join(globalkeys,
---- View tag only.
--awful.key({ modkey }, "#" .. i + 9,
--function ()
--local screen = awful.screen.focused()
--local tag = screen.tags[i]
--if tag then
--tag:view_only()
--end
--end,
--{description = "view tag #"..i, group = "tag"}),
---- Toggle tag display.
--awful.key({ modkey, "Control" }, "#" .. i + 9,
--function ()
--local screen = awful.screen.focused()
--local tag = screen.tags[i]
--if tag then
--awful.tag.viewtoggle(tag)
--end
--end,
--{description = "toggle tag #" .. i, group = "tag"}),
---- Move client to tag.
--awful.key({ modkey, "Shift" }, "#" .. i + 9,
--function ()
--if client.focus then
--local tag = client.focus.screen.tags[i]
--if tag then
--client.focus:move_to_tag(tag)
--end
--end
--end,
--{description = "move focused client to tag #"..i, group = "tag"}),
---- Toggle tag on focused client.
--awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
--function ()
--if client.focus then
--local tag = client.focus.screen.tags[i]
--if tag then
--client.focus:toggle_tag(tag)
--end
--end
--end,
--{description = "toggle focused client on tag #" .. i, group = "tag"})
--)
--end
-- Setup taggridkeys, keybindings for the mxn grid of tags
globalkeys
=
taggridkeys
(
globalkeys
)
```
## Styling/looks
To make the numbers fit the tags modify your theme with:
```
lua
theme
.
taglist_font
=
"Terminus 4"
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment