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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Henrik Tjäder
taggrid
Commits
b86d7a7f
Commit
b86d7a7f
authored
5 years ago
by
Henrik Tjäder
Browse files
Options
Downloads
Patches
Plain Diff
Decide on license and add the rest of keybindings
parent
b6d3aa9e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
taggrid.lua
+4
-3
4 additions, 3 deletions
taggrid.lua
taggridkeys.lua
+41
-10
41 additions, 10 deletions
taggridkeys.lua
with
45 additions
and
13 deletions
taggrid.lua
+
4
−
3
View file @
b86d7a7f
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---- @author AfoHT
---- @author AfoHT
---- @copyright 2020 AfoHT
---- @copyright 2020 AfoHT
---- @license MIT
/Apache
---- @license MIT
---- @module taggrid
---- @module taggrid
------------------------------------------------------------------------------
------------------------------------------------------------------------------
...
@@ -89,13 +89,13 @@ end
...
@@ -89,13 +89,13 @@ end
-- Jump to the row below in the grid
-- Jump to the row below in the grid
function
taggrid
.
viewdown
()
function
taggrid
.
viewdown
()
local
tag_offset
=
taggrid
.
tag_offset
local
tag_offset
=
taggrid
.
tag_offset
awful
.
tag
.
viewidx
(
-
tag_offset
)
awful
.
tag
.
viewidx
(
tag_offset
)
end
end
-- Jump to the row above in the grid
-- Jump to the row above in the grid
function
taggrid
.
viewup
()
function
taggrid
.
viewup
()
local
tag_offset
=
taggrid
.
tag_offset
local
tag_offset
=
taggrid
.
tag_offset
awful
.
tag
.
viewidx
(
tag_offset
)
awful
.
tag
.
viewidx
(
-
tag_offset
)
end
end
-- Shift the currently focused client left
-- Shift the currently focused client left
...
@@ -170,6 +170,7 @@ end
...
@@ -170,6 +170,7 @@ end
-- Shift the focused tag "upwards" in the grid
-- Shift the focused tag "upwards" in the grid
function
taggrid
.
shiftup
()
function
taggrid
.
shiftup
()
if
client
.
focus
then
if
client
.
focus
then
local
tag_offset
=
taggrid
.
tag_offset
local
t
=
awful
.
screen
.
focused
().
selected_tag
local
t
=
awful
.
screen
.
focused
().
selected_tag
local
curidx
=
t
.
index
local
curidx
=
t
.
index
local
tag
local
tag
...
...
This diff is collapsed.
Click to expand it.
taggridkeys.lua
+
41
−
10
View file @
b86d7a7f
--------------------------------------------------------------------------
--
--------------------------------------------------------------------------
---- @author AfoHT
---- @author AfoHT
---- @copyright 2020 AfoHT
---- @copyright 2020 AfoHT
---- @license MIT
/Apache
---- @license MIT
---- @module
global
keys
---- @module
taggrid
keys
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Package envronment
-- Package envronment
...
@@ -22,22 +22,53 @@ function _M.get(globalkeys)
...
@@ -22,22 +22,53 @@ function _M.get(globalkeys)
globalkeys
=
gears
.
table
.
join
(
globalkeys
,
globalkeys
=
gears
.
table
.
join
(
globalkeys
,
-- View tag only.
-- View tag only.
awful
.
key
({
modkey
},
"#"
..
i
+
9
,
awful
.
key
({
modkey
},
"#"
..
i
+
9
,
function
()
function
()
taggrid
.
numviewtag
(
i
)
end
,
taggrid
.
numviewtag
(
i
)
end
,
{
description
=
"view tag #"
..
i
,
group
=
"tag"
}),
{
description
=
"view tag #"
..
i
,
group
=
"tag"
}),
-- Toggle tag display.
-- Toggle tag display.
awful
.
key
({
modkey
,
"Control"
},
"#"
..
i
+
9
,
taggrid
.
numviewtoggle
(
i
),
awful
.
key
({
modkey
,
"Control"
},
"#"
..
i
+
9
,
function
()
taggrid
.
numviewtoggle
(
i
)
end
,
{
description
=
"toggle tag #"
..
i
,
group
=
"tag"
}),
{
description
=
"toggle tag #"
..
i
,
group
=
"tag"
}),
-- Move client to tag.
-- Move client to tag.
awful
.
key
({
modkey
,
"Shift"
},
"#"
..
i
+
9
,
taggrid
.
numshifttag
(
i
),
awful
.
key
({
modkey
,
"Shift"
},
"#"
..
i
+
9
,
function
()
taggrid
.
numshifttag
(
i
)
end
,
{
description
=
"move focused client to tag #"
..
i
,
group
=
"tag"
}),
{
description
=
"move focused client to tag #"
..
i
,
group
=
"tag"
}),
-- Toggle tag on focused client.
-- Toggle tag on focused client.
awful
.
key
({
modkey
,
"Control"
,
"Shift"
},
"#"
..
i
+
9
,
taggrid
.
numtoggletag
(
i
),
awful
.
key
({
modkey
,
"Control"
,
"Shift"
},
"#"
..
i
+
9
,
function
()
taggrid
.
numtoggletag
(
i
)
end
,
{
description
=
"toggle focused client on tag #"
..
i
,
group
=
"tag"
})
{
description
=
"toggle focused client on tag #"
..
i
,
group
=
"tag"
})
)
)
end
end
globalkeys
=
gears
.
table
.
join
(
globalkeys
,
-- Switch tag up or down
-- Move down a column
awful
.
key
({
modkey
,
},
"Down"
,
taggrid
.
viewdown
,
{
description
=
"Jump down one column"
,
group
=
"tag"
}),
-- Move up a column
awful
.
key
({
modkey
,
},
"Up"
,
taggrid
.
viewup
,
{
description
=
"Jump up one column"
,
group
=
"tag"
}),
-- Shift windows to left or right
-- Shift left
awful
.
key
({
modkey
,
"Shift"
},
","
,
taggrid
.
shiftleft
,
{
description
=
"Move tag left"
,
group
=
"tag"
}),
-- Shift right
awful
.
key
({
modkey
,
"Shift"
},
"."
,
taggrid
.
shiftright
,
{
description
=
"Move tag right"
,
group
=
"tag"
}),
-- Shift left
awful
.
key
({
modkey
,
"Shift"
},
"Left"
,
taggrid
.
shiftleft
,
{
description
=
"Move tag left"
,
group
=
"tag"
}),
-- Shift right
awful
.
key
({
modkey
,
"Shift"
},
"Right"
,
taggrid
.
shiftright
,
{
description
=
"Move tag right"
,
group
=
"tag"
}),
-- Shift windows up or down
awful
.
key
({
modkey
,
"Shift"
},
"Down"
,
taggrid
.
shiftdown
,
{
description
=
"Move tag down"
,
group
=
"tag"
}),
awful
.
key
({
modkey
,
"Shift"
},
"Up"
,
taggrid
.
shiftup
,
{
description
=
"Move tag up"
,
group
=
"tag"
})
)
return
globalkeys
return
globalkeys
end
end
...
...
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