From 04c75ce7f5552827af3e6d56f27be71ea39b6863 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 14 Dec 2020 08:41:41 -0600 Subject: [PATCH] Adding progs to keys and tweaking rofi --- .spacemacs.d | 1 - awesome/keybindings.fnl | 13 ++++++++++++- awesome/rules.fnl | 20 ++++++++++++++++++-- qutebrowser/config.py | 1 + rofi/launchers-git/blurry.rasi | 2 +- scripts/fileusage | 4 ++++ tridactyl/tridactylrc | 2 +- 7 files changed, 37 insertions(+), 6 deletions(-) delete mode 160000 .spacemacs.d diff --git a/.spacemacs.d b/.spacemacs.d deleted file mode 160000 index 16949cb..0000000 --- a/.spacemacs.d +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 16949cb09e4f2434ceb4330503143dac87ae3c0c diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index a0a99c3..cb171f2 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -81,7 +81,7 @@ (awful.key [ modkey ] "r" (fn [] (awful.spawn "/home/chris/.dotfiles/rofi/launchers-git/run.sh")) {:description "run prompt" :group "launcher"}) - (awful.key [ modkey ] "x" (fn [] + (awful.key [ modkey shift ctrl ] "x" (fn [] (let [fscr (awful.screen.focused)] (awful.prompt.run { :prompt "Run Lua code: " @@ -105,6 +105,12 @@ ;; 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 "emacsclient -c -e '(+org-capture/open-frame)'")) + {:description "launch scratchpad in new emacs frame" :group "apps" }) + (awful.key [ modkey alt ] "m" (fn [] (awful.spawn "emacsclient -c -e '(org-roam-capture)'")) + {:description "launch scratchpad in new emacs frame" :group "apps" }) + (awful.key [ modkey shift ] "x" (fn [] (awful.spawn "emacsclient -c -e '(doom/switch-to-scratch-buffer)'")) + {:description "launch scratchpad in new emacs frame" :group "apps" }) (awful.key [ modkey ] "i" (fn [] (awful.spawn "emacsclient -c -e '(mu4e)'")) {:description "launch mu4e in new emacs frame" :group "apps" }) (awful.key [ modkey shift ] "Return" (fn [] (awful.spawn "emacsclient -c -e '(+eshell/frame)'")) @@ -119,6 +125,11 @@ (awful.key [modkey] "b" (fn [] (awful.spawn "bwmenu")) {:description "launch rofi bitwarden selector" :group "launcher"}) ;; audio + (awful.key [modkey] "a" (fn [] (awful.spawn "alacritty -e pulsemixer" { + :floating true + :placement awful.placement.centered + })) + {:description "launch pacmixer" :group "audio"}) (awful.key [] "XF86AudioRaiseVolume" (fn [] (awful.spawn.with_shell "pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl play-sample audio-volume-change")) {:description "Increase volume by 5%" :group "audio"}) diff --git a/awesome/rules.fnl b/awesome/rules.fnl index d356aaf..d6f6eab 100644 --- a/awesome/rules.fnl +++ b/awesome/rules.fnl @@ -2,6 +2,7 @@ (local gears (require "gears")) (local beautiful (require "beautiful")) (local keybindings (require "keybindings")) +(local xresources (require "beautiful.xresources")) (local dpi xresources.apply_dpi) (local rules [ @@ -50,8 +51,23 @@ :properties { :floating true :raise true - :height 900 - :width 1500 + :height (dpi 900) + :width (dpi 1500) + :placement (+ awful.placement.no_offscreen awful.placement.centered) + } + } + ;; Pacmixer center and smaller + { + :rule_any { + :name [ + "(pacmixer) ~" + ] + } + :properties { + :floating true + :raise true + :height (dpi 600) + :height (dpi 800) :placement (+ awful.placement.no_offscreen awful.placement.centered) } } diff --git a/qutebrowser/config.py b/qutebrowser/config.py index 59969b3..fd2cdc8 100644 --- a/qutebrowser/config.py +++ b/qutebrowser/config.py @@ -2426,6 +2426,7 @@ config.bind('o', 'set-cmd-text -s :open') ## Bindings for MPV and YTDL config.bind('v', 'hint links spawn --detach mpv --force-window yes {hint-url}') config.bind('gv', 'spawn --detach mpv --force-window yes {url}') +config.bind('gc', 'spawn org-capture {url}') config.bind('gV', 'hint links spawn alacritty -e youtube-dl -o ~/Videos/%(title)s.%(ext)s {hint-url}') ## Bindings for MPV and YTDL diff --git a/rofi/launchers-git/blurry.rasi b/rofi/launchers-git/blurry.rasi index 4fa8859..675c100 100644 --- a/rofi/launchers-git/blurry.rasi +++ b/rofi/launchers-git/blurry.rasi @@ -10,7 +10,7 @@ configuration { display-drun: " "; - drun-display-format: "{name} {description} - {command}"; + drun-display-format: "{name} [({generic})] - {exec}"; threads: 0; scroll-method: 0; disable-history: false; diff --git a/scripts/fileusage b/scripts/fileusage index 69a579e..39b3966 100755 --- a/scripts/fileusage +++ b/scripts/fileusage @@ -1,2 +1,6 @@ #!/usr/bin/sh + +exec 3>&2 +exec 2> /dev/null btrfs fi usage / | rg Free | awk '{print $3}' +exec 2>&3 diff --git a/tridactyl/tridactylrc b/tridactyl/tridactylrc index 60c13a6..350e462 100644 --- a/tridactyl/tridactylrc +++ b/tridactyl/tridactylrc @@ -58,4 +58,4 @@ bind m fillcmdline quickmark bind b fillcmdline taball "" Smoothscroll -set smoothscroll true +set smoothscroll false