Adding some new keybindings and bling

This commit is contained in:
Chris Cochrun 2021-02-07 14:43:59 -06:00
parent 221ceb9d78
commit 48e4ba09b5
5 changed files with 33 additions and 11 deletions

1
awesome/bling Submodule

@ -0,0 +1 @@
Subproject commit 2cb0c54ebe6aea8c133da8259fd44b40ae94b9eb

View file

@ -46,6 +46,9 @@
;; Themes define colours, icons, font and wallpapers.
(beautiful.init "/home/chris/.config/awesome/theme.lua")
;; Import the bling modules and layouts
(local bling (require "bling"))
;; This is used later as the default terminal and editor to run.
(var terminal "alacritty")
(var editor (or (os.getenv "EDITOR") "emacsclient"))
@ -75,6 +78,8 @@
;; Table of layouts to cover with awful.layout.inc, order matters.
(set awful.layout.layouts [
awful.layout.suit.tile
bling.layout.centered
bling.layout.mstab
awful.layout.suit.floating
;; awful.layout.suit.tile.left
;; awful.layout.suit.tile.bottom
@ -162,6 +167,7 @@
(awful.button [] 3 (fn [] (awful.layout.inc -1 s)))
(awful.button [] 4 (fn [] (awful.layout.inc 1 s)))
(awful.button [] 5 (fn [] (awful.layout.inc -1 s)))))
;; Create a taglist widget
(set s.mytaglist (awful.widget.taglist {
:screen s

View file

@ -40,6 +40,10 @@
{:description "swap with next client by index" :group "client"})
(awful.key [ modkey shift ] "k" (fn [] (awful.client.swap.byidx -1))
{:description "swap with previous client by index" :group "client"})
(awful.key [ modkey shift ] "h" (fn [] (awful.client.swap.global_bydirection "left"))
{:description "swap with client to the left" :group "client"})
(awful.key [ modkey shift ] "l" (fn [] (awful.client.swap.global_bydirection "right"))
{:description "swap with client to the right" :group "client"})
(awful.key [ modkey ctrl ] "j" (fn [] (awful.screen.focus_relative 1))
{:description "focus the next screen" :group "screen"})
(awful.key [ modkey ctrl ] "k" (fn [] (awful.screen.focus_relative -1))
@ -64,14 +68,22 @@
{:description "increase master width factor" :group "layout"})
(awful.key [ modkey ] "h" (fn [] (awful.tag.incmwfact -0.05))
{:description "decrease master width factor" :group "layout"})
(awful.key [ modkey shift ] "h" (fn [] (awful.tag.incnmaster 1 nil true))
(awful.key [ modkey ctrl ] "h" (fn [] (awful.tag.incnmaster 1 nil true))
{:description "increase the number of master clients" :group "layout"})
(awful.key [ modkey shift ] "l" (fn [] (awful.tag.incnmaster -1 nil true))
(awful.key [ modkey ctrl ] "l" (fn [] (awful.tag.incnmaster -1 nil true))
{:description "decrease the number of master clients" :group "layout"})
(awful.key [ modkey ctrl ] "h" (fn [] (awful.tag.incncol 1 nil true))
{:description "increase the number of columns" :group "layout"})
(awful.key [ modkey ctrl ] "l" (fn [] (awful.tag.incncol -1 nil true))
{:description "decrease the number of columns" :group "layout"})
(awful.key [ modkey alt ] "l" (fn [] (when client.floating (client.relative_move 0 0 10 0)))
{:description "Increase width of floating window" :group "layout"})
(awful.key [ modkey alt ] "h" (fn [] (when client.floating (client.relative_move 0 0 -10 0)))
{:description "Decrease width of floating window" :group "layout"})
(awful.key [ modkey alt ] "j" (fn [] (when client.floating (client.relative_move 0 0 0 10)))
{:description "Increase height of floating window" :group "layout"})
(awful.key [ modkey alt ] "k" (fn [] (when client.floating (client.relative_move 0 0 0 -10)))
{:description "Decrease height of floating window" :group "layout"})
;; (awful.key [ modkey alt ] "h" (fn [] (awful.tag.incncol 1 nil true)) ||#
;; {:description "increase the number of columns" :group "layout"}) ||#
;; (awful.key [ modkey alt ] "l" (fn [] (awful.tag.incncol -1 nil true)) ||#
;; {:description "decrease the number of columns" :group "layout"}) ||#
(awful.key [ modkey ] "space" (fn [] (awful.layout.inc 1))
{:description "select next" :group "layout"})
(awful.key [ modkey shift ] "space" (fn [] (awful.layout.inc -1))
@ -256,28 +268,28 @@
(let [screen (awful.screen.focused)
tag (. screen.tags 1)]
(when tag
(awful.tag.viewtoggle))))
(awful.tag.viewtoggle tag))))
{:description "toggle tag #1" :group "tag"})
(awful.key [ modkey ctrl ] "2"
(fn []
(let [screen (awful.screen.focused)
tag (. screen.tags 2)]
(when tag
(awful.tag.viewtoggle))))
(awful.tag.viewtoggle tag))))
{:description "toggle tag #2" :group "tag"})
(awful.key [ modkey ctrl ] "3"
(fn []
(let [screen (awful.screen.focused)
tag (. screen.tags 3)]
(when tag
(awful.tag.viewtoggle))))
(awful.tag.viewtoggle tag))))
{:description "toggle tag #3" :group "tag"})
(awful.key [ modkey ctrl ] "4"
(fn []
(let [screen (awful.screen.focused)
tag (. screen.tags 4)]
(when tag
(awful.tag.viewtoggle))))
(awful.tag.viewtoggle tag))))
{:description "toggle tag #4" :group "tag"})
;; Toggle tag on focused client.
(awful.key [ modkey ctrl shift ] "1"