Merge branch 'master' of gitlab.com:chriscochrun/dotfiles
This commit is contained in:
commit
12cba73398
|
@ -1 +1 @@
|
|||
Subproject commit 0fb85341916b6de1c5cd6ddf3e8472292a93a303
|
||||
Subproject commit 048cf41e0aa5a391948d62e6168d6e54279cf627
|
|
@ -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.
|
||||
|
@ -688,14 +688,15 @@
|
|||
|
||||
(awful.screen.focus 1)
|
||||
|
||||
(awful.spawn "picom --experimental-backend")
|
||||
(awful.spawn "/usr/lib/polkit-kde-authentication-agent-1")
|
||||
(awful.spawn "feh --bg-fill /usr/share/wallpapers/Flow/contents/images/5120x2880.jpg")
|
||||
(awful.spawn "caffeine")
|
||||
(awful.spawn "bluetoothctl power on")
|
||||
(awful.spawn "nextcloud --background")
|
||||
(awful.spawn "rbw-agent")
|
||||
(awful.spawn "jellyfin-mpv-shim")
|
||||
(awful.spawn "xset r rate 220 90")
|
||||
|
||||
(awful.spawn "autorandr -c")
|
||||
(awful.spawn.once "picom --experimental-backend")
|
||||
(awful.spawn.once "/usr/lib/polkit-kde-authentication-agent-1")
|
||||
(awful.spawn.once "feh --bg-fill /usr/share/wallpapers/Flow/contents/images/5120x2880.jpg")
|
||||
(awful.spawn.once "caffeine")
|
||||
(awful.spawn.once "bluetoothctl power on")
|
||||
(awful.spawn.once "nextcloud --background")
|
||||
(awful.spawn.once "rbw-agent")
|
||||
(awful.spawn.once "jellyfin-mpv-shim")
|
||||
(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")
|
||||
|
|
|
@ -176,6 +176,8 @@
|
|||
;; rofi
|
||||
(awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh"))
|
||||
{:description "launch rofi" :group "launcher"})
|
||||
(awful.key [modkey ctrl] "Escape" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh"))
|
||||
{:description "launch rofi" :group "launcher"})
|
||||
(awful.key [modkey] "space" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh"))
|
||||
{:description "launch rofi" :group "launcher"})
|
||||
(awful.key [modkey] "w" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/windows.sh"))
|
||||
|
|
25
eww/eww.yuck
25
eww/eww.yuck
|
@ -1,12 +1,23 @@
|
|||
(defwindow example
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:y "20px"
|
||||
:width "90%"
|
||||
:height "30px"
|
||||
:y "80px"
|
||||
:width "20%"
|
||||
:height "60px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:reserve (struts :distance "40px" :side "top")
|
||||
:windowtype "dock"
|
||||
:wm-ignore false
|
||||
"example content")
|
||||
:windowtype "dialog"
|
||||
:wm-ignore true
|
||||
volslider)
|
||||
|
||||
(deflisten volume
|
||||
:initial "getvol"
|
||||
'tail -F /tmp/vol')
|
||||
|
||||
(defwidget volslider []
|
||||
(box :orientation "horizontal"
|
||||
:halign "center"
|
||||
volume
|
||||
(scale :value volume
|
||||
:min 0
|
||||
:max 100)))
|
||||
|
|
|
@ -4,6 +4,7 @@ description = ""
|
|||
# Directories to index.
|
||||
dirs = [
|
||||
"~/dotfiles",
|
||||
"~/.dotfiles",
|
||||
"~/org",
|
||||
"~/Downloads",
|
||||
"~/Documents",
|
||||
|
@ -14,6 +15,8 @@ dirs = [
|
|||
"~/nextcloud",
|
||||
"~/.dotemacs",
|
||||
"~/.emacs.d",
|
||||
"~/storage/tfc",
|
||||
"~/storage/nextcloud",
|
||||
]
|
||||
|
||||
Dirs = [
|
||||
|
|
|
@ -21,11 +21,13 @@
|
|||
((session-restore-prompt :always-restore)))
|
||||
|
||||
(define-configuration (prompt-buffer)
|
||||
((default-modes (append '(vi-insert-mode
|
||||
) %slot-default%))))
|
||||
((default-modes
|
||||
(append
|
||||
'(vi-insert-mode)
|
||||
%slot-default%))))
|
||||
|
||||
(define-configuration browser
|
||||
((external-editor-program '("/usr/bin/emacsclient"))))
|
||||
((external-editor-program '("/usr/bin/emacsclient"))))
|
||||
|
||||
;; Create a function to launch mpv with given url
|
||||
(defun mpv (url)
|
||||
|
@ -34,32 +36,37 @@
|
|||
|
||||
;; Create a function to download videos with youtube-dl in alacritty
|
||||
(defun youtube-dl (url)
|
||||
"Download videos and audio with youtube-dl in alacritty for feedback"
|
||||
(uiop:run-program (list "alacritty" "-e" "youtube-dl" "-o ~/Videos/%(title)s.%(ext)s" url)))
|
||||
"Download videos and audio with youtube-dl in alacritty for feedback"
|
||||
(uiop:run-program
|
||||
(list "alacritty" "-e" "youtube-dl" "-o ~/Videos/%(title)s.%(ext)s" url)))
|
||||
|
||||
;; Let's create a function to hint videos, convert the url to a sting, and play them in MPV
|
||||
(define-command hint-mpv (&key nyxt/web-mode::annotate-visible-only-p)
|
||||
"Show a set of element hints, and copy the URL of the user inputted one."
|
||||
"Show a set of element hints, and copy the URL of the user inputted one."
|
||||
(nyxt/web-mode:query-hints "Copy element URL"
|
||||
(lambda (nyxt/web-mode::result)
|
||||
;; this converts the url to a string to be used in mpv
|
||||
(let* ((url (format nil "~a"
|
||||
(url (first nyxt/web-mode::result)))))
|
||||
;; here we take that string and pipe it into mpv
|
||||
(mpv url)))
|
||||
;; this converts the url to a string to be used in mpv
|
||||
(let*
|
||||
((url
|
||||
(format nil "~a"
|
||||
(url (first nyxt/web-mode::result)))))
|
||||
;; here we take that string and pipe it into mpv
|
||||
(mpv url)))
|
||||
:annotate-visible-only-p
|
||||
nyxt/web-mode::annotate-visible-only-p))
|
||||
|
||||
;; Let's create a function to hint videos, convert the url to a sting, and download with ytdl
|
||||
(define-command hint-ytdl (&key nyxt/web-mode::annotate-visible-only-p)
|
||||
"Show a set of element hints, and copy the URL of the user inputted one."
|
||||
"Show a set of element hints, and copy the URL of the user inputted one."
|
||||
(nyxt/web-mode:query-hints "Copy element URL"
|
||||
(lambda (nyxt/web-mode::result)
|
||||
;; this converts the url to a string to be used in mpv
|
||||
(let* ((url (format nil "~a"
|
||||
(url (first nyxt/web-mode::result)))))
|
||||
;; here we take that string and pipe it into mpv
|
||||
(youtube-dl url)))
|
||||
;; this converts the url to a string to be used in mpv
|
||||
(let*
|
||||
((url
|
||||
(format nil "~a"
|
||||
(url (first nyxt/web-mode::result)))))
|
||||
;; here we take that string and pipe it into mpv
|
||||
(youtube-dl url)))
|
||||
:annotate-visible-only-p
|
||||
nyxt/web-mode::annotate-visible-only-p))
|
||||
|
||||
|
@ -79,17 +86,20 @@
|
|||
|
||||
(define-mode chris-mode ()
|
||||
"Dummy mode for the custom key bindings in `*chris-keymap*'."
|
||||
((keymap-scheme (keymap:make-scheme
|
||||
scheme:vi-normal *chris-keymap*))
|
||||
((keymap-scheme
|
||||
(keymap:make-scheme
|
||||
scheme:vi-normal *chris-keymap*))
|
||||
(visible-in-status-p nil)))
|
||||
|
||||
(define-configuration buffer
|
||||
((default-modes (append '(vi-normal-mode
|
||||
auto-mode
|
||||
reduce-tracking-mode
|
||||
force-https-mode
|
||||
chris-mode)
|
||||
%slot-default%))))
|
||||
((default-modes
|
||||
(append
|
||||
'(vi-normal-mode
|
||||
auto-mode
|
||||
reduce-tracking-mode
|
||||
force-https-mode
|
||||
chris-mode)
|
||||
%slot-default%))))
|
||||
|
||||
(define-configuration buffer
|
||||
((search-engines
|
||||
|
|
|
@ -13,6 +13,14 @@ configuration {
|
|||
threads: 0;
|
||||
scroll-method: 0;
|
||||
disable-history: false;
|
||||
kb-accept-entry: "Return";
|
||||
kb-remove-to-eol: "Control-D";
|
||||
kb-remove-char-back: "BackSpace";
|
||||
kb-mode-complete: "Control-M";
|
||||
kb-row-down: "Control-j";
|
||||
kb-row-up: "Control-k";
|
||||
kb-row-left: "Control-h";
|
||||
kb-row-right: "Control-l";
|
||||
}
|
||||
|
||||
* {
|
||||
|
|
|
@ -8,4 +8,11 @@ else
|
|||
#echo "this is not hidpi"
|
||||
fi
|
||||
|
||||
rofi -no-lazy-grab -show emoji -modi emoji -theme launchers-git/"$style".rasi
|
||||
rofi -no-lazy-grab -show emoji -modi emoji -theme launchers-git/"$style".rasi $@ &
|
||||
c=0
|
||||
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
|
||||
sleep .1
|
||||
c=$((c+1))
|
||||
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
|
||||
done
|
||||
|
||||
|
|
|
@ -8,4 +8,10 @@ else
|
|||
#echo "this is not hidpi"
|
||||
fi
|
||||
|
||||
rofi -no-lazy-grab -show drun -modi drun -theme launchers-git/"$style".rasi
|
||||
rofi -no-lazy-grab -show drun -modi drun -theme launchers-git/"$style".rasi $@ &
|
||||
c=0
|
||||
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
|
||||
sleep .1
|
||||
c=$((c+1))
|
||||
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
|
||||
done
|
||||
|
|
|
@ -8,4 +8,10 @@ else
|
|||
#echo "this is not hidpi"
|
||||
fi
|
||||
|
||||
rofi -no-lazy-grab -show run -modi run -theme launchers-git/"$style".rasi
|
||||
rofi -no-lazy-grab -show run -modi run -theme launchers-git/"$style".rasi $@ &
|
||||
c=0
|
||||
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
|
||||
sleep .1
|
||||
c=$((c+1))
|
||||
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
|
||||
done
|
||||
|
|
|
@ -7,4 +7,10 @@ else
|
|||
#echo "this is not hidpi"
|
||||
fi
|
||||
|
||||
lolcate | rofi -dmenu -p "File Search:" -i -matching regex -theme ~/.config/rofi/launchers-git/$style-rbw.rasi | xargs -r0 xdg-open
|
||||
lolcate | rofi -dmenu -p "File Search:" -i -matching regex -theme ~/.config/rofi/launchers-git/$style-rbw.rasi | xargs -r0 xdg-open $@ &
|
||||
c=0
|
||||
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
|
||||
sleep .1
|
||||
c=$((c+1))
|
||||
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
|
||||
done
|
||||
|
|
4
scripts/getvol
Executable file
4
scripts/getvol
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo $(pamixer --get-volume-human) >> /tmp/vol
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
exec ydotoold &
|
||||
exec libinput-gestures-setup start service &
|
||||
exec xcape -e 'Super_L=Super_L|Control_L|Escape'
|
||||
|
||||
sleep 2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Check to see if firefox is running
|
||||
if [ $(pgrep -c qutebrowser) -gt 0 ]; then
|
||||
if pgrep -x qutebrowser > /dev/null; then
|
||||
|
||||
if [ $XDG_SESSION_TYPE = "x11" ]; then
|
||||
#X11
|
||||
|
|
7
scripts/rofi-plasma-blur.sh
Executable file
7
scripts/rofi-plasma-blur.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $(ps --no-header -p $PPID -o comm) =~ '^yakuake|dolphin$' ]]; then
|
||||
for wid in $(xdotool search --pid $PPID); do
|
||||
xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $wid;
|
||||
done
|
||||
fi
|
3
scripts/rofi-plasma-settings.sh
Executable file
3
scripts/rofi-plasma-settings.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
systemsettings5 --list | rg - | awk '{print $1}' | rofi -dmenu | xargs -r systemsettings5
|
|
@ -24,7 +24,15 @@ list_passwords() {
|
|||
passwords=$(rbw list)
|
||||
|
||||
prompt='search for passwords...'
|
||||
SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi)
|
||||
SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi $@ &
|
||||
c=0
|
||||
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
|
||||
sleep .1
|
||||
c=$((c+1))
|
||||
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
|
||||
done
|
||||
|
||||
)
|
||||
|
||||
# Ask whether pass, user or both are required
|
||||
|
||||
|
@ -34,7 +42,15 @@ options=("Password" \
|
|||
"QR-Code" \
|
||||
"OTP")
|
||||
|
||||
option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -width 400 -lines 4 -prompt="..." -theme ~/.config/rofi/launchers-git/$style.rasi)
|
||||
option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -width 400 -lines 4 -prompt="..." -theme ~/.config/rofi/launchers-git/$style.rasi $@ &
|
||||
c=0
|
||||
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
|
||||
sleep .1
|
||||
c=$((c+1))
|
||||
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
|
||||
done
|
||||
|
||||
)
|
||||
|
||||
echo $option
|
||||
|
||||
|
|
11
scripts/rofiblur.sh
Normal file
11
scripts/rofiblur.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Wrapper to run rofi with blurred background
|
||||
|
||||
/usr/bin/rofi -theme $HOME/.config/rofi/config.rasi $@ &
|
||||
c=0
|
||||
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
|
||||
sleep .1
|
||||
c=$((c+1))
|
||||
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
|
||||
done
|
Loading…
Reference in a new issue