dotfiles/awesome/rules.fnl
2021-04-12 20:12:55 -05:00

142 lines
5.4 KiB
Fennel

(local awful (require "awful"))
(local gears (require "gears"))
(local beautiful (require "beautiful"))
(local keybindings (require "keybindings"))
(local xresources (require "beautiful.xresources"))
(local dpi xresources.apply_dpi)
(local rules [
;; All clients match this rule
{
:rule { }
:propertites {
:border_width beautiful.border_width
:border_color beautiful.border_normal
:focus awful.client.focus.filter
:raise true
;; :keys keys
;; :buttons clientbuttons
;; :screen awful.screen.preferred
:size_hints_honor false
:placement (+ awful.placement.no_overlap awful.placement.no_offscreen)
;; :shape gears.shape.rounded_rect
}
}
;; floating and centered videos from mpv or firefox pnp
{
:rule_any {
:class [
"mpv"
]
:name [
"Picture-in-Picture"
]
}
:properties {
:floating true
:raise true
:height (dpi 900)
:screen (screen.count)
:placement (+ awful.placement.no_offscreen awful.placement.centered)
}
}
;; sxiv floating on main screen for quick picture viewing
{
:rule_any {
:class [
"sxiv"
"Sxiv"
]
}
:properties {
:floating true
:raise true
;; :height (dpi 900)
;; :width (dpi 1500)
:placement (+ awful.placement.no_offscreen awful.placement.centered)
}
}
;; Org-Agenda
{
:rule_any {
:name [
"*Org Agenda(a)*"
]
}
:properties {
:floating true
:raise true
:screen 1
:placement (+ awful.placement.no_offscreen awful.placement.centered)
}
}
;; Pulsemixer center and smaller
{
:rule_any {
:instance [
"pulsemixer"
]
}
:properties {
:floating true
:raise true
:ontop true
:screen awful.screen.preferred
;; :width (dpi 600)
:height (dpi 300)
:placement (+ awful.placement.no_offscreen awful.placement.centered)
}
}
;; Tell qb to open primarily on the secondary monitor
;; {
;; :rule_any {
;; :class [
;; "qutebrowser"
;; ]
;; }
;; :properties {
;; :screen (screen.count)
;; }
;; }
;; floating windows
{
:rule_any {
:class [
"dolphin"
"feh"
"Arandr"
]
:name [
"Event Tester"
"remove images?"
]
:role [
"pop-up"
"GtkFileChooserDialog"
]}
:properties {
:floating true
:raise true
:placement (+ awful.placement.no_offscreen awful.placement.centered)
}
}
{
:rule_any {
:class [
"fp64"
]
:instance [
"fp64"
]
}
:properties {
:fullscreen true
:raise true
:placement (+ awful.placement.no_offscreen awful.placement.centered)
}
}
])
rules