Compare commits
10 Commits
3a51bab1c8
...
c02b6ef68d
Author | SHA1 | Date | |
---|---|---|---|
c02b6ef68d | |||
ba2284cb65 | |||
3ee9ce2897 | |||
fdcffa9650 | |||
4ac05d48a6 | |||
3017ac7e16 | |||
0bbff9ba62 | |||
ef457f30af | |||
07e372b31c | |||
dea630bf1e |
@ -19,14 +19,16 @@
|
|||||||
:focus true
|
:focus true
|
||||||
:keys (. keys :client)
|
:keys (. keys :client)
|
||||||
:buttons buttons
|
:buttons buttons
|
||||||
:placement (+ awful.placement.no_overlap
|
:size_hints_honor false ;; fuck you terminals I know what I want
|
||||||
awful.placement.no_offscreen)}}
|
:placement awful.placement.no_offscreen}}
|
||||||
|
|
||||||
{:rule {:floating true}
|
{:rule {:floating true}
|
||||||
:properties {:keys (. keys :floating)}}
|
:properties {:keys (. keys :floating)}}
|
||||||
|
|
||||||
;; Floating clients.
|
;; Floating clients.
|
||||||
{:rule_any {:class ["Gpick"]
|
{:rule_any {:class ["Gpick"
|
||||||
|
"Orage"
|
||||||
|
"Pavucontrol"]
|
||||||
:name ["Event Tester"] ;; xev
|
:name ["Event Tester"] ;; xev
|
||||||
:role ["pop-up"
|
:role ["pop-up"
|
||||||
"xfce4-terminal-dropdown"]}
|
"xfce4-terminal-dropdown"]}
|
||||||
|
@ -8,13 +8,12 @@
|
|||||||
;;;
|
;;;
|
||||||
;; Configuration
|
;; Configuration
|
||||||
|
|
||||||
(local layouts [awful.layout.suit.tile
|
(local layouts [awful.layout.suit.tile])
|
||||||
awful.layout.suit.floating])
|
|
||||||
|
|
||||||
(set awful.layout.layouts layouts)
|
(set awful.layout.layouts layouts)
|
||||||
|
|
||||||
;; TODO Rasterize?
|
;; TODO Rasterize?
|
||||||
(local tags [:firefox.png :code.png :code.svg])
|
(local tags [:firefox.png :code.png :code.png :code.png :code.png :code.png])
|
||||||
|
|
||||||
(let [icon-path (.. (os.getenv "HOME") "/.config/awesome/theme/icons/tag/")]
|
(let [icon-path (.. (os.getenv "HOME") "/.config/awesome/theme/icons/tag/")]
|
||||||
(awful.screen.connect_for_each_screen
|
(awful.screen.connect_for_each_screen
|
||||||
@ -22,7 +21,6 @@
|
|||||||
(each [n tag (ipairs tags)]
|
(each [n tag (ipairs tags)]
|
||||||
(awful.tag.add
|
(awful.tag.add
|
||||||
n {:icon (.. icon-path tag)
|
n {:icon (.. icon-path tag)
|
||||||
:icon_only true
|
|
||||||
:layout (. layouts 1)
|
:layout (. layouts 1)
|
||||||
:gap_single_client false
|
:gap_single_client false
|
||||||
:gap beautiful.useless_gap
|
:gap beautiful.useless_gap
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
(async "tpset \"Natural Scrolling\" 1" (cb "tpset"))
|
(async "tpset \"Natural Scrolling\" 1" (cb "tpset"))
|
||||||
(async "tpset \"Tapping\" 1" (cb "tpset"))
|
(async "tpset \"Tapping\" 1" (cb "tpset"))
|
||||||
(spawn "setxkbmap -option caps:ctrl_modifier")
|
(spawn "setxkbmap -option caps:ctrl_modifier")
|
||||||
|
(spawn "numlockx on")
|
||||||
|
|
||||||
(async (.. "feh --bg-fill " beautiful.wallpaper) (cb "feh"))
|
(async (.. "feh --bg-fill " beautiful.wallpaper) (cb "feh"))
|
||||||
|
|
||||||
|
@ -10,25 +10,9 @@
|
|||||||
(local gears (require :gears))
|
(local gears (require :gears))
|
||||||
(local wibox (require :wibox))
|
(local wibox (require :wibox))
|
||||||
|
|
||||||
(local std (require :lib.std))
|
|
||||||
|
|
||||||
;; TODO Properly abstract these into a library
|
|
||||||
|
|
||||||
(local fun (require :lib.fun))
|
(local fun (require :lib.fun))
|
||||||
(local modifiers
|
(local std (require :lib.std))
|
||||||
{:mod "Mod4"
|
(local button (. (require :lib.keys) :button))
|
||||||
:alt "Mod1"
|
|
||||||
:super "Mod4"
|
|
||||||
:shift "Shift"
|
|
||||||
:ctrl "Control"})
|
|
||||||
|
|
||||||
(fn map-mods [mods]
|
|
||||||
(->> mods
|
|
||||||
(fun.map (partial . modifiers))
|
|
||||||
(fun.totable)))
|
|
||||||
|
|
||||||
(fn button [mods bc fun]
|
|
||||||
(awful.button (map-mods mods) bc fun))
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;; Functions
|
;; Functions
|
||||||
|
@ -4,12 +4,16 @@
|
|||||||
|
|
||||||
(local awful (require :awful))
|
(local awful (require :awful))
|
||||||
(local beautiful (require :beautiful))
|
(local beautiful (require :beautiful))
|
||||||
|
(local gears (require :gears))
|
||||||
|
(local dpi beautiful.xresources.apply_dpi)
|
||||||
(local lain (require :lain))
|
(local lain (require :lain))
|
||||||
(local wibox (require :wibox))
|
(local wibox (require :wibox))
|
||||||
|
|
||||||
(local std (require :lib.std))
|
(local std (require :lib.std))
|
||||||
|
(local button (. (require :lib.keys) :button))
|
||||||
|
|
||||||
(local tag-list (require :widget.tag-list))
|
(local tag-list (require :widget.tag-list))
|
||||||
|
(local tag-number (require :widget.tag-number))
|
||||||
(local task-list (require :widget.task-list))
|
(local task-list (require :widget.task-list))
|
||||||
(local textclock (require :widget.textclock))
|
(local textclock (require :widget.textclock))
|
||||||
|
|
||||||
@ -33,6 +37,14 @@
|
|||||||
:align "center"
|
:align "center"
|
||||||
:widget wibox.container.place})
|
:widget wibox.container.place})
|
||||||
|
|
||||||
|
(fn deftooltip [obj callback]
|
||||||
|
(awful.tooltip
|
||||||
|
{:objects [obj]
|
||||||
|
:timer_function callback
|
||||||
|
:delay_show 0.5
|
||||||
|
:margin_leftright (dpi 10)
|
||||||
|
:margin_topbottom (dpi 8)}))
|
||||||
|
|
||||||
(local clock (textclock "%H\n%M"))
|
(local clock (textclock "%H\n%M"))
|
||||||
(local systray (doto (wibox.widget.systray)
|
(local systray (doto (wibox.widget.systray)
|
||||||
(: :set_base_size 24)
|
(: :set_base_size 24)
|
||||||
@ -41,6 +53,26 @@
|
|||||||
(local battery (require :widget.bat))
|
(local battery (require :widget.bat))
|
||||||
(local pulse (require :widget.pulse))
|
(local pulse (require :widget.pulse))
|
||||||
|
|
||||||
|
(local clock-buttons
|
||||||
|
(gears.table.join
|
||||||
|
(button [] 1 (lambda [] (awful.spawn "orage")))))
|
||||||
|
|
||||||
|
(fn bat-detail []
|
||||||
|
(let [status _G.bat_now.status
|
||||||
|
statustxt (if (= status "Full") "charged"
|
||||||
|
(= status "Charging") "charging"
|
||||||
|
(= status "Discharging") "discharging"
|
||||||
|
"N/A")]
|
||||||
|
(..
|
||||||
|
"Level: " _G.bat_now.perc "%\n"
|
||||||
|
"Status: " statustxt "\n"
|
||||||
|
(if (or (= status "Charging")
|
||||||
|
(= status "Discharging"))
|
||||||
|
(.. "Time left: " _G.bat_now.time " hours") ""))))
|
||||||
|
|
||||||
|
(deftooltip clock (lambda [] (os.date "%A %d %B %Y")))
|
||||||
|
(deftooltip battery.widget bat-detail)
|
||||||
|
|
||||||
(fn draw-sidebar [s]
|
(fn draw-sidebar [s]
|
||||||
(set s.sb (awful.wibar {:position beautiful.sidebar_position
|
(set s.sb (awful.wibar {:position beautiful.sidebar_position
|
||||||
:width beautiful.sidebar_width
|
:width beautiful.sidebar_width
|
||||||
@ -48,20 +80,27 @@
|
|||||||
|
|
||||||
(: s.sb :setup
|
(: s.sb :setup
|
||||||
{:layout wibox.layout.align.vertical
|
{:layout wibox.layout.align.vertical
|
||||||
1 {1 (border (tag-list s))
|
1 {1 (border
|
||||||
|
{1 {1 (tag-number s)
|
||||||
|
:forced_height 32
|
||||||
|
:align :center
|
||||||
|
:widget wibox.container.place}
|
||||||
|
:bg beautiful.sidebar_bg_info
|
||||||
|
:widget wibox.container.background})
|
||||||
|
2 (border (tag-list s))
|
||||||
:layout wibox.layout.fixed.vertical}
|
:layout wibox.layout.fixed.vertical}
|
||||||
2 {1 (border (center (task-list s)) 4)
|
2 {1 (border (center (task-list s)) 4)
|
||||||
:layout wibox.layout.flex.vertical}
|
:layout wibox.layout.flex.vertical}
|
||||||
3 {1 (center systray)
|
3 {1 (center systray)
|
||||||
2 (center battery.widget)
|
2 (center battery.widget)
|
||||||
3 {1 (border
|
3 (border
|
||||||
{1 {1 (center clock)
|
{1 {1 (center clock)
|
||||||
:top 2
|
:top 3
|
||||||
:bottom 2
|
:bottom 3
|
||||||
:widget wibox.container.margin}
|
:widget wibox.container.margin}
|
||||||
:widget wibox.container.background
|
:buttons clock-buttons
|
||||||
:bg beautiful.sidebar_bg_info})
|
:bg beautiful.sidebar_bg_info
|
||||||
:layout wibox.layout.fixed.vertical}
|
:widget wibox.container.background})
|
||||||
:layout wibox.layout.fixed.vertical}}))
|
:layout wibox.layout.fixed.vertical}}))
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
(let [theme-dir (.. (os.getenv "HOME") "/.config/awesome/theme")
|
(let [theme-dir (.. (os.getenv "HOME") "/.config/awesome/theme")
|
||||||
icon-dir (.. theme-dir "/icons/")]
|
icon-dir (.. theme-dir "/icons/")]
|
||||||
{
|
{
|
||||||
:font "Sarasa Mono J"
|
:font "Sarasa UI J 10"
|
||||||
:variable_font "Sarasa UI J"
|
:font_mono "Sarasa Mono J Bold 10"
|
||||||
:textclock_font "Sarasa UI J"
|
|
||||||
|
:wallpaper (.. (os.getenv "HOME") "/pics/wp/sgIcOup.jpg")
|
||||||
|
|
||||||
:sidebar_position :left ;; *
|
:sidebar_position :left ;; *
|
||||||
:sidebar_width 36 ;; *
|
:sidebar_width 36 ;; *
|
||||||
@ -16,7 +17,7 @@
|
|||||||
:fg_focus "#cfcfcf"
|
:fg_focus "#cfcfcf"
|
||||||
:fg_normal "#cfcfcf"
|
:fg_normal "#cfcfcf"
|
||||||
|
|
||||||
:useless_gap 0
|
:useless_gap 2
|
||||||
:border_width 0
|
:border_width 0
|
||||||
:border_focus "#5bb3b4"
|
:border_focus "#5bb3b4"
|
||||||
:border_normal "#1a1e24"
|
:border_normal "#1a1e24"
|
||||||
@ -25,7 +26,7 @@
|
|||||||
|
|
||||||
:titlebar_position :left ;; *
|
:titlebar_position :left ;; *
|
||||||
:titlebar_size 15 ;; *
|
:titlebar_size 15 ;; *
|
||||||
:titlebar_bg_focus "#926b3e"
|
:titlebar_bg_focus "#5bb3b4"
|
||||||
:titlebar_bg_normal "#252b33"
|
:titlebar_bg_normal "#252b33"
|
||||||
:titlebar_fg_focus "#1a1e24"
|
:titlebar_fg_focus "#1a1e24"
|
||||||
:titlebar_fg_normal "#cfcfcf"
|
:titlebar_fg_normal "#cfcfcf"
|
||||||
@ -37,6 +38,6 @@
|
|||||||
|
|
||||||
:taglist_bg_empty (.. "png:" icon-dir "tag-list/unselected.png")
|
:taglist_bg_empty (.. "png:" icon-dir "tag-list/unselected.png")
|
||||||
:taglist_bg_focus (.. "png:" icon-dir "tag-list/selected.png")
|
:taglist_bg_focus (.. "png:" icon-dir "tag-list/selected.png")
|
||||||
:taglist_bg_occupied (.. "png:" icon-dir "tag-list/occupied.png")
|
:taglist_bg_occupied (.. "png:" icon-dir "tag-list/occupied-border.png")
|
||||||
:taglist_bg_urgent (.. "png:" icon-dir "tag-list/urgent.png")
|
:taglist_bg_urgent (.. "png:" icon-dir "tag-list/urgent.png")
|
||||||
})
|
})
|
||||||
|
@ -3,6 +3,36 @@ local dpi = require("beautiful").xresources.apply_dpi
|
|||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
local clickable_container = require("widget.clickable-container")
|
local clickable_container = require("widget.clickable-container")
|
||||||
|
|
||||||
|
local capi = {button = _G.button}
|
||||||
|
|
||||||
|
function create_buttons(buttons, object)
|
||||||
|
if buttons then
|
||||||
|
local btns = {}
|
||||||
|
for _, b in ipairs(buttons) do
|
||||||
|
-- Create a proxy button object: it will receive the real
|
||||||
|
-- press and release events, and will propagate them to the
|
||||||
|
-- button object the user provided, but with the object as
|
||||||
|
-- argument.
|
||||||
|
local btn = capi.button {modifiers = b.modifiers, button = b.button}
|
||||||
|
btn:connect_signal(
|
||||||
|
'press',
|
||||||
|
function()
|
||||||
|
b:emit_signal('press', object)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
btn:connect_signal(
|
||||||
|
'release',
|
||||||
|
function()
|
||||||
|
b:emit_signal('release', object)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
btns[#btns + 1] = btn
|
||||||
|
end
|
||||||
|
|
||||||
|
return btns
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function list_update(w, buttons, label, data, objects)
|
function list_update(w, buttons, label, data, objects)
|
||||||
-- update the widgets, creating them if needed
|
-- update the widgets, creating them if needed
|
||||||
w:reset()
|
w:reset()
|
||||||
@ -35,7 +65,7 @@ function list_update(w, buttons, label, data, objects)
|
|||||||
-- bgb:set_widget(l)
|
-- bgb:set_widget(l)
|
||||||
bgb:set_widget(bg_clickable)
|
bgb:set_widget(bg_clickable)
|
||||||
|
|
||||||
bgb:buttons(common.create_buttons(buttons, o))
|
bgb:buttons(create_buttons(buttons, o))
|
||||||
|
|
||||||
data[o] = {
|
data[o] = {
|
||||||
ib = ib,
|
ib = ib,
|
||||||
|
@ -4,10 +4,12 @@
|
|||||||
|
|
||||||
(local awful (require :awful))
|
(local awful (require :awful))
|
||||||
(local beautiful (require :beautiful))
|
(local beautiful (require :beautiful))
|
||||||
|
(local gears (require :gears))
|
||||||
(local wibox (require :wibox))
|
(local wibox (require :wibox))
|
||||||
(local common (require :awful.widget.common))
|
(local common (require :awful.widget.common))
|
||||||
(local dpi (. (require :beautiful) :xresources :apply_dpi))
|
(local dpi (. (require :beautiful) :xresources :apply_dpi))
|
||||||
|
|
||||||
|
(local button (. (require :lib.keys) :button))
|
||||||
(local std (require :lib.std))
|
(local std (require :lib.std))
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
@ -93,7 +95,11 @@
|
|||||||
(awful.widget.taglist
|
(awful.widget.taglist
|
||||||
s
|
s
|
||||||
awful.widget.taglist.filter.all
|
awful.widget.taglist.filter.all
|
||||||
{}
|
(gears.table.join
|
||||||
|
(button [] 1 (lambda [t] (: t :view_only)))
|
||||||
|
(button [] 3 (lambda [t] (when _G.client.focus (: _G.client.focus :move_to_tag t))))
|
||||||
|
(button [] 4 (lambda [t] (awful.tag.viewnext t.screen)))
|
||||||
|
(button [] 5 (lambda [t] (awful.tag.viewprev t.screen))))
|
||||||
{:font (.. beautiful.font " Bold 10")
|
{:font (.. beautiful.font " Bold 10")
|
||||||
:spacing 2}
|
:spacing 2}
|
||||||
;; update-tag-list
|
;; update-tag-list
|
||||||
|
20
widget/tag-number.fnl
Normal file
20
widget/tag-number.fnl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
(local awful (require :awful))
|
||||||
|
(local beautiful (require :beautiful))
|
||||||
|
(local wibox (require :wibox))
|
||||||
|
|
||||||
|
(fn tag-number [s]
|
||||||
|
(awful.widget.taglist
|
||||||
|
s
|
||||||
|
awful.widget.taglist.filter.selected
|
||||||
|
{}
|
||||||
|
{:taglist_disable_icon true
|
||||||
|
:bg_empty beautiful.bg_normal
|
||||||
|
:bg_focus beautiful.bg_focus
|
||||||
|
:bg_occupied beautiful.bg_normal
|
||||||
|
:bg_urgent beautiful.bg_normal
|
||||||
|
:font beautiful.font_mono}
|
||||||
|
awful.widget.common.list_update
|
||||||
|
;; (require :widget.list_update)
|
||||||
|
(wibox.layout.fixed.vertical)))
|
||||||
|
|
||||||
|
tag-number
|
Loading…
Reference in New Issue
Block a user