From d744bb7a3159b9d3c6b025de131a3fa8bb5aec37 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 22 Jun 2021 07:08:06 -0500 Subject: [PATCH] Some lappy changes --- awesome/init.fnl | 2 +- awesome/theme.lua | 24 +++++-------- mpv/mpv.conf | 7 +++- qutebrowser/config.py | 8 +++-- qutebrowser/qsettings/QtProject.conf | 8 ++--- qutebrowser/quickmarks | 1 + scripts/rrbw | 50 ++++++++++++++++++++++++++++ 7 files changed, 77 insertions(+), 23 deletions(-) create mode 100755 scripts/rrbw diff --git a/awesome/init.fnl b/awesome/init.fnl index 3e2cbdd..9315a23 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -447,7 +447,7 @@ (set s.myrightwidgets { 1 { :layout wibox.layout.fixed.horizontal - 1 s.wttrwidget + ;; 1 s.wttrwidget 2 s.mailwidget 3 s.cpuwidget 4 s.volumewidget diff --git a/awesome/theme.lua b/awesome/theme.lua index 52c104f..0e4634e 100644 --- a/awesome/theme.lua +++ b/awesome/theme.lua @@ -111,25 +111,19 @@ theme.menu_width = dpi(100) -- mstab theme.mstab_bar_ontop = true -- whether you want to allow the bar to be ontop of clients theme.mstab_dont_resize_slaves = true -- whether the tabbed stack windows should be smaller than the - -- currently focused stack window (set it to true if you use - -- transparent terminals. False if you use shadows on solid ones +-- currently focused stack window (set it to true if you use +-- transparent terminals. False if you use shadows on solid ones theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar - -- by default it will adjust based on your useless gaps. - -- If you want a custom value. Set it to the number of pixels (int) +-- by default it will adjust based on your useless gaps. +-- If you want a custom value. Set it to the number of pixels (int) -if(laptop) -then - theme.mstab_bar_height = 100 -- height of the tabbar - theme.mstab_border_radius = 20 -- border radius of the tabbar -else - theme.mstab_bar_height = 50 - theme.mstab_border_radius = 10 -- border radius of the tabbar -end +theme.mstab_bar_height = 100 +theme.mstab_border_radius = 10 -- border radius of the tabbar theme.mstab_tabbar_position = "top" -- position of the tabbar (mstab currently does not support left,right) theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") - -- defaults to the tabbar_style so only change if you want a - -- different style for mstab and tabbed +-- defaults to the tabbar_style so only change if you want a +-- different style for mstab and tabbed -- wibar theme.wibar_shape = gears.shape.rounded_bar theme.wibar_bg = theme.bg_normal @@ -200,7 +194,7 @@ theme.layout_cornerse = themes_path.."default/layouts/cornersew.png" -- Generate Awesome icon: theme.awesome_icon = theme_assets.awesome_icon( - theme.menu_height, theme.bg_focus, theme.fg_focus + theme.menu_height, theme.bg_focus, theme.fg_focus ) -- theme.awesome_icon = theme.icons .. 'awesome.svg' diff --git a/mpv/mpv.conf b/mpv/mpv.conf index fc5cede..9cca60b 100644 --- a/mpv/mpv.conf +++ b/mpv/mpv.conf @@ -1,7 +1,6 @@ # Use GPU-accelerated video output by default vo=gpu af=scaletempo2 -speed=1.95 autofit=70% geometry=50%:50% input-ipc-server="/tmp/mpvsocket" @@ -9,3 +8,9 @@ hwdec=auto rtsp-transport=udp ytdl-format=bestvideo[height<=?720][fps<=?30]+bestaudio/best + +[fast] +speed=1.95 + +[slow] +speed=1 diff --git a/qutebrowser/config.py b/qutebrowser/config.py index c34ef8f..787099c 100644 --- a/qutebrowser/config.py +++ b/qutebrowser/config.py @@ -2482,13 +2482,17 @@ config.bind("o", "set-cmd-text -s :open") # config.bind('y', 'prompt-accept yes', mode='yesno') ## 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 --ytdl=bestvideo[height<=?720][fps<=?30]+bestaudio/best {url}") +config.bind("v", "hint links spawn --detach mpv --profile=fast --force-window yes {hint-url}") +config.bind("gv", "spawn --detach mpv --profile=fast --force-window yes --ytdl=bestvideo[height<=?720][fps<=?30]+bestaudio/best {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}", ) +config.bind( + "ga", + "hint links spawn alacritty -e youtube-dl -x --audio-format mp3 --audio-quality 0 --embed-thumbnail --add-metadata -o ~/Music/%(title)s.%(ext)s {hint-url}", +) config.bind('d', 'tab-close') diff --git a/qutebrowser/qsettings/QtProject.conf b/qutebrowser/qsettings/QtProject.conf index 5a77020..cadbee8 100644 --- a/qutebrowser/qsettings/QtProject.conf +++ b/qutebrowser/qsettings/QtProject.conf @@ -1,9 +1,9 @@ [FileDialog] ="======" -history=file:///home/chris/Pictures, file:///home/chris/Videos, file:///home/chris, file:///home/chris/Downloads, file:///home/chris/tfc, file:///home/chris/Pictures/Phone/Camera -lastVisited=file:///home/chris/Pictures/Phone/Camera +history=file:///home/chris/Videos, file:///home/chris, file:///home/chris/Downloads, file:///home/chris/tfc, file:///home/chris/Pictures/Phone/Camera, file:///run/media/chris/LUMIX/DCIM/110_PANA +lastVisited=file:///run/media/chris/LUMIX/DCIM/110_PANA qtVersion=5.15.2 shortcuts=file:, file:///home/chris sidebarWidth=116 -treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2L\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xff\0\0\0\x1\0\0\0\0\0\0\0X\0\0\0\x1\0\0\0\0\0\0\0X\0\0\0\x1\0\0\0\0\0\0\0\x9d\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff) -viewMode=List +treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x2\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2L\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xff\0\0\0\x1\0\0\0\0\0\0\0X\0\0\0\x1\0\0\0\0\0\0\0X\0\0\0\x1\0\0\0\0\0\0\0\x9d\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff) +viewMode=Detail diff --git a/qutebrowser/quickmarks b/qutebrowser/quickmarks index 838fd98..767160a 100644 --- a/qutebrowser/quickmarks +++ b/qutebrowser/quickmarks @@ -19,3 +19,4 @@ st http://127.0.0.1:8384/# ha https://home.cochrun.xyz/lovelace/default_view tfc https://www.tfcconnection.org/ nvtfc https://www.facebook.com/NorthernValleyTFC +tnc https://staff.tfcconnection.org/apps/dashboard/ diff --git a/scripts/rrbw b/scripts/rrbw new file mode 100755 index 0000000..227a3a7 --- /dev/null +++ b/scripts/rrbw @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# Very basic Rofi RBW finder + +prompt='search for passwords...' +ENTRY=$(rbw-list | rofi --prompt="${prompt}" -dmenu) +SECRET=$(rbw get $ENTRY) + +# Ask whether pass, user or both are required + +options=("Password" \ + "User" \ + "User and password" \ + "QR-Code" \ + "OTP") + +option=$(printf '%s\n' "${options[@]%}" | rofi -dmenu --width 400 --lines 4 --prompt="..." --cache-file /dev/null) + +echo $option + +case ${option} in + Password ) + echo "Test" + wtype $(pass ${SECRET} | head -n 1) + ;; + User ) + wtype $(pass ${SECRET} | rg user: | awk '{$1 = ""; print $0}') + ;; + "User and password" ) + wtype $(pass ${SECRET} | rg user: | awk '{$1 = ""; print $0}') + wtype -k TAB + wtype $(pass ${SECRET} | head -n 1) + ;; + "QR-Code" ) + if [[ $SECRET =~ wifi$ ]]; then + # Produce a valid wifi QR-code + WIFISSID=$(pass get_user ${SECRET}) + WIFIPASS=$(pass get_pass ${SECRET}) + WIFIQR="WIFI:T:WPA;S:${WIFISSID};P:${WIFIPASS};;" + qrencode -s 8 -o - $WIFIQR | feh --title "pass: QR-WIFI" - + else + # Only password + pass show -q1 ${SECRET} + fi + ;; + "OTP" ) + wtype $(pass otp ${SECRET}) + ;; +esac + +# wl-copy -o -s ${seat} ${PASSWD_PASS}