From 6dcb3c6efd8dde3835aaf9c566920a321815e3f1 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 29 Sep 2021 10:31:52 -0500 Subject: [PATCH] making awesome work again --- awesome/init.fnl | 58 ++++++++++++++++++------------------- awesome/keybindings.fnl | 4 +-- awesome/notifications.fnl | 2 +- fish/config.fish | 1 + lolcate/default/config.toml | 5 ++-- lolcate/default/ignores | 1 - picom.conf | 3 +- rofi/config.rasi | 7 +++-- scripts/org-agenda-lof | 9 ++++++ scripts/plasma-startup.sh | 3 +- 10 files changed, 52 insertions(+), 41 deletions(-) create mode 100755 scripts/org-agenda-lof diff --git a/awesome/init.fnl b/awesome/init.fnl index bef3278..b60e0f5 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -8,7 +8,7 @@ (local beautiful (require "beautiful")) (local xresources (require "beautiful.xresources")) ;; Notification library -;; (local naughty (require "naughty")) +(local naughty (require "naughty")) (local menubar (require "menubar")) ;; Enable hotkeys help widget for VIM and other apps ;; when client with a matching name is opened: @@ -20,27 +20,27 @@ ;; my splits (local clientrules (require "rules")) (local keybindings (require "keybindings")) -;; (local notifications (require "notifications")) +(local notifications (require "notifications")) ;; Error handling ;; Check if awesome encountered an error during startup and fall back to ;; another config (This code will only ever execute for the fallback config) -;; (when awesome.startup_errors -;; (naughty.notify {:preset naughty.config.presets.critical -;; :title "Oops, there were errors during startup!" -;; :text awesome.startup_errors})) +(when awesome.startup_errors + (naughty.notify {:preset naughty.config.presets.critical + :title "Oops, there were errors during startup!" + :text awesome.startup_errors})) ;; Handle runtime errors after startup -;; (do -;; (var in_error false) -;; (awesome.connect_signal "debug::error" (fn [err] -;; ;; Make sure we don't go into an endless error loop -;; (when (not in_error) -;; (set in_error true) -;; (naughty.notify {:preset naughty.config.presets.critical -;; :title "Oops, an error happened!" -;; :text (tostring err)}) -;; (set in_error false))))) +(do + (var in_error false) + (awesome.connect_signal "debug::error" (fn [err] + ;; Make sure we don't go into an endless error loop + (when (not in_error) + (set in_error true) + (naughty.notify {:preset naughty.config.presets.critical + :title "Oops, an error happened!" + :text (tostring err)}) + (set in_error false))))) @@ -616,18 +616,18 @@ ;; Rules (ruled.client.append_rules clientrules) -;; (ruled.notification.connect_signal -;; "request::rules" -;; (fn [] -;; (ruled.notification.append_rules notifications -;; ;; { -;; ;; :rule { } -;; ;; :properties { -;; ;; :border-width 0 -;; ;; :border_color "#000000" -;; ;; :opacity 0.9 -;; ;; :shape gears.shape.rounded_rect}} -;; ))) +(ruled.notification.connect_signal + "request::rules" + (fn [] + (ruled.notification.append_rules notifications + ;; { + ;; :rule { } + ;; :properties { + ;; :border-width 0 + ;; :border_color "#000000" + ;; :opacity 0.9 + ;; :shape gears.shape.rounded_rect}} + ))) ;; Signals ;; Signal function to execute when a new client appears. @@ -699,4 +699,4 @@ (awful.spawn.once "xset r rate 220 90") (awful.spawn.once "autorandr -c") (awful.spawn.once "xcape -e 'Super_L=Super_L|Control_L|Escape'") -(awful.spawn.once "latte-dock") +;; (awful.spawn.once "latte-dock") diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index bb45486..b025229 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -46,9 +46,9 @@ :globalkeys (gears.table.join (awful.key [ modkey shift ] "s" hotkeys_popup.show_help { :description "show help" :group "awesome"}) - (awful.key [ modkey ] "Left" awful.tag.viewprev + (awful.key [ modkey alt ] "h" awful.tag.viewprev {:description "view previous" :group "tag"}) - (awful.key [ modkey ] "Right" awful.tag.viewnext + (awful.key [ modkey alt ] "l" awful.tag.viewnext {:description "view next" :group "tag"}) (awful.key [ modkey ] "Escape" awful.tag.history.restore {:description "go back" :group "tag"}) diff --git a/awesome/notifications.fnl b/awesome/notifications.fnl index cea0812..4a0e2d2 100644 --- a/awesome/notifications.fnl +++ b/awesome/notifications.fnl @@ -13,7 +13,7 @@ :propertites { :border-width beautiful.border_width :border_color "#000000" - :opacity 0.9 + :opacity 0.3 :shape gears.shape.rounded_rect :position "bottom_middle" } diff --git a/fish/config.fish b/fish/config.fish index 12c518c..dfca18f 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -210,6 +210,7 @@ alias yeet "paru -Rns" alias ls "exa -l" alias la "exa -la" alias mpf "mpv --profile=fast" +alias suspend "systemctl suspend" ### Start X at login if status is-login diff --git a/lolcate/default/config.toml b/lolcate/default/config.toml index c0ea731..03a5d6f 100644 --- a/lolcate/default/config.toml +++ b/lolcate/default/config.toml @@ -3,8 +3,6 @@ description = "" # Directories to index. dirs = [ - "~/dotfiles", - "~/.dotfiles", "~/org", "~/Downloads", "~/Documents", @@ -17,10 +15,11 @@ dirs = [ "~/.emacs.d", "~/storage/tfc", "~/storage/nextcloud", + "~/.dotfiles", + "~/dotfiles", ] Dirs = [ - "~/storage", "~/Games", ] # Set to "Dirs" or "Files" to skip directories or files. diff --git a/lolcate/default/ignores b/lolcate/default/ignores index c24e448..7a431e3 100644 --- a/lolcate/default/ignores +++ b/lolcate/default/ignores @@ -8,7 +8,6 @@ #dirs Games/ -storage/ .spacemacs.d .steampath go/ diff --git a/picom.conf b/picom.conf index 9d127e5..1dad621 100644 --- a/picom.conf +++ b/picom.conf @@ -9,7 +9,7 @@ rounded-corners-exclude = [ "class_g = 'Thunderbird'", # "_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_FULLSCREEN'", ]; -round-borders = 12; +round-borders = 14; round-borders-exclude = [ #"class_g = 'TelegramDesktop'", ]; @@ -71,6 +71,7 @@ shadow-exclude = [ "name = 'Projection Window'", "name = 'Video'", "class_g = 'Conky'", + "class_g = 'Rofi'", # "class_g = 'firefox'", # "class_g = 'Alacritty'", "class_g ?= 'Notify-osd'", diff --git a/rofi/config.rasi b/rofi/config.rasi index b75cdd5..572f7e9 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -6,7 +6,7 @@ configuration { icon-theme: "Papirus"; terminal: "alacritty"; sidebar-mode: true; - run-command: "bash -c {cmd}"; + run-command: "fish -c {cmd}"; run-list-command: "fish -c functions"; display-drun: " "; drun-display-format: "{name} [({generic})] - {exec}"; @@ -57,7 +57,7 @@ window { transparency: "real"; border-radius: 16px; border: 0px; - width: 60%; + width: 40%; location: center; anchor: center; x-offset: 0; @@ -137,7 +137,7 @@ textbox { listview { background-color: @transparent; - columns: 2; + columns: 1; spacing: 4px; cycle: false; dynamic: true; @@ -157,6 +157,7 @@ element { } element-icon { + background-color: @transparent; size: 30px; border: 0px; padding: 0px 0px 0px; diff --git a/scripts/org-agenda-lof b/scripts/org-agenda-lof new file mode 100755 index 0000000..aa59992 --- /dev/null +++ b/scripts/org-agenda-lof @@ -0,0 +1,9 @@ +#!/bin/sh + +window=$(wmctrl -l | awk '{print $4}' | rg org-agenda) + +if [ -z $window ]; then + wmctrl -a $window +else + emacsclient -e '(chris/org-agenda)' +fi diff --git a/scripts/plasma-startup.sh b/scripts/plasma-startup.sh index d3a79ac..2d8044a 100755 --- a/scripts/plasma-startup.sh +++ b/scripts/plasma-startup.sh @@ -2,7 +2,6 @@ exec ydotoold & exec libinput-gestures-setup start service & -exec xcape -e 'Super_L=Super_L|Control_L|Escape' sleep 2 @@ -11,3 +10,5 @@ killall mako sleep 1 latte-restart + +exec xcape -e 'Super_L=Super_L|Control_L|Escape'