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

This commit is contained in:
Chris Cochrun 2021-08-14 10:20:21 -05:00
commit 21ea41028d
14 changed files with 228 additions and 70 deletions

View file

@ -79,7 +79,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 [
@ -239,8 +239,9 @@
:id "icon_role" :id "icon_role"
:widget wibox.widget.imagebox :widget wibox.widget.imagebox
} }
:margins 2 :margins 6
:widget wibox.container.margin :widget wibox.container.margin
:layout wibox.layout.align.horizontal
} }
2 { 2 {
:id "text_role" :id "text_role"
@ -251,6 +252,7 @@
:left (dpi 10) :left (dpi 10)
:right (dpi 10) :right (dpi 10)
:widget wibox.container.margin :widget wibox.container.margin
:layout wibox.layout.align.horizontal
} }
:id "background_role" :id "background_role"
:widget wibox.container.background :widget wibox.container.background
@ -481,7 +483,7 @@
:shape gears.shape.rounded_bar :shape gears.shape.rounded_bar
:bg beautiful.bg_normal :bg beautiful.bg_normal
:fg beautiful.fg_normal :fg beautiful.fg_normal
:opacity 0.85 :opacity 0.95
:screen s })) :screen s }))
(: s.mywibox :struts { :bottom (dpi 45) }) (: s.mywibox :struts { :bottom (dpi 45) })
@ -595,6 +597,12 @@
(awful.client.focus.byidx 1) (awful.client.focus.byidx 1)
(: c :activate []))) (: c :activate [])))
(client.connect_signal "manage"
(fn [c]
;; Rounded windows done right
(when (not c.fullscreen)
(set c.shape (fn [cr w h]
(gears.shape.rounded_rect cr w h (dpi 15)))))))
(client.connect_signal "focus" (fn [c] (set c.border_color beautiful.border_focus))) (client.connect_signal "focus" (fn [c] (set c.border_color beautiful.border_focus)))
(client.connect_signal "unfocus" (fn [c] (set c.border_color beautiful.border_normal))) (client.connect_signal "unfocus" (fn [c] (set c.border_color beautiful.border_normal)))
@ -605,7 +613,7 @@
(awful.spawn "picom --experimental-backend") (awful.spawn "picom --experimental-backend")
(awful.spawn "/usr/lib/polkit-kde-authentication-agent-1") (awful.spawn "/usr/lib/polkit-kde-authentication-agent-1")
(awful.spawn "feh --bg-fill /usr/share/wallpapaers/Flow/contents/images/5120x2880.jpg") (awful.spawn "feh --bg-fill /usr/share/wallpapers/Flow/contents/images/5120x2880.jpg")
(awful.spawn "caffeine") (awful.spawn "caffeine")
(awful.spawn "libinput-gestures-setup start") (awful.spawn "libinput-gestures-setup start")
(awful.spawn "bluetoothctl power on") (awful.spawn "bluetoothctl power on")

View file

@ -128,6 +128,8 @@
;; Programs ;; Programs
(awful.key [ modkey ] "d" (fn [] (awful.spawn "emacsclient -c -e '(dired-jump)'")) (awful.key [ modkey ] "d" (fn [] (awful.spawn "emacsclient -c -e '(dired-jump)'"))
{:description "launch dired in new emacs frame" :group "apps" }) {:description "launch dired in new emacs frame" :group "apps" })
(awful.key [ modkey alt ] "d" (fn [] (awful.spawn "dolphin"))
{:description "dolphin" :group "apps" })
(awful.key [ modkey shift ] "d" (fn [] (awful.spawn "dolphin")) (awful.key [ modkey shift ] "d" (fn [] (awful.spawn "dolphin"))
{:description "launch dolphin file browser" :group "apps" }) {:description "launch dolphin file browser" :group "apps" })
(awful.key [ modkey ] "x" (fn [] (awful.spawn "emacsclient -c -e '(org-capture)'")) (awful.key [ modkey ] "x" (fn [] (awful.spawn "emacsclient -c -e '(org-capture)'"))

View file

@ -19,7 +19,8 @@
:screen awful.screen.preferred :screen awful.screen.preferred
:size_hints_honor false :size_hints_honor false
:placement awful.placement.no_overlap :placement awful.placement.no_overlap
:shape gears.shape.rounded_rect :shape_clip gears.shape.rounded_rect
:shape_bounding gears.shape.rounded_rect
} }
} }
@ -41,6 +42,35 @@
:placement (+ awful.placement.no_offscreen awful.placement.centered) :placement (+ awful.placement.no_offscreen awful.placement.centered)
} }
} }
;; Davinci Resolve is fullscreen
{
:rule_any {
:instance [
"resolve"
]
:class [
"resolve"
]
}
:properties {
:floating true
:fullscreen true
}
}
{
:rule_any {
:name [
"Secondary Screen"
]
}
:properties {
:screen 2
:floating true
:fullscreen true
:size_hints_honor false
}
}
;; sxiv floating on main screen for quick picture viewing ;; sxiv floating on main screen for quick picture viewing
{ {
:rule_any { :rule_any {

View file

@ -93,7 +93,9 @@ theme.tasklist_bg = theme.red
-- notification_font -- notification_font
-- notification_[bg|fg] -- notification_[bg|fg]
-- notification_[width|height|margin] -- notification_[width|height|margin]
theme.notification_margin = 4 theme.notification_margin = dpi(10)
theme.notification_border_width = dpi(0)
theme.notification_shape = gears.shape.rounded_rect
-- notification_[border_color|border_width|shape|opacity] -- notification_[border_color|border_width|shape|opacity]
-- Variables set for theming the menu: -- Variables set for theming the menu:

View file

@ -1,9 +1,5 @@
/* Color controls for theme_***.css files */ /* Color controls for theme_***.css files */
:root { /*:root {
/* All the CSS variables here are global */
/* These applies to all colorschemes */
/* If windows - `-moz-win-glass`, if macOS - `-moz-mac-vibrancy-dark` */
--bf-moz-appearance: -moz-win-glass !important; --bf-moz-appearance: -moz-win-glass !important;
@ -32,54 +28,54 @@
--bf-tab-border-radius: 6px; --bf-tab-border-radius: 6px;
--bf-tab-soundplaying-bg: #ff6ac1CC; --bf-tab-soundplaying-bg: #ff6ac1CC;
/*--toolbar-bgcolor: transparent !important; --toolbar-bgcolor: transparent !important;
--urlbar-separator-color: transparent !important;*/ --urlbar-separator-color: transparent !important;
} }
/* Light Mode */ /* /\* Light Mode *\/ */
:root:-moz-lwtheme-darktext { /* :root:-moz-lwtheme-darktext { */
--bf-main-window: transparent; /* --bf-main-window: transparent; */
--bf-bg: #F2F2F266; /* --bf-bg: #F2F2F266; */
--bf-color: #0A0A0A; /* --bf-color: #0A0A0A; */
--bf-hover-bg: #1A1A1A33; /* --bf-hover-bg: #1A1A1A33; */
--bf-active-bg: #1A1A1A66; /* --bf-active-bg: #1A1A1A66; */
--bf-icon-color: #0A0A0A; /* --bf-icon-color: #0A0A0A; */
--bf-tab-toolbar-bg: #F2F2F2AA; /* --bf-tab-toolbar-bg: #F2F2F2AA; */
--bf-tab-selected-bg: #00000022; /* --bf-tab-selected-bg: #00000022; */
--bf-navbar-bg: var(--bf-bg); /* --bf-navbar-bg: var(--bf-bg); */
--bf-urlbar-bg: var(--bf-bg); /* --bf-urlbar-bg: var(--bf-bg); */
--bf-urlbar-active-bg: var(--bf-bg); /* --bf-urlbar-active-bg: var(--bf-bg); */
--bf-urlbar-focused-color: var(--bf-color); /* --bf-urlbar-focused-color: var(--bf-color); */
--bf-sidebar-bg: var(--bf-bg); /* --bf-sidebar-bg: var(--bf-bg); */
--bf-sidebar-color: var(--bf-color); /* --bf-sidebar-color: var(--bf-color); */
--bf-menupopup-bg: #F2F2F2AA; /* --bf-menupopup-bg: #F2F2F2AA; */
--bf-menupopup-color: var(--bf-color); /* --bf-menupopup-color: var(--bf-color); */
} /* } */
/* Dark Mode */ /* /\* Dark Mode *\/ */
:root:-moz-lwtheme-brighttext { /* :root:-moz-lwtheme-brighttext { */
--bf-main-window: transparent; /* --bf-main-window: transparent; */
--bf-bg: #282a3666; /* --bf-bg: #282a3666; */
--bf-color: #e2e4e5; /* --bf-color: #e2e4e5; */
--bf-hover-bg: #34353e33; /* --bf-hover-bg: #34353e33; */
--bf-active-bg: #eff0eb66; /* --bf-active-bg: #eff0eb66; */
--bf-icon-color: #eff0eb; /* --bf-icon-color: #eff0eb; */
--bf-tab-toolbar-bg: #282a36AA; /* --bf-tab-toolbar-bg: #282a36AA; */
--bf-tab-selected-bg: #e2e4e510; /* --bf-tab-selected-bg: #e2e4e510; */
--bf-navbar-bg: var(--bf-bg); /* --bf-navbar-bg: var(--bf-bg); */
--bf-urlbar-bg: var(--bf-bg); /* --bf-urlbar-bg: var(--bf-bg); */
--bf-urlbar-active-bg: var(--bf-bg); /* --bf-urlbar-active-bg: var(--bf-bg); */
--bf-urlbar-focused-color: var(--bf-color); /* --bf-urlbar-focused-color: var(--bf-color); */
--bf-sidebar-bg: var(--bf-bg); /* --bf-sidebar-bg: var(--bf-bg); */
--bf-sidebar-color: var(--bf-color); /* --bf-sidebar-color: var(--bf-color); */
--bf-menupopup-bg: #282a36AA; /* --bf-menupopup-bg: #282a36AA; */
--bf-menupopup-color: var(--bf-color); /* --bf-menupopup-color: var(--bf-color); */
} /* } */

View file

@ -4,6 +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 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
set -Ux CHROME_EXECUTABLE /usr/bin/qutebrowser set -Ux CHROME_EXECUTABLE /usr/bin/qutebrowser

View file

@ -4,7 +4,7 @@
output (uinput-sink "My KMonad output" output (uinput-sink "My KMonad output"
;; To understand the importance of the following line, see the section on ;; To understand the importance of the following line, see the section on
;; Compose-key sequences at the near-bottom of this file. ;; Compose-key sequences at the near-bottom of this file.
"/run/current-system/sw/bin/sleep 1 && /run/current-system/sw/bin/setxkbmap -option compose:ralt") "/usr/bin/sleep 1 && /usr/bin/setxkbmap -option compose:ralt")
cmp-seq ralt ;; Set the compose key to `RightAlt' cmp-seq ralt ;; Set the compose key to `RightAlt'
;; For Windows ;; For Windows

View file

@ -136,11 +136,11 @@
#+begin_src common-lisp :tangle config.kbd #+begin_src common-lisp :tangle config.kbd
(defcfg (defcfg
;; For Linux ;; For Linux
input (device-file "/dev/input/by-id/usb-Razer_Razer_BlackWidow_Chroma-event-kbd") input (device-file "/dev/input/by-id/usb-Razer_Razer_BlackWidow_Chroma-if01-event-kbd")
output (uinput-sink "My KMonad output" output (uinput-sink "My KMonad output"
;; To understand the importance of the following line, see the section on ;; To understand the importance of the following line, see the section on
;; Compose-key sequences at the near-bottom of this file. ;; Compose-key sequences at the near-bottom of this file.
"/run/current-system/sw/bin/sleep 1 && /run/current-system/sw/bin/setxkbmap -option compose:ralt") "/usr/bin/sleep 1 && /usr/bin/setxkbmap -option compose:ralt")
cmp-seq ralt ;; Set the compose key to `RightAlt' cmp-seq ralt ;; Set the compose key to `RightAlt'
;; For Windows ;; For Windows

View file

@ -28,6 +28,11 @@
"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
(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)))
;; Let's create a function to hint videos, convert the url to a sting, and play them in MPV ;; 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) (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."
@ -41,6 +46,19 @@
:annotate-visible-only-p :annotate-visible-only-p
nyxt/web-mode::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."
(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)))
:annotate-visible-only-p
nyxt/web-mode::annotate-visible-only-p))
;; These are my own keys that are layered over vi-normal. A lot of these ;; These are my own keys that are layered over vi-normal. A lot of these
;; are similar to qutebrowser. ;; are similar to qutebrowser.
(defvar *chris-keymap* (make-keymap "chris-map")) (defvar *chris-keymap* (make-keymap "chris-map"))
@ -49,6 +67,7 @@
"J" 'switch-buffer-previous "J" 'switch-buffer-previous
"b" 'switch-buffer "b" 'switch-buffer
"v" 'hint-mpv "v" 'hint-mpv
"C-v v" 'hint-ytdl
"d" 'delete-current-buffer "d" 'delete-current-buffer
"D" 'delete-buffer "D" 'delete-buffer
"r" 'reload-current-buffer "r" 'reload-current-buffer

View file

@ -7,6 +7,7 @@ rounded-corners-exclude = [
"class_g = 'kitty'", "class_g = 'kitty'",
# "class_g = 'emacs'", # "class_g = 'emacs'",
"class_g = 'Thunderbird'", "class_g = 'Thunderbird'",
# "_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_FULLSCREEN'",
]; ];
round-borders = 12; round-borders = 12;
round-borders-exclude = [ round-borders-exclude = [
@ -26,10 +27,10 @@ shadow-radius = 28;
shadow-opacity = .55; shadow-opacity = .55;
# The left offset for shadows, in pixels. (defaults to -15) # The left offset for shadows, in pixels. (defaults to -15)
shadow-offset-x = 2; shadow-offset-x = -12;
# The top offset for shadows, in pixels. (defaults to -15) # The top offset for shadows, in pixels. (defaults to -15)
shadow-offset-y = 2; shadow-offset-y = -12;
# Avoid drawing shadows on dock/panel windows. This option is deprecated, # Avoid drawing shadows on dock/panel windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead. # you should use the *wintypes* option in your config file instead.
@ -169,7 +170,10 @@ opacity-rule = [
# "100:class_g = 'kitty'", # "100:class_g = 'kitty'",
"100:class_g = 'Alacritty'", "100:class_g = 'Alacritty'",
"100:class_g = 'qutebrowser'", "100:class_g = 'qutebrowser'",
"100:class_g = 'showfoto'",
"100:class_g = 'scribus'", "100:class_g = 'scribus'",
"100:class_g = 'kdenlive'",
"100:class_g = 'resolve'",
"100:class_g = 'OpenLP'", "100:class_g = 'OpenLP'",
"80:class_g = 'Polybar'", "80:class_g = 'Polybar'",
"90:class_g = 'awesome'", "90:class_g = 'awesome'",
@ -248,7 +252,7 @@ blur-background-exclude = [
# prevents picom from blurring the background # prevents picom from blurring the background
# when taking selection screenshot with `main` # when taking selection screenshot with `main`
# https://github.com/naelstrof/maim/issues/130 # https://github.com/naelstrof/maim/issues/130
"class_g = 'awesome'", # "class_g = 'awesome'",
"class_g = 'slop'", "class_g = 'slop'",
"_GTK_FRAME_EXTENTS@:c", "_GTK_FRAME_EXTENTS@:c",
"class_g = 'soffice'", "class_g = 'soffice'",
@ -315,7 +319,7 @@ use-ewmh-active-win = true;
# Unredirect all windows if a full-screen opaque window is detected, # Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering # to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious. # when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious.
unredir-if-possible = true; unredir-if-possible = false;
# Delay before unredirecting the window, in milliseconds. Defaults to 0. # Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0 # unredir-if-possible-delay = 0

View file

@ -19,3 +19,5 @@ settings:
https://www.g2a.com: false https://www.g2a.com: false
https://www.reddit.com: false https://www.reddit.com: false
https://www.websitebuilderexpert.com: false https://www.websitebuilderexpert.com: false
tabs.show:
global: always

View file

@ -22,3 +22,4 @@ nvtfc https://www.facebook.com/NorthernValleyTFC
tnc https://staff.tfcconnection.org/apps/dashboard/ tnc https://staff.tfcconnection.org/apps/dashboard/
nc https://nc.cochrun.xyz/apps/files/ nc https://nc.cochrun.xyz/apps/files/
oml https://outlook.live.com/mail/0/inbox oml https://outlook.live.com/mail/0/inbox
stb https://table.tfcconnection.org/

View file

@ -1,13 +1,16 @@
#!/usr/bin/env fish #!/usr/bin/env fish
mkdir transcoded mkdir transcoded
for vid in *.mp4 mkdir source
for vid in *.MP4
touch $vid.txt touch $vid.txt
echo $vid >>$vid.txt echo $vid >>$vid.txt
set newvid (sed "s/\.mp4//g" $vid.txt) set newvid (sed "s/\.mp4//g" $vid.txt)
echo $newvid echo $newvid
ffmpeg -i $vid -c:v dnxhd -profile:v 3 -qscale:v 9 -c:a pcm_s16le $newvid.mov ffmpeg -i $vid -c:v dnxhd -profile:v 3 -qscale:v 20 -c:a pcm_s16be $newvid.mov
mv $newvid.mov ./transcoded/$newvid.mov mv $newvid.mov ./transcoded/$newvid.mov
mv $vid source/$vid
rm $vid.txt rm $vid.txt
echo \n finished transcoding new file is in transcoded/$newvid.mov echo \n finished transcoding new file is in transcoded/$newvid.mov
end end
@ -17,8 +20,45 @@ for vid in *.MOV
echo $vid >>$vid.txt echo $vid >>$vid.txt
set newvid (sed "s/\.mp4//g" $vid.txt) set newvid (sed "s/\.mp4//g" $vid.txt)
echo $newvid echo $newvid
ffmpeg -i $vid -c:v dnxhd -profile:v 3 -qscale:v 9 -c:a pcm_s16le $newvid.mov ffmpeg -i $vid -c:v dnxhd -profile:v 3 -qscale:v 4 -c:a pcm_s16be $newvid.mov
mv $newvid.mov ./transcoded/$newvid.mov mv $newvid.mov ./transcoded/$newvid.mov
mv $vid source/$vid
rm $vid.txt
echo \n finished transcoding new file is in transcoded/$newvid.mov
end
for vid in *.mp4
touch $vid.txt
echo $vid >>$vid.txt
set newvid (sed "s/\.mp4//g" $vid.txt)
echo $newvid
ffmpeg -i $vid -c:v dnxhd -profile:v 3 -qscale:v 4 -c:a pcm_s16be $newvid.mov
mv $newvid.mov ./transcoded/$newvid.mov
mv $vid source/$vid
rm $vid.txt
echo \n finished transcoding new file is in transcoded/$newvid.mov
end
for vid in *.mov
touch $vid.txt
echo $vid >>$vid.txt
set newvid (sed "s/\.mp4//g" $vid.txt)
echo $newvid
ffmpeg -i $vid -c:v dnxhd -profile:v 3 -qscale:v 4 -c:a pcm_s16be $newvid.mov
mv $newvid.mov ./transcoded/$newvid.mov
mv $vid source/$vid
rm $vid.txt
echo \n finished transcoding new file is in transcoded/$newvid.mov
end
for vid in *.mkv
touch $vid.txt
echo $vid >>$vid.txt
set newvid (sed "s/\.mp4//g" $vid.txt)
echo $newvid
ffmpeg -i $vid -c:v dnxhd -profile:v 3 -qscale:v 4 -c:a pcm_s16be $newvid.mov
mv $newvid.mov ./transcoded/$newvid.mov
mv $vid source/$vid
rm $vid.txt rm $vid.txt
echo \n finished transcoding new file is in transcoded/$newvid.mov echo \n finished transcoding new file is in transcoded/$newvid.mov
end end

53
surfingkeys/conf.js Normal file
View file

@ -0,0 +1,53 @@
// an example to create a new mapping `ctrl-y`
mapkey('<ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
map('gt', 'T');
// an example to remove mapkey `Ctrl-i`
unmap('<ctrl-i>');
settings.smoothScroll = true;
settings.scrollStepSize = 220;
// set theme
settings.theme = `
.sk_theme {
font-family: Input Sans Condensed, Charcoal, sans-serif;
font-size: 10pt;
background: #24272e;
color: #abb2bf;
}
.sk_theme tbody {
color: #fff;
}
.sk_theme input {
color: #d0d0d0;
}
.sk_theme .url {
color: #61afef;
}
.sk_theme .annotation {
color: #56b6c2;
}
.sk_theme .omnibar_highlight {
color: #528bff;
}
.sk_theme .omnibar_timestamp {
color: #e5c07b;
}
.sk_theme .omnibar_visitcount {
color: #98c379;
}
.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) {
background: #303030;
}
.sk_theme #sk_omnibarSearchResult ul li.focused {
background: #3e4452;
}
#sk_status, #sk_find {
font-size: 20pt;
}`;
// click `Save` button to make above settings to take effect.</ctrl-i></ctrl-y>