I HAVE NO IDEA!
This commit is contained in:
parent
9a725dcc03
commit
5729629ba7
15 changed files with 298 additions and 206 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 0fb85341916b6de1c5cd6ddf3e8472292a93a303
|
||||
Subproject commit 048cf41e0aa5a391948d62e6168d6e54279cf627
|
409
awesome/init.fnl
409
awesome/init.fnl
|
@ -52,7 +52,7 @@
|
|||
(local bling (require "bling"))
|
||||
;; (local awestore (require "awestore"))
|
||||
|
||||
(set naughty.config.defaults.position "bottom_middle")
|
||||
(set naughty.config.defaults.position "top_middle")
|
||||
(set naughty.config.defaults.margin 10)
|
||||
(set naughty.config.defaults.border_width 0)
|
||||
(set naughty.config.defaults.hover_timeout 5)
|
||||
|
@ -87,7 +87,7 @@
|
|||
(if (= "syl\n" stdout)
|
||||
(global laptop true)
|
||||
(global laptop false))))
|
||||
(local laptop true)
|
||||
(local laptop false)
|
||||
|
||||
;; Table of layouts to cover with awful.layout.inc, order matters.
|
||||
(set awful.layout.layouts [
|
||||
|
@ -268,67 +268,67 @@
|
|||
:id "background_role"
|
||||
:widget wibox.container.background
|
||||
}
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 10)
|
||||
:right (dpi 1)
|
||||
:top (dpi 5)
|
||||
:bottom (dpi 5)
|
||||
}
|
||||
}))
|
||||
|
||||
(set s.myminimizedtasklist (awful.widget.tasklist {
|
||||
:screen s
|
||||
:filter awful.widget.tasklist.filter.minimizedcurrenttags
|
||||
:buttons tasklist_buttons
|
||||
:style {
|
||||
:border_width 0
|
||||
:shape gears.shape.rounded_bar
|
||||
}
|
||||
:layout {
|
||||
:spacing (dpi 20)
|
||||
:spacing_widget {
|
||||
1 {
|
||||
:forced_width (dpi 5)
|
||||
:forced_height (dpi 20)
|
||||
:widget wibox.widget.separator
|
||||
}
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
:widget wibox.container.place
|
||||
}
|
||||
:layout wibox.layout.flex.horizontal
|
||||
}
|
||||
:widget_template {
|
||||
1 {
|
||||
1 {
|
||||
1 {
|
||||
1 {
|
||||
:id "icon_role"
|
||||
:widget wibox.widget.imagebox
|
||||
}
|
||||
:margins 2
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
2 {
|
||||
:id "text_role"
|
||||
:widget wibox.widget.textbox
|
||||
}
|
||||
:layout wibox.layout.align.horizontal
|
||||
}
|
||||
:left (dpi 10)
|
||||
:right (dpi 10)
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 10)
|
||||
:right (dpi 1)
|
||||
:top (dpi 5)
|
||||
:bottom (dpi 5)
|
||||
}
|
||||
:id "background_role"
|
||||
:widget wibox.container.background
|
||||
}
|
||||
}))
|
||||
}))
|
||||
|
||||
(set s.myminimizedtasklist (awful.widget.tasklist {
|
||||
:screen s
|
||||
:filter awful.widget.tasklist.filter.minimizedcurrenttags
|
||||
:buttons tasklist_buttons
|
||||
:style {
|
||||
:border_width 0
|
||||
:shape gears.shape.rounded_bar
|
||||
}
|
||||
:layout {
|
||||
:spacing (dpi 20)
|
||||
:spacing_widget {
|
||||
1 {
|
||||
:forced_width (dpi 5)
|
||||
:forced_height (dpi 20)
|
||||
:widget wibox.widget.separator
|
||||
}
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
:widget wibox.container.place
|
||||
}
|
||||
:layout wibox.layout.flex.horizontal
|
||||
}
|
||||
:widget_template {
|
||||
1 {
|
||||
1 {
|
||||
1 {
|
||||
1 {
|
||||
:id "icon_role"
|
||||
:widget wibox.widget.imagebox
|
||||
}
|
||||
:margins 2
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
2 {
|
||||
:id "text_role"
|
||||
:widget wibox.widget.textbox
|
||||
}
|
||||
:layout wibox.layout.align.horizontal
|
||||
}
|
||||
:left (dpi 10)
|
||||
:right (dpi 10)
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
:id "background_role"
|
||||
:widget wibox.container.background
|
||||
}
|
||||
}))
|
||||
|
||||
(set s.mytextclock { 1 { 1 (wibox.widget {
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
1 {
|
||||
:format "<b> %a %b %d, %l:%M %p </b>"
|
||||
:widget wibox.widget.textclock}})
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
1 {
|
||||
:format "<b> %a %b %d, %l:%M %p </b>"
|
||||
:widget wibox.widget.textclock}})
|
||||
:widget wibox.container.margin
|
||||
:left 10
|
||||
:right 10}
|
||||
|
@ -338,19 +338,25 @@
|
|||
:fg beautiful.base0B})
|
||||
|
||||
(set s.myemptywidget (wibox.widget { ;; an empty widget for spacing things out
|
||||
:text ""
|
||||
:align ""
|
||||
:valign ""
|
||||
:widget wibox.widget.textbox}))
|
||||
:text ""
|
||||
:align ""
|
||||
:valign ""
|
||||
:widget wibox.widget.textbox}))
|
||||
|
||||
(set s.temptext (awful.widget.watch "cat /sys/class/thermal/thermal_zone3/temp" 10))
|
||||
(set s.tempicon (wibox.widget.textbox " "))
|
||||
(set s.tempspace (wibox.widget.textbox " "))
|
||||
(set s.tempwidget (wibox.widget {
|
||||
1 s.tempicon
|
||||
2 s.temptext
|
||||
3 s.tempspace
|
||||
:layout wibox.layout.fixed.horizontal}))
|
||||
(set s.pingtext (awful.widget.watch "ping.sh" 15))
|
||||
(set s.pingspace (wibox.widget.textbox " "))
|
||||
(set s.pingwidget {1 {1 {1 (wibox.widget {
|
||||
1 s.pingtext
|
||||
2 s.pingspace
|
||||
:layout wibox.layout.fixed.horizontal})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0C}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
|
||||
(set s.volumetext (awful.widget.watch "pamixer --get-volume-human" 0.5))
|
||||
(set s.mictext (awful.widget.watch "pamixer --default-source --get-volume-human" 1))
|
||||
|
@ -359,22 +365,22 @@
|
|||
(set s.volumespace (wibox.widget.textbox " "))
|
||||
|
||||
(set s.volumewidget { 1 { 1 { 1 (wibox.widget {
|
||||
1 s.volumeicon
|
||||
2 s.volumetext
|
||||
3 s.volumespace
|
||||
4 s.micicon
|
||||
5 s.mictext
|
||||
6 s.volumespace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base09}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
1 s.volumeicon
|
||||
2 s.volumetext
|
||||
3 s.volumespace
|
||||
4 s.micicon
|
||||
5 s.mictext
|
||||
6 s.volumespace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base09}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
|
||||
(set s.batterytext (awful.widget.watch "cat /sys/class/power_supply/BAT1/capacity" 30))
|
||||
(set s.batterytext2 (awful.widget.watch "cat /sys/class/power_supply/BAT2/capacity" 30))
|
||||
|
@ -382,147 +388,148 @@
|
|||
(set s.batteryspace (wibox.widget.textbox " "))
|
||||
|
||||
(set s.batterywidget { 1 { 1 { 1 (wibox.widget {
|
||||
1 s.batteryicon
|
||||
2 s.batterytext
|
||||
3 s.batteryspace
|
||||
:layout wibox.layout.fixed.horizontal})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0C}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
1 s.batteryicon
|
||||
2 s.batterytext
|
||||
3 s.batteryspace
|
||||
:layout wibox.layout.fixed.horizontal})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0C}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
|
||||
(set s.cputext (awful.widget.watch "cpu" 5))
|
||||
(set s.cpuicon (wibox.widget.textbox " "))
|
||||
(set s.cpuspace (wibox.widget.textbox " "))
|
||||
|
||||
(set s.cpuwidget { 1 { 1 { 1 (wibox.widget {
|
||||
1 s.cpuicon
|
||||
2 s.cputext
|
||||
3 s.cpuspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
1 s.cpuicon
|
||||
2 s.cputext
|
||||
3 s.cpuspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0A}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
|
||||
(set s.memtext (awful.widget.watch "mem" 2))
|
||||
(set s.memicon (wibox.widget.textbox " "))
|
||||
(set s.memspace (wibox.widget.textbox " "))
|
||||
|
||||
(set s.memwidget { 1 { 1 { 1 (wibox.widget {
|
||||
1 s.memicon
|
||||
2 s.memtext
|
||||
3 s.memspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
1 s.memicon
|
||||
2 s.memtext
|
||||
3 s.memspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0E}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
|
||||
(set s.nettext (awful.widget.watch "netwidget" 10))
|
||||
(set s.neticon (wibox.widget.textbox " "))
|
||||
(set s.netspace (wibox.widget.textbox " "))
|
||||
|
||||
(set s.netwidget { 1 { 1 { 1 (wibox.widget {
|
||||
;; 1 s.neticon
|
||||
2 s.nettext
|
||||
3 s.netspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
;; 1 s.neticon
|
||||
2 s.nettext
|
||||
3 s.netspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base08}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
|
||||
(set s.mailtext (awful.widget.watch "muunread" 360))
|
||||
(set s.mailicon (wibox.widget.textbox " "))
|
||||
(set s.mailspace (wibox.widget.textbox " "))
|
||||
|
||||
(set s.mailwidget { 1 { 1 { 1 (wibox.widget {
|
||||
1 s.mailicon
|
||||
2 s.mailtext
|
||||
3 s.mailspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0D}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
1 s.mailicon
|
||||
2 s.mailtext
|
||||
3 s.mailspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 5)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0D}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 5)})
|
||||
|
||||
(set s.wttrtext (awful.widget.watch "wttr" 1200))
|
||||
(set s.wttrspace (wibox.widget.textbox " "))
|
||||
|
||||
|
||||
(set s.wttrwidget { 1 { 1 { 1 (wibox.widget {
|
||||
1 s.wttrtext
|
||||
2 s.wttrspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
:fg beautiful.base0B
|
||||
})
|
||||
1 s.wttrtext
|
||||
2 s.wttrspace
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
:fg beautiful.base0B
|
||||
})
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 9)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0C}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 10)})
|
||||
|
||||
(set s.mysystray { 1 { 1 { 1 (wibox.widget.systray)
|
||||
:widget wibox.container.margin
|
||||
:left (dpi 9)}
|
||||
:right (dpi 2)
|
||||
:top (dpi 5)
|
||||
:bottom (dpi 5)
|
||||
:left (dpi 2)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:opacity 0.7
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0C}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 10)})
|
||||
|
||||
(set s.mysystray { 1 { 1 { 1 (wibox.widget.systray)
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 2)
|
||||
:top (dpi 5)
|
||||
:bottom (dpi 5)
|
||||
:left (dpi 2)}
|
||||
:widget wibox.container.background
|
||||
:shape gears.shape.rounded_bar
|
||||
:opacity 0.7
|
||||
:bg beautiful.transparent
|
||||
:fg beautiful.base0C}
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 10)})
|
||||
:widget wibox.container.margin
|
||||
:right (dpi 10)})
|
||||
|
||||
(set s.myrightwidgets {
|
||||
1 {
|
||||
:layout wibox.layout.fixed.horizontal
|
||||
1 s.netwidget
|
||||
2 s.mailwidget
|
||||
3 s.memwidget
|
||||
4 s.cpuwidget
|
||||
5 s.volumewidget
|
||||
6 (if laptop s.batterywidget s.myemptywidget)
|
||||
7 (if (= s.index 1) s.mysystray)
|
||||
8 s.mylayoutbox
|
||||
1 s.pingwidget
|
||||
2 s.netwidget
|
||||
3 s.mailwidget
|
||||
4 s.memwidget
|
||||
5 s.cpuwidget
|
||||
6 s.volumewidget
|
||||
7 (if laptop s.batterywidget s.myemptywidget)
|
||||
8 (if (= s.index 1) s.mysystray)
|
||||
9 s.mylayoutbox
|
||||
}
|
||||
:widget wibox.container.margin
|
||||
:top (dpi 1)
|
||||
:bottom (dpi 1)
|
||||
:widget wibox.container.margin
|
||||
:top (dpi 1)
|
||||
:bottom (dpi 1)
|
||||
})
|
||||
|
||||
(local yoffset (dpi 45)) ;; variables to be used for placing the wibox
|
||||
(local xoffset (dpi 26))
|
||||
;; Create the wibox
|
||||
;; Create the wibox
|
||||
(set s.mywibox (wibox {;; since we are using a wibox we have a lot we need to set
|
||||
;; as opposed to what we normally need to do with a wibar
|
||||
:position "bottom"
|
||||
|
@ -541,39 +548,39 @@
|
|||
|
||||
(: s.mywibox :struts { :bottom (dpi 40) })
|
||||
|
||||
;; Add widgets to the wibox
|
||||
(: s.mywibox :setup {
|
||||
:layout wibox.layout.align.horizontal
|
||||
:expand "outside"
|
||||
1 { ;; Left widgets
|
||||
1 {
|
||||
:layout wibox.layout.align.horizontal
|
||||
1 s.mytaglist
|
||||
2 s.mytasklist ;; Middle widget
|
||||
3 s.myemptywidget
|
||||
}
|
||||
:left (dpi 10)
|
||||
:right (dpi 10)
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
2 s.mytextclock :fg beautiful.base0B
|
||||
3 { ;; Right widgets
|
||||
1 {
|
||||
:layout wibox.layout.align.horizontal
|
||||
1 s.myemptywidget
|
||||
2 {
|
||||
1 s.myminimizedtasklist
|
||||
:left (dpi 10)
|
||||
:right (dpi 20)
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
3 s.myrightwidgets
|
||||
}
|
||||
:left (dpi 10)
|
||||
:right (dpi 10)
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
})
|
||||
;; Add widgets to the wibox
|
||||
(: s.mywibox :setup {
|
||||
:layout wibox.layout.align.horizontal
|
||||
:expand "outside"
|
||||
1 { ;; Left widgets
|
||||
1 {
|
||||
:layout wibox.layout.align.horizontal
|
||||
1 s.mytaglist
|
||||
2 s.mytasklist ;; Middle widget
|
||||
3 s.myemptywidget
|
||||
}
|
||||
:left (dpi 10)
|
||||
:right (dpi 10)
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
2 s.mytextclock :fg beautiful.base0B
|
||||
3 { ;; Right widgets
|
||||
1 {
|
||||
:layout wibox.layout.align.horizontal
|
||||
1 s.myemptywidget
|
||||
2 {
|
||||
1 s.myminimizedtasklist
|
||||
:left (dpi 10)
|
||||
:right (dpi 20)
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
3 s.myrightwidgets
|
||||
}
|
||||
:left (dpi 10)
|
||||
:right (dpi 10)
|
||||
:widget wibox.container.margin
|
||||
}
|
||||
})
|
||||
|
||||
(set s.mywibox.visible true) ;; this is needed to ensure the raw wibox is shown. Wibar normally does this
|
||||
))
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
:dont_focus_before_close true
|
||||
;; :awestore {:x anim-x :y anim-y}
|
||||
}))
|
||||
|
||||
(fn get-volume [?callback]
|
||||
(let [cb (or ?callback (fn [] nil))]
|
||||
(awful.spawn.easy_async_with_shell "pamixer --get-volume-human" cb)))
|
||||
|
@ -207,6 +206,14 @@
|
|||
(awful.key [] "XF86Launch8" (fn [] (awful.spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle")
|
||||
(awful.spawn "paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga"))
|
||||
{:description "Mute microphone" :group "audio"})
|
||||
(awful.key [] "F6" (fn [] (awful.spawn "playerctl play-pause"))
|
||||
{:description "Play-pause playback" :group "audio"})
|
||||
(awful.key [] "F5" (fn [] (awful.spawn "playerctl position 10-"))
|
||||
{:description "Previous 10s playback" :group "audio"})
|
||||
(awful.key [] "F7" (fn [] (awful.spawn "playerctl position 10+"))
|
||||
{:description "Previous 10s playback" :group "audio"})
|
||||
(awful.key [] "F8" (fn [] (awful.spawn "getplayerstatus"))
|
||||
{:description "Get status audio" :group "audio"})
|
||||
(awful.key [modkey] "]" (fn [] (awful.spawn "mpvc -x 0.10"))
|
||||
{:description "MPV speed up by .10" :group "audio"})
|
||||
(awful.key [modkey] "[" (fn [] (awful.spawn "mpvc -x -0.10"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue