Merge branch 'master' of gitlab.com:chriscochrun/dotfiles

This commit is contained in:
Chris Cochrun 2021-09-22 09:59:53 -05:00
commit 6f25e400a9
10 changed files with 188 additions and 132 deletions

View file

@ -32,15 +32,17 @@
;; Handle runtime errors after startup ;; Handle runtime errors after startup
(do (do
(var in_error false) (var in_error false)
(awesome.connect_signal "debug::error" (fn [err] (awesome.connect_signal "debug::error" (fn [err]
;; Make sure we don't go into an endless error loop ;; Make sure we don't go into an endless error loop
(when (not in_error) (when (not in_error)
(set in_error true) (set in_error true)
(naughty.notify {:preset naughty.config.presets.critical (naughty.notify {:preset naughty.config.presets.critical
:title "Oops, an error happened!" :title "Oops, an error happened!"
:text (tostring err)}) :text (tostring err)})
(set in_error false))))) (set in_error false)))))
;; Variable definitions ;; Variable definitions
;; Themes define colours, icons, font and wallpapers. ;; Themes define colours, icons, font and wallpapers.
@ -72,7 +74,7 @@
(if (= "syl\n" stdout) (if (= "syl\n" stdout)
(global laptop true) (global laptop true)
(global laptop false)))) (global laptop false))))
(local laptop true) (local laptop false)
;; Table of layouts to cover with awful.layout.inc, order matters. ;; Table of layouts to cover with awful.layout.inc, order matters.
(set awful.layout.layouts [ (set awful.layout.layouts [
@ -649,7 +651,7 @@
(awful.client.focus.byidx 1) (awful.client.focus.byidx 1)
;; Rounded windows done right ;; Rounded windows done right
(when (not c.fullscreen) (when (and (not c.fullscreen) (not (= c.name "Display Window")))
(set c.shape (fn [cr w h] (set c.shape (fn [cr w h]
(gears.shape.rounded_rect cr w h (dpi 15))))) (gears.shape.rounded_rect cr w h (dpi 15)))))
@ -693,7 +695,7 @@
(awful.spawn "bluetoothctl power on") (awful.spawn "bluetoothctl power on")
(awful.spawn "nextcloud --background") (awful.spawn "nextcloud --background")
(awful.spawn "rbw-agent") (awful.spawn "rbw-agent")
;; (awful.spawn "jellyfin-mpv-shim") (awful.spawn "jellyfin-mpv-shim")
(awful.spawn "xset r rate 220 90") (awful.spawn "xset r rate 220 90")
(awful.spawn "autorandr -c") (awful.spawn "autorandr -c")

View file

@ -2,6 +2,8 @@
(local gears (require "gears")) (local gears (require "gears"))
(local beautiful (require "beautiful")) (local beautiful (require "beautiful"))
(local hotkeys_popup (require "awful.hotkeys_popup")) (local hotkeys_popup (require "awful.hotkeys_popup"))
(local xresources (require "beautiful.xresources"))
(local dpi xresources.apply_dpi)
(local bling (require "bling")) (local bling (require "bling"))
;; (local awestore (require "awestore")) ;; (local awestore (require "awestore"))
@ -16,7 +18,7 @@
;; (local anim-y (awestore.tweened 1100 { :duration 200 :easing awestore.easing.cubic_in_out })) ;; (local anim-y (awestore.tweened 1100 { :duration 200 :easing awestore.easing.cubic_in_out }))
;; (local anim-x (awestore.tweened 1920 { :duration 200 :easing awestore.easing.cubic_in_out })) ;; (local anim-x (awestore.tweened 1920 { :duration 200 :easing awestore.easing.cubic_in_out }))
;; (local xcenter (screen.primary.width))
(local agenda-scratch (bling.module.scratchpad { (local agenda-scratch (bling.module.scratchpad {
:command "emacsclient -e '(chris/org-agenda)'" :command "emacsclient -e '(chris/org-agenda)'"
@ -24,7 +26,7 @@
:sticky true :sticky true
:autoclose true :autoclose true
:floating true :floating true
:geometry {:height 1300 :width 1500 :x 377 :y 73} :geometry {:height (dpi 950) :width (dpi 900) :x (dpi 560) :y (dpi 73)}
:reapply true :reapply true
:dont_focus_before_close true :dont_focus_before_close true
;; :awestore {:x anim-x :y anim-y} ;; :awestore {:x anim-x :y anim-y}
@ -169,7 +171,7 @@
{:description "select pass" :group "apps" }) {:description "select pass" :group "apps" })
(awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer")) (awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer"))
{:description "Open Writer" :group "apps" }) {:description "Open Writer" :group "apps" })
(awful.key [modkey] "b" (fn [] (awful.spawn "qblof")) (awful.key [modkey] "b" (fn [] (awful.spawn "nyxt"))
{:description "launch browser" :group "apps"}) {:description "launch browser" :group "apps"})
;; rofi ;; rofi
(awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) (awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh"))

View file

@ -39,6 +39,7 @@
:raise true :raise true
:height (dpi 800) :height (dpi 800)
:screen (screen.count) :screen (screen.count)
:sticky true
:placement (+ awful.placement.no_offscreen awful.placement.centered) :placement (+ awful.placement.no_offscreen awful.placement.centered)
} }
} }

View file

@ -95,7 +95,7 @@ the close button is positioned to the far right */
margin-right: calc(0px + var(--uc-navigationbar-width)); margin-right: calc(0px + var(--uc-navigationbar-width));
/* Remove empty space above tabs so that tabs are clickable at very top of screen */ /* Remove empty space above tabs so that tabs are clickable at very top of screen */
margin-left: 10px; margin-left: 10px;
margin-top: -30px !important; margin-top: -31px !important;
max-height: 20px !important; max-height: 20px !important;
font-size: 13px !important; font-size: 13px !important;
z-index: 10; z-index: 10;
@ -181,7 +181,7 @@ the close button is positioned to the far right */
/*visibility: visible !important;*/ /*visibility: visible !important;*/
min-height: 32px !important; min-height: 32px !important;
max-height: 32px !important; max-height: 32px !important;
margin-top: 14px !important; margin-top: 10px !important;
margin-bottom: -38px !important; margin-bottom: -38px !important;
transition: all 200ms ease 0s !important; transition: all 200ms ease 0s !important;
z-index: 5 !important; z-index: 5 !important;
@ -191,7 +191,7 @@ the close button is positioned to the far right */
/* make urlbar rounded */ /* make urlbar rounded */
#urlbar{ #urlbar{
margin-top: 35px !important; margin-top: 31px !important;
padding-right: 10px !important; padding-right: 10px !important;
padding-left: 10px !important; padding-left: 10px !important;
} }

View file

@ -4,7 +4,7 @@ set -U fish_user_paths $HOME/.local/bin $HOME/scripts $HOME/.doom-emacs/bin $HOM
set TERM "xterm-256color" set TERM "xterm-256color"
set EDITOR "emacsclient -c -a" set EDITOR "emacsclient -c -a"
set VISUAL "emacsclient -c -a emacs" set VISUAL "emacsclient -c -a emacs"
set QT_QPA_PLATFORMTHEME "qt5ct" # set QT_QPA_PLATFORMTHEME "qt5ct"
set KWIN_DRM_USE_EGL_STREAMS 1 set KWIN_DRM_USE_EGL_STREAMS 1
set -Ux ANDROID_SDK_ROOT /opt/android-sdk set -Ux ANDROID_SDK_ROOT /opt/android-sdk
set -Ux JAVA_HOME /usr/lib/jvm/default set -Ux JAVA_HOME /usr/lib/jvm/default

View file

@ -24,9 +24,12 @@
((default-modes (append '(vi-insert-mode ((default-modes (append '(vi-insert-mode
) %slot-default%)))) ) %slot-default%))))
(define-configuration browser
((external-editor-program '("/usr/bin/emacsclient"))))
;; Create a function to launch mpv with given url ;; Create a function to launch mpv with given url
(defun mpv (url) (defun mpv (url)
"MPV launches with given url using the fast profile." "MPV launches with given url using the fast profile."
(uiop:run-program (list "mpv" "--profile=fast" url))) (uiop:run-program (list "mpv" "--profile=fast" url)))
;; Create a function to download videos with youtube-dl in alacritty ;; Create a function to download videos with youtube-dl in alacritty
@ -91,70 +94,70 @@
(define-configuration buffer (define-configuration buffer
((search-engines ((search-engines
(list (list
(make-instance 'search-engine (make-instance 'search-engine
:shortcut "s" :shortcut "s"
:search-url "https://search.tfcconnection.org/?q=~a" :search-url "https://search.tfcconnection.org/?q=~a"
:fallback-url "https://search.tfcconnection.org"))))) :fallback-url "https://search.tfcconnection.org")))))
(define-configuration status-buffer (define-configuration status-buffer
((style ((style
(str:concat (str:concat
%slot-default% %slot-default%
(cl-css:css (cl-css:css
'((body '((body
:background "#282a36" :background "#282a36"
:color "#e2e4e5" :color "#e2e4e5"
:line-height "1fr") :line-height "1fr")
("#container" ("#container"
:grid-template-columns "2fr 0px 0px") :grid-template-columns "0px 4fr 0px 2fr 0px 0px")
("#controls" ("#controls"
:background-color "#282a36" :background-color "#282a36"
:color "#f3f99d" :color "#f3f99d"
:width "0px" :width "0px"
:padding-left "0px" :padding-left "0px"
:hidden) :hidden)
("#url" ("#url"
:background-color "#282a36" :background-color "#282a36"
:color "#5af78e") :color "#5af78e")
("#modes" ("#modes"
:background-color "#282a36" :background-color "#282a36"
:color "#f3f99d") :color "#f3f99d")
("#tabs" ("#tabs"
:background-color "#282a36" :background-color "#282a36"
:color "#5af78e") :color "#5af78e")
(".tab" (".tab"
:background-color "#282a36" :background-color "#282a36"
:color "#9aedfe") :color "#9aedfe")
(".tab:hover" (".tab:hover"
:background-color "#282a36" :background-color "#282a36"
:color "#f1f1f0") :color "#f1f1f0")
(".button" (".button"
:background-color "#282a36" :background-color "#282a36"
:color "#5af78e") :color "#5af78e")
(".button:hover" (".button:hover"
:background-color "#282a36" :background-color "#282a36"
:color "#f1f1f0") :color "#f1f1f0")
(".arrow" (".arrow"
:width "0px" :width "0px"
:height "0px") :height "0px")
(".arrow-right" (".arrow-right"
:background-color "#282a36" :background-color "#282a36"
:color "#5af78e") :color "#5af78e")
(".arrow-left" (".arrow-left"
:background-color "#282a36" :background-color "#282a36"
:color "#5af78e") :color "#5af78e")
)))))) ))))))
(define-configuration internal-buffer (define-configuration internal-buffer
((style ((style
(str:concat (str:concat
%slot-default% %slot-default%
(cl-css:css (cl-css:css
'((body '((body
:background "#282a36" :background "#282a36"
:color "#e2e4e5") :color "#e2e4e5")
(.button (.button
:color "#e2e4e5"))))))) :color "#e2e4e5")))))))
(define-configuration window (define-configuration window
((message-buffer-style ((message-buffer-style
@ -166,48 +169,67 @@
:color "#e2e4e5"))))))) :color "#e2e4e5")))))))
(define-configuration prompt-buffer (define-configuration prompt-buffer
((style ((style
(str:concat (str:concat
%slot-default% %slot-default%
(cl-css:css (cl-css:css
'((body '((body
:background-color "#282a36" :background-color "#282a36"
:color "#e2e4e5") :color "#e2e4e5")
("#prompt-area" ("#prompt-area"
:background-color "#282a36" :background-color "#282a36"
:color "#57c7ff") :color "#57c7ff")
("#prompt" ("#prompt"
:background-color "#282a36" :background-color "#282a36"
:color "#e2e4e5") :color "#e2e4e5")
("#input" ("#input"
:background-color "#282a36" :background-color "#282a36"
:color "#e2e4e5") :color "#e2e4e5")
("#suggestions" ("#suggestions"
:background-color "#282a36" :background-color "#282a36"
:color "#e2e4e5") :color "#e2e4e5")
(.source (.source
:margin-left "5px") :margin-left "5px")
(.source-name (.source-name
:background-color "#282a36" :background-color "#282a36"
:color "#e2e4e5") :color "#e2e4e5")
(.source-content (.source-content
:background-color "#282a36" :background-color "#282a36"
:color "#e2e4e5") :color "#e2e4e5")
;; (".source-content td" ;; (".source-content td"
;; :background-color "#282a36" ;; :background-color "#282a36"
;; :color "#e2e4e5") ;; :color "#e2e4e5")
(".source-content th" (".source-content th"
:background-color "#43454f" :background-color "#43454f"
:color "#e2e4e5") :color "#e2e4e5")
("#selection" ("#selection"
:background-color "#57c7ff" :background-color "#57c7ff"
:color "#34353e") :color "#34353e")
(.marked (.marked
:background-color "#5af78e" :background-color "#5af78e"
:color "#34353e") :color "#34353e")
(.selected (.selected
:background-color "#57c7ff" :background-color "#57c7ff"
:color "#34353e") :color "#34353e")
(.button (.button
:color "#e2e4e5"))))))) :color "#e2e4e5")))))))
(in-package #:nyxt-user) ; While implicit, this allows SLY to know which package we are in.
(load "~/quicklisp/setup.lisp")
(ql:quickload :slynk)
(define-command-global start-slynk (&optional (slynk-port *swank-port*))
"Start a Slynk server that can be connected to, for instance, in
Emacs via SLY.
Warning: This allows Nyxt to be controlled remotely, that is, to execute
arbitrary code with the privileges of the user running Nyxt. Make sure
you understand the security risks associated with this before running
this command."
(slynk:create-server :port slynk-port :dont-close t)
(echo "Slynk server started at port ~a" slynk-port))
(start-slynk)

View file

@ -1,11 +1,17 @@
(define-command start-slynk (&optional (slynk-port *swank-port*)) (in-package #:nyxt-user) ; While implicit, this allows SLY to know which package we are in.
"Start a Slynk server that can be connected to, for instance, in
(load "~/quicklisp/setup.lisp")
(ql:quickload :slynk)
(define-command-global start-slynk (&optional (slynk-port *swank-port*))
"Start a Slynk server that can be connected to, for instance, in
Emacs via SLY. Emacs via SLY.
Warning: This allows Nyxt to be controlled remotely, that is, to execute Warning: This allows Nyxt to be controlled remotely, that is, to execute
arbitrary code with the privileges of the user running Nyxt. Make sure arbitrary code with the privileges of the user running Nyxt. Make sure
you understand the security risks associated with this before running you understand the security risks associated with this before running
this command." this command."
(slynk:create-server :port slynk-port :dont-close t) (slynk:create-server :port slynk-port :dont-close t)
(echo "Slynk server started at port ~a" slynk-port)) (echo "Slynk server started at port ~a" slynk-port))
(start-slynk)

View file

@ -24,7 +24,7 @@ shadow = true;
shadow-radius = 38; shadow-radius = 38;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) # The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
shadow-opacity = .99; shadow-opacity = 1.0;
# The left offset for shadows, in pixels. (defaults to -15) # The left offset for shadows, in pixels. (defaults to -15)
shadow-offset-x = -20; shadow-offset-x = -20;
@ -68,6 +68,8 @@ shadow-offset-y = -20;
# shadow-exclude = [] # shadow-exclude = []
shadow-exclude = [ shadow-exclude = [
"name = 'Notification'", "name = 'Notification'",
"name = 'Projection Window'",
"name = 'Video'",
"class_g = 'Conky'", "class_g = 'Conky'",
# "class_g = 'firefox'", # "class_g = 'firefox'",
# "class_g = 'Alacritty'", # "class_g = 'Alacritty'",
@ -107,6 +109,8 @@ fade-out-step = 0.08;
# Specify a list of conditions of windows that should not be faded. # Specify a list of conditions of windows that should not be faded.
# don't need this, we disable fading for all normal windows with wintypes: {} # don't need this, we disable fading for all normal windows with wintypes: {}
fade-exclude = [ fade-exclude = [
"name = 'Projection Window'",
"name = 'Video'",
"class_g = 'slop'" # maim "class_g = 'slop'" # maim
] ]
@ -124,7 +128,7 @@ fade-exclude = [
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1 # inactive-opacity = 1
inactive-opacity = 0.75; inactive-opacity = 0.55;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0 # frame-opacity = 1.0
@ -141,14 +145,17 @@ inactive-opacity-override = false;
active-opacity = 0.75; active-opacity = 0.75;
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) # Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0 inactive-dim = 0.4
# Specify a list of conditions of windows that should always be considered focused. # Specify a list of conditions of windows that should always be considered focused.
# focus-exclude = [] # focus-exclude = []
focus-exclude = [ focus-exclude = [
"class_g = 'Cairo-clock'", "class_g = 'Cairo-clock'",
"class_g = 'Bar'", # lemonbar "class_g = 'Bar'", # lemonbar
"class_g = 'slop'" # maim "name = 'Projection Window'",
"class_g = 'slop'", # maim
"name = 'Video'",
"class_g = 'mpv'"
]; ];
# Use fixed inactive dim value, instead of adjusting according to window opacity. # Use fixed inactive dim value, instead of adjusting according to window opacity.
@ -180,6 +187,8 @@ opacity-rule = [
# "100:class_g = 'dolphin'", # "100:class_g = 'dolphin'",
"100:class_g = 'mpv'", "100:class_g = 'mpv'",
"100:class_g = 'libreoffice'", "100:class_g = 'libreoffice'",
"100:name = 'Projection Window'",
"100:name = 'Video'",
"100:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_FULLSCREEN'", "100:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_FULLSCREEN'",
"0:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_HIDDEN'", "0:_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_HIDDEN'",
"0:_NET_WM_STATE@[1]:32a *= '_NET_WM_STATE_HIDDEN'", "0:_NET_WM_STATE@[1]:32a *= '_NET_WM_STATE_HIDDEN'",
@ -252,6 +261,8 @@ blur-background-exclude = [
"_GTK_FRAME_EXTENTS@:c", "_GTK_FRAME_EXTENTS@:c",
"class_g = 'soffice'", "class_g = 'soffice'",
"name = 'Display Window'", "name = 'Display Window'",
"name = 'Video'",
"name = 'Projection Window'",
# "window_type = '_NET_WM_WINDOW_TYPE_NOTIFICATION'" # "window_type = '_NET_WM_WINDOW_TYPE_NOTIFICATION'"
"window_type = 'notification'" "window_type = 'notification'"
]; ];

View file

@ -1,6 +1,6 @@
[FileDialog] [FileDialog]
history=file:///home/chris, file:///home/chris/nextcloud/tfc/Documents, file:///home/chris/Videos, file:///home/chris/Downloads history=file:///home/chris, file:///home/chris/nextcloud/tfc/Documents, file:///home/chris/Downloads, file:///home/chris/Pictures
lastVisited=file:///home/chris/Downloads lastVisited=file:///home/chris/Pictures
qtVersion=5.15.2 qtVersion=5.15.2
shortcuts=file:, file:///home/chris, file:///home/chris/storage/tfc shortcuts=file:, file:///home/chris, file:///home/chris/storage/tfc
sidebarWidth=116 sidebarWidth=116

12
scripts/autorun.sh Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
export QT_QPA_PLATFORMTHEME='qt5ct'
function run {
if ! pgrep -f $1 ;
then
$@&
fi
}
run jellyfin-mpv-shim