chore: migrate to unique git repo
This commit is contained in:
9
conf/apps.fnl
Normal file
9
conf/apps.fnl
Normal file
@@ -0,0 +1,9 @@
|
||||
;;; conf/apps.fnl --- Common program parameters
|
||||
|
||||
;;; Code:
|
||||
|
||||
{:terminal "xfce4-terminal"
|
||||
:dropdown "xfce4-terminal --drop-down"
|
||||
:editor "emacs"
|
||||
:rofi "rofi -show drun"}
|
||||
;;; conf/apps.fnl ends here
|
1
conf/client.fnl
Normal file
1
conf/client.fnl
Normal file
@@ -0,0 +1 @@
|
||||
(require :conf.client.rules)
|
17
conf/client/buttons.fnl
Normal file
17
conf/client/buttons.fnl
Normal file
@@ -0,0 +1,17 @@
|
||||
;;; buttons.fnl --- Client buttons
|
||||
|
||||
;;; Code:
|
||||
|
||||
(var buttons {})
|
||||
|
||||
(local awful (require :awful))
|
||||
(local gears (require :gears))
|
||||
|
||||
(local button (. (require :lib.keys) :button))
|
||||
|
||||
(gears.table.join
|
||||
(button [] 1 (lambda [c] (set client.focus c) (: c :raise)))
|
||||
(button [:mod] 1 awful.mouse.client.move)
|
||||
(button [:mod] 3 awful.mouse.client.resize))
|
||||
|
||||
;;; buttons.fnl ends here
|
45
conf/client/keys.fnl
Normal file
45
conf/client/keys.fnl
Normal file
@@ -0,0 +1,45 @@
|
||||
;;; conf/client/keys.fnl --- Client keys
|
||||
|
||||
;;; Code:
|
||||
|
||||
(var keys {})
|
||||
|
||||
(local awful (require :awful))
|
||||
(local beautiful (require :beautiful))
|
||||
(local gears (require :gears))
|
||||
|
||||
(local key (. (require :lib.keys) :key))
|
||||
|
||||
;;;
|
||||
;; Functions
|
||||
|
||||
(fn register [field ...]
|
||||
(tset keys field (gears.table.join ...)))
|
||||
|
||||
(fn cinv [k]
|
||||
(fn [c]
|
||||
(let [v (. c k)]
|
||||
(tset c k (not v)))))
|
||||
|
||||
;;;
|
||||
;; Configuration
|
||||
|
||||
(register :client
|
||||
(key [:mod] :q (lambda [c] (: c :kill)))
|
||||
(key [:mod] :w (lambda [c] (set c.minimized true)))
|
||||
|
||||
(key [:mod] :t (lambda [c] (awful.titlebar.toggle c beautiful.titlebar_position)))
|
||||
(key [:mod :shift] :t (lambda [c] (awful.titlebar.toggle c :left)))
|
||||
(key [:mod :ctrl] :t (lambda [c] (awful.titlebar.toggle c)))
|
||||
|
||||
(key [:mod] :a (cinv :floating))
|
||||
(key [:mod] :f (cinv :fullscreen))
|
||||
(key [:mod] :m (cinv :maximized)) ;; FIXME behaves weird
|
||||
(key [:mod] :s (cinv :sticky)))
|
||||
|
||||
(register :floating
|
||||
(. keys :client)
|
||||
(key [:alt :shift] :h (lambda [c] (: c :relative_move {:x -100}))))
|
||||
|
||||
keys
|
||||
;;; conf/client/keys.fnl ends here
|
51
conf/client/rules.fnl
Normal file
51
conf/client/rules.fnl
Normal file
@@ -0,0 +1,51 @@
|
||||
;;; conf/client/rules.fnl --- Client placement rules
|
||||
|
||||
;;; Code:
|
||||
|
||||
(local awful (require :awful))
|
||||
(local beautiful (require :beautiful))
|
||||
|
||||
(local keys (require :conf.client.keys))
|
||||
(local buttons (require :conf.client.buttons))
|
||||
|
||||
;;;
|
||||
;; Functions
|
||||
|
||||
(local
|
||||
rules
|
||||
[{:rule {}
|
||||
:properties {:border_width beautiful.border_width
|
||||
:border_color beautiful.border_normal
|
||||
:focus true
|
||||
:keys (. keys :client)
|
||||
:buttons buttons
|
||||
:placement (+ awful.placement.no_overlap
|
||||
awful.placement.no_offscreen)}}
|
||||
|
||||
{:rule {:floating true}
|
||||
:properties {:keys (. keys :floating)}}
|
||||
|
||||
;; Floating clients.
|
||||
{:rule_any {:class ["Gpick"]
|
||||
:name ["Event Tester"] ;; xev
|
||||
:role ["pop-up"
|
||||
"xfce4-terminal-dropdown"]}
|
||||
:properties {:floating true}}
|
||||
|
||||
;; Add titlebars to normal clients and dialogs.
|
||||
{:rule_any {:type ["normal" "dialog"]}
|
||||
:properties {:titlebars_enabled true}}
|
||||
|
||||
;; Awesome reserves space for tint2, but doesn't actually fucking place it.
|
||||
{:rule {:class "Tint2"}
|
||||
:properties {:x 0 :y 0}}
|
||||
|
||||
;; Set Firefox to always map on the tag named "2" on screen 1.
|
||||
;; {:rule {:class "Firefox"}
|
||||
;; :properties {:screen 1 :tag "2"}}
|
||||
])
|
||||
|
||||
(tset awful.rules :rules rules)
|
||||
|
||||
{}
|
||||
;;; conf/client/rules.fnl ends here
|
119
conf/keys.fnl
Normal file
119
conf/keys.fnl
Normal file
@@ -0,0 +1,119 @@
|
||||
;;; conf/keys.fnl --- Global keys
|
||||
|
||||
;;; Code:
|
||||
|
||||
(var keys {})
|
||||
|
||||
(local gears (require :gears))
|
||||
(local awful (require :awful))
|
||||
|
||||
(local apps (require :conf.apps))
|
||||
(local key (. (require :lib.keys) :key))
|
||||
|
||||
;;;
|
||||
;; Functions
|
||||
|
||||
(fn register [...]
|
||||
(set keys (gears.table.join keys ...)))
|
||||
|
||||
;; Spawn lamda
|
||||
(fn run [prog]
|
||||
(fn [] (awful.spawn prog)))
|
||||
|
||||
;; Run silent
|
||||
(fn run! [prog]
|
||||
(fn [] (awful.spawn prog false)))
|
||||
|
||||
(fn playerctl [a]
|
||||
(run! (.. "playerctl " a)))
|
||||
|
||||
(fn mpc [a]
|
||||
(run! (.. "mpc " a)))
|
||||
|
||||
(fn amixer [args]
|
||||
(run! (.. "amixer sset Master " args)))
|
||||
|
||||
(fn light [a v]
|
||||
(let [flag (. {:up "-A" :down "-U"} a)]
|
||||
(run! (.. "light " flag " " (tostring v)))))
|
||||
|
||||
(fn with-tag [i fun]
|
||||
(lambda [] (when client.focus
|
||||
(let [tag (. client.focus.screen.tags i)]
|
||||
(when tag
|
||||
(fun tag))))))
|
||||
|
||||
(fn apply-focus [i attr]
|
||||
(with-tag i (lambda [t] (: client.focus attr t))))
|
||||
|
||||
(fn current-tag []
|
||||
(. (awful.screen.focused) :selected_tag))
|
||||
|
||||
(fn focused-tag-by-index [i]
|
||||
(. (awful.screen.focused) :tags i))
|
||||
|
||||
(fn with-focused-tag [i fun]
|
||||
(lambda [] (let [tag (focused-tag-by-index i)]
|
||||
(when tag
|
||||
(fun tag)))))
|
||||
|
||||
(fn focus [c]
|
||||
(when c
|
||||
(set client.focus c)
|
||||
(: c :raise)))
|
||||
|
||||
;;;
|
||||
;; Configuration
|
||||
|
||||
(register
|
||||
(key [:mod :ctrl :shift] :q awesome.quit)
|
||||
(key [:mod :ctrl] :r awesome.restart)
|
||||
(key [:mod :ctrl] :q (run "oblogout"))
|
||||
|
||||
(key [:mod] :equal (lambda []
|
||||
(doto (current-tag)
|
||||
(tset :master_width_factor 0.5)
|
||||
(tset :master_count 1)
|
||||
(tset :column_count 1))))
|
||||
(key [:mod :ctrl] :l (lambda [] (awful.tag.incmwfact 0.05)))
|
||||
(key [:mod :ctrl] :h (lambda [] (awful.tag.incmwfact -0.05)))
|
||||
(key [:mod] :comma (lambda [] (awful.tag.incnmaster 1 nil true)))
|
||||
(key [:mod] :period (lambda [] (awful.tag.incnmaster -1 nil true)))
|
||||
(key [:mod :ctrl] :period (lambda [] (awful.tag.incncol 1 nil true)))
|
||||
(key [:mod :ctrl] :comma (lambda [] (awful.tag.incncol -1 nil true)))
|
||||
|
||||
(key [:mod] :Return (run apps.terminal))
|
||||
(key [:mod] :d (run apps.dropdown))
|
||||
|
||||
(key [:mod] :space (lambda [] (awful.layout.inc 1)))
|
||||
(key [:mod] :r (run apps.rofi))
|
||||
(key [:mod] :p (run "xfce4-display-settings"))
|
||||
|
||||
(key [:mod] :e (run apps.editor))
|
||||
|
||||
(key [:mod] :BackSpace (lambda [] (focus (awful.client.restore))))
|
||||
|
||||
(key [] :XF86AudioPlay (playerctl :play-pause))
|
||||
(key [] :XF86AudioNext (playerctl :next))
|
||||
(key [] :XF86AudioPrev (playerctl :previous))
|
||||
(key [] :XF86AudioRaiseVolume (amixer "5%+"))
|
||||
(key [] :XF86AudioLowerVolume (amixer "5%-"))
|
||||
(key [] :XF86AudioMute (amixer "toggle"))
|
||||
(key [] :XF86MonBrightnessUp (light :up 5))
|
||||
(key [] :XF86MonBrightnessDown (light :down 5)))
|
||||
|
||||
(each [_key dir (pairs {:h :left :j :down :k :up :l :right})]
|
||||
(register
|
||||
(key [:mod] _key (lambda [] (awful.client.focus.bydirection dir)))
|
||||
(key [:mod :shift] _key (lambda [] (awful.client.swap.bydirection dir)))))
|
||||
|
||||
(for [i 1 9]
|
||||
(let [ksym (.. "#" (+ i 9))]
|
||||
(register
|
||||
(key [:mod] ksym (with-focused-tag i (lambda [t] (: t :view_only))))
|
||||
(key [:mod :ctrl] ksym (with-focused-tag i (lambda [t] (awful.tag.viewtoggle t))))
|
||||
(key [:mod :shift] ksym (apply-focus i :move_to_tag))
|
||||
(key [:mod :ctrl :shift] ksym (apply-focus i :toggle_tag)))))
|
||||
|
||||
keys
|
||||
;;; conf/keys.fnl ends here
|
10
conf/rules.fnl
Normal file
10
conf/rules.fnl
Normal file
@@ -0,0 +1,10 @@
|
||||
;;; rules.fnl --- Rule definitions
|
||||
|
||||
;;; Code:
|
||||
|
||||
(var rules {})
|
||||
|
||||
|
||||
|
||||
rules
|
||||
;;; rules.fnl ends here
|
21
conf/tags.fnl
Normal file
21
conf/tags.fnl
Normal file
@@ -0,0 +1,21 @@
|
||||
;;; conf/tags.fnl --- Tag configuration
|
||||
|
||||
;;; Code:
|
||||
|
||||
(local awful (require :awful))
|
||||
|
||||
;;;
|
||||
;; Configuration
|
||||
|
||||
(local layouts [awful.layout.suit.tile
|
||||
awful.layout.suit.floating])
|
||||
|
||||
(set awful.layout.layouts layouts)
|
||||
|
||||
(awful.screen.connect_for_each_screen
|
||||
(lambda [s]
|
||||
(awful.tag ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
||||
s (. layouts 1))))
|
||||
|
||||
{}
|
||||
;;; conf/tags.fnl ends here
|
35
conf/theme.fnl
Normal file
35
conf/theme.fnl
Normal file
@@ -0,0 +1,35 @@
|
||||
;; Have to use underscores for `beautiful' compat.
|
||||
;; Non-beautiful variables are commented with an asterisk.
|
||||
{
|
||||
:font "Sarasa Mono J"
|
||||
:variable_font "Sarasa UI J"
|
||||
|
||||
:sidebar_position :left ;; *
|
||||
:sidebar_width 36 ;; *
|
||||
:sidebar_bg "#1a1e24" ;; *
|
||||
:sidebar_subbox "#252b33" ;; *
|
||||
|
||||
:bg_focus "#252b33"
|
||||
:bg_normal "#1a1e24"
|
||||
:fg_focus "#cfcfcf"
|
||||
:fg_normal "#cfcfcf"
|
||||
|
||||
:useless_gap 0
|
||||
:border_width 0
|
||||
:border_focus "#5bb3b4"
|
||||
:border_normal "#1a1e24"
|
||||
:use_titlebars_for_borders nil ;; *
|
||||
:titlebar_border_width 1 ;; *
|
||||
|
||||
:titlebar_position :left ;; *
|
||||
:titlebar_size 15 ;; *
|
||||
:titlebar_bg_focus "#926b3e"
|
||||
:titlebar_bg_normal "#252b33"
|
||||
:titlebar_fg_focus "#1a1e24"
|
||||
:titlebar_fg_normal "#cfcfcf"
|
||||
|
||||
:icon_theme "Vertex Maia"
|
||||
:notification_icon_size 48
|
||||
:notification_border_width 0
|
||||
:notification_bg "#252b33"
|
||||
}
|
Reference in New Issue
Block a user