From f0a6e67f49e1e5f15e11d50849d29b3e25bc0e2d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 21 Apr 2021 09:30:26 -0500 Subject: [PATCH] A lot of changes to awesome to make it work better for laptop --- awesome/init.fnl | 24 ++++++++++++++++++------ awesome/keybindings.fnl | 9 ++++++++- awesome/rules.fnl | 28 ++++++++++++++++++++++------ bpytop/bpytop.conf | 2 +- rofi/config.rasi | 1 + rofi/launchers-git/laptop.rasi | 2 +- scripts/dmqute | 2 +- 7 files changed, 52 insertions(+), 16 deletions(-) diff --git a/awesome/init.fnl b/awesome/init.fnl index 895dc60..edbb46c 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -71,7 +71,7 @@ (global hostname-handle (io.popen "hostname")) (global hostname (hostname-handle:read "a")) (hostname-handle:close) -(local laptop (= hostname "syl")) +(local laptop true) ;; Table of layouts to cover with awful.layout.inc, order matters. (set awful.layout.layouts [ @@ -341,14 +341,26 @@ :right (dpi 10)}) (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)) (set s.batteryicon (wibox.widget.textbox " ")) (set s.batteryspace (wibox.widget.textbox " ")) - (set s.batterywidget (wibox.widget { + (set s.batterywidget { 1 { 1 { 1 (wibox.widget { 1 s.batteryicon 2 s.batterytext 3 s.batteryspace - :layout wibox.layout.fixed.horizontal})) + 4 s.batteryicon + 5 s.batterytext2 + 6 s.batteryspace + :layout wibox.layout.fixed.horizontal}) + :widget wibox.container.margin + :left (dpi 10)} + :widget wibox.container.background + :shape gears.shape.rounded_bar + :bg beautiful.bg_normal + :fg beautiful.base0C} + :widget wibox.container.margin + :right (dpi 10)}) (set s.cputext (awful.widget.watch "cpu" 5)) (set s.cpuicon (wibox.widget.textbox " ")) @@ -420,10 +432,10 @@ :expand "outside" 1 { ;; Left widgets 1 { - :layout wibox.layout.fixed.horizontal + :layout wibox.layout.align.horizontal 1 s.mytaglist - 2 s.mypromptbox - 3 s.mytasklist ;; Middle widget + 2 s.mytasklist ;; Middle widget + 3 s.myemptywidget } :left (dpi 10) :right (dpi 10) diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index 4d83645..c9b11f4 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -128,7 +128,7 @@ ;; Programs (awful.key [ modkey ] "d" (fn [] (awful.spawn "emacsclient -c -e '(dired-jump)'")) {:description "launch dired in new emacs frame" :group "apps" }) - (awful.key [ modkey ] "x" (fn [] (awful.spawn "org-capture")) + (awful.key [ modkey ] "x" (fn [] (awful.spawn "emacsclient -c -e '(org-capture)'")) {:description "launch scratchpad in new emacs frame" :group "apps" }) (awful.key [ modkey ] "v" (fn [] (awful.spawn "emacsclient -c -e '(org-agenda-list)' '(delete-other-windows)'" {:name "*Org Agenda(a)*"})) @@ -304,6 +304,13 @@ (when tag (awful.tag.viewtoggle tag)))) {:description "toggle tag #4" :group "tag"}) + (awful.key [ modkey ] "0" + (fn [] + (let [screen (awful.screen.focused) + tag (. screen.tags 10)] + (when tag + (awful.tag.viewtoggle tag)))) + {:description "toggle scratchpad" :group "tag"}) ;; Toggle tag on focused client. (awful.key [ modkey ctrl shift ] "1" (fn [] diff --git a/awesome/rules.fnl b/awesome/rules.fnl index f28d192..da71856 100644 --- a/awesome/rules.fnl +++ b/awesome/rules.fnl @@ -16,10 +16,10 @@ :raise true ;; :keys keys ;; :buttons clientbuttons - ;; :screen awful.screen.preferred + :screen awful.screen.preferred :size_hints_honor false - :placement (+ awful.placement.no_overlap awful.placement.no_offscreen) - ;; :shape gears.shape.rounded_rect + :placement awful.placement.no_overlap + :shape gears.shape.rounded_rect } } @@ -71,6 +71,22 @@ :placement (+ awful.placement.no_offscreen awful.placement.centered) } } + ;; Org Capture + { + :rule_any { + :name [ + "org-capture" + ] + } + :properties { + :floating true + :raise true + :screen 1 + :width (dpi 900) + :height (dpi 600) + :placement (+ awful.placement.no_offscreen awful.placement.centered) + } + } ;; Pulsemixer center and smaller { :rule_any { @@ -83,9 +99,9 @@ :raise true :ontop true :screen awful.screen.preferred - ;; :width (dpi 600) - :height (dpi 300) - :placement (+ awful.placement.no_offscreen awful.placement.centered) + :width (dpi 600) + :height (dpi 200) + :placement awful.placement.centered } } ;; Tell qb to open primarily on the secondary monitor diff --git a/bpytop/bpytop.conf b/bpytop/bpytop.conf index a6343ba..674c15a 100644 --- a/bpytop/bpytop.conf +++ b/bpytop/bpytop.conf @@ -22,7 +22,7 @@ proc_update_mult=2 #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive", #* "cpu lazy" updates top process over time, "cpu responsive" updates top process directly. -proc_sorting="memory" +proc_sorting="cpu responsive" #* Reverse sorting order, True or False. proc_reversed=False diff --git a/rofi/config.rasi b/rofi/config.rasi index c911358..e229c60 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -9,5 +9,6 @@ configuration { sidebar-mode: true; run-command: "fish -c {cmd}"; run-list-command: "fish -c functions"; + display-keys: true; } @import "/home/chris/.dotfiles/rofi/launchers-git/laptop.rasi" diff --git a/rofi/launchers-git/laptop.rasi b/rofi/launchers-git/laptop.rasi index 7a3e8f8..061ca4b 100644 --- a/rofi/launchers-git/laptop.rasi +++ b/rofi/launchers-git/laptop.rasi @@ -10,6 +10,6 @@ configuration { - font: "VictorMono Nerd Font 12.0"; + font: "VictorMono Nerd Font 30.0"; } @import "/home/chris/.dotfiles/rofi/launchers-git/blurry.rasi" diff --git a/scripts/dmqute b/scripts/dmqute index 432a888..47117f3 100755 --- a/scripts/dmqute +++ b/scripts/dmqute @@ -7,7 +7,7 @@ # License: https://www.gitlab.com/dwt1/dmscripts/LICENSE # Contributors: Derek Taylor -if [ $(hostname) = "chris-linuxlaptop" ]; then +if [ $(hostname) = "syl" ]; then style="laptop" #echo "this is hidpi" else