diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index 07739e5..93b7a61 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -318,7 +318,7 @@ colors: # # Window opacity as a floating point number from `0.0` to `1.0`. # The value `0.0` is completely transparent and `1.0` is opaque. -background_opacity: 0.80 +background_opacity: 0.75 #selection: #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" diff --git a/awesome/init.fnl b/awesome/init.fnl index 1874031..a327a91 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -79,7 +79,7 @@ (if (= "syl\n" stdout) (global laptop true) (global laptop false)))) -(local laptop false) +(local laptop true) ;; Table of layouts to cover with awful.layout.inc, order matters. (set awful.layout.layouts [ diff --git a/fish/config.fish b/fish/config.fish index 7b262a2..a9030d6 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -202,103 +202,9 @@ starship init fish | source ### ALIASES alias yay "paru" alias yeet "paru -Rns" -alias ls "exa --icons" -alias ll "exa -l --icons" -alias la "exa -la --icons" - -# ============================================================================= -# -# Utility functions for zoxide. -# - -# pwd based on the value of _ZO_RESOLVE_SYMLINKS. -function __zoxide_pwd - builtin pwd -L -end - -# A copy of fish's internal cd function. This makes it possible to use -# `alias cd=z` without causing an infinite loop. -if ! builtin functions -q __zoxide_cd_internal - if builtin functions -q cd - builtin functions -c cd __zoxide_cd_internal - else - alias __zoxide_cd_internal="builtin cd" -end -end - -# cd + custom logic based on the value of _ZO_ECHO. -function __zoxide_cd - __zoxide_cd_internal $argv - and builtin commandline -f repaint -end - -# ============================================================================= -# -# Hook configuration for zoxide. -# - -# Initialize hook to add new entries to the database. -if test "$__zoxide_hooked" != 1 - set __zoxide_hooked 1 - function __zoxide_hook --on-variable PWD - test -z "$fish_private_mode" - and command zoxide add -- (__zoxide_pwd) -end -end - -# ============================================================================= -# -# When using zoxide with --no-aliases, alias these internal functions as -# desired. -# - -# Jump to a directory using only keywords. -function __zoxide_z - set argc (count $argv) - if test $argc -eq 0 - __zoxide_cd $HOME - else if test "$argv" = - - __zoxide_cd - - else if begin - test $argc -eq 1; and test -d $argv[1] -end -__zoxide_cd $argv[1] -else - set -l __zoxide_result (command zoxide query --exclude (__zoxide_pwd) -- $argv) - and __zoxide_cd $__zoxide_result -end -end - -# Jump to a directory using interactive search. -function __zoxide_zi - set -l __zoxide_result (command zoxide query -i -- $argv) - and __zoxide_cd $__zoxide_result -end - -# ============================================================================= -# -# Convenient aliases for zoxide. Disable these using --no-aliases. -# - -# Remove definitions. -function __zoxide_unset - set --erase $argv >/dev/null 2>&1 - abbr --erase $argv >/dev/null 2>&1 - builtin functions --erase $argv >/dev/null 2>&1 -end - -__zoxide_unset z -alias z="__zoxide_z" - -__zoxide_unset zi -alias zi="__zoxide_zi" - -# ============================================================================= -# -# To initialize zoxide, add this to your configuration (usually -# ~/.config/fish/config.fish): -# -# zoxide init fish | source +alias ls "exa -l" +alias la "exa -la" +alias mpf "mpv --profile=fast" ### Start X at login if status is-login diff --git a/mpv/mpv.conf b/mpv/mpv.conf index 9cca60b..af6caab 100644 --- a/mpv/mpv.conf +++ b/mpv/mpv.conf @@ -3,7 +3,7 @@ vo=gpu af=scaletempo2 autofit=70% geometry=50%:50% -input-ipc-server="/tmp/mpvsocket" +# input-ipc-server="/tmp/mpvsocket" hwdec=auto rtsp-transport=udp diff --git a/qutebrowser/config.py b/qutebrowser/config.py index 787099c..8bc3a27 100644 --- a/qutebrowser/config.py +++ b/qutebrowser/config.py @@ -2483,7 +2483,7 @@ config.bind("o", "set-cmd-text -s :open") ## Bindings for MPV and YTDL 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("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", diff --git a/qutebrowser/qsettings/QtProject.conf b/qutebrowser/qsettings/QtProject.conf index e7c287f..108a1f2 100644 --- a/qutebrowser/qsettings/QtProject.conf +++ b/qutebrowser/qsettings/QtProject.conf @@ -1,8 +1,8 @@ [FileDialog] -history=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 +history=file:///home/chris/Downloads, file:///home/chris/Pictures/Phone/Camera lastVisited=file:///home/chris/Downloads 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\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 +viewMode=List diff --git a/qutebrowser/quickmarks b/qutebrowser/quickmarks index 5a009ad..5a457d0 100644 --- a/qutebrowser/quickmarks +++ b/qutebrowser/quickmarks @@ -21,3 +21,4 @@ tfc https://www.tfcconnection.org/ nvtfc https://www.facebook.com/NorthernValleyTFC tnc https://staff.tfcconnection.org/apps/dashboard/ nc https://nc.cochrun.xyz/apps/files/ +oml https://outlook.live.com/mail/0/inbox diff --git a/river/init b/river/init index 1981e04..9e4a1bf 100755 --- a/river/init +++ b/river/init @@ -13,7 +13,9 @@ mod="Mod4" # Mod+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) riverctl map normal $mod Return spawn alacritty riverctl map normal $mod E spawn emacsclient -c -a 'emacs' -riverctl map normal Menu spawn rofi -no-lazy-grab -show run -modi run +riverctl map normal $mod B spawn qutebrowser +riverctl map normal None Menu spawn rofi -no-lazy-grab -show drun -modi drun +riverctl map normal $mod Menu spawn rofi -no-lazy-grab -show run -modi run # Mod+Q to close the focused view riverctl map normal $mod C close @@ -31,20 +33,20 @@ riverctl map normal $mod+Shift J swap next riverctl map normal $mod+Shift K swap previous # Mod+Period and Mod+Comma to focus the next/previous output -riverctl map normal $mod Period focus-output next -riverctl map normal $mod Comma focus-output previous +riverctl map normal $mod L focus-output next +riverctl map normal $mod H focus-output previous # Mod+Shift+{Period,Comma} to send the focused view to the next/previous output -riverctl map normal $mod+Shift Period send-to-output next -riverctl map normal $mod+Shift Comma send-to-output previous +riverctl map normal $mod O send-to-output next +# riverctl map normal $mod+Shift Comma send-to-output previous # Mod+Return to bump the focused view to the top of the layout stack # riverctl map normal $mod Return zoom # Mod+H and Mod+L to decrease/increase the main factor by 5% # If using rivertile(1) this determines the width of the main stack. -riverctl map normal $mod H mod-main-factor -0.05 -riverctl map normal $mod L mod-main-factor +0.05 +riverctl map normal $mod+Control H mod-main-factor -0.05 +riverctl map normal $mod+Control L mod-main-factor +0.05 # Mod+Shift+H and Mod+Shift+L to increment/decrement the number of # main views in the layout @@ -149,9 +151,6 @@ done # Set repeat rate riverctl set-repeat 180 200 -# Set the layout on startup -riverctl layout rivertile - # Set app-ids of views which should float riverctl float-filter-add "float" riverctl float-filter-add "popup" @@ -170,4 +169,9 @@ riverctl xcursor-theme breeze-snow wlr-randr --output eDP-1 --pos 0,0 --scale 2 # Turn on Waybar -waybar +exec waybar + +# Set and exec into the default layout generator, rivertile. +# River will send the process group of the init executable SIGTERM on exit. +riverctl default-layout rivertile +exec rivertile diff --git a/rofi/config.rasi b/rofi/config.rasi index 469b42f..c911358 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -10,4 +10,4 @@ configuration { run-command: "fish -c {cmd}"; run-list-command: "fish -c functions"; } -@import "/home/chris/.dotfiles/rofi/launchers-git/desktop.rasi" +@import "/home/chris/.dotfiles/rofi/launchers-git/laptop.rasi" diff --git a/scripts/mem b/scripts/mem new file mode 100755 index 0000000..6904f2c --- /dev/null +++ b/scripts/mem @@ -0,0 +1,9 @@ +#!/bin/sh +# Get the percentage of used memory and print it +read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}') + +percent=$(bc -l <<< "100 * $total / $used") + +mem=$(awk -v u=$used -v t=$total -v p=$percent 'BEGIN {printf "%sMi/%sMi %.1f% ", t, u, p}') + +echo $mem diff --git a/scripts/rofipass b/scripts/rofipass new file mode 100755 index 0000000..02453d5 --- /dev/null +++ b/scripts/rofipass @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +# Very basic interface for pass using wofi + +# Get all password files and create an array +root=~/.password-store +CACHE=~/.local/tmp/pass_wofi +seat=seat0 + +list_passwords() { + shopt -s nullglob globstar + cd "${root}" || exit + pw_list=(**/*.gpg) + printf '%s\n' "${pw_list[@]%.gpg}" | sort -n + +} + +prompt='search for passwords...' +SECRET=$(list_passwords | rofi -i -prompt="${prompt}" -dmenu) + +# Ask whether pass, user or both are required + +options=("Password" \ + "User" \ + "User and password" \ + "QR-Code" \ + "OTP") + +option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -width 400 -lines 4 -prompt="...") + +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} diff --git a/sway/config b/sway/config index 86f6beb..c0ac414 100644 --- a/sway/config +++ b/sway/config @@ -51,10 +51,10 @@ gaps inner 20 default_border none -border_images.focused /home/chris/.dotfiles/sway/rounded_and_shadows_custom.png -border_images.focused_inactive /home/chris/.dotfiles/sway/rounded_and_shadows_custom.png -border_images.unfocused /home/chris/.dotfiles/sway/rounded_and_shadows_custom.png -border_images.urgent /home/chris/.dotfiles/sway/rounded_and_shadows_custom.png +# border_images.focused /home/chris/.dotfiles/sway/rounded_and_shadows_custom.png +# border_images.focused_inactive /home/chris/.dotfiles/sway/rounded_and_shadows_custom.png +# border_images.unfocused /home/chris/.dotfiles/sway/rounded_and_shadows_custom.png +# border_images.urgent /home/chris/.dotfiles/sway/rounded_and_shadows_custom.png font pango: VictorMono Nerd Font 10 titlebar_border_thickness 1 @@ -73,9 +73,9 @@ titlebar_border_thickness 1 bindsym Menu exec $menu bindsym $mod+Menu exec rofi -no-lazy-grab -show run -modi run | xargs swaymsg exec -- bindsym $mod+s exec filesearch - + #Pass - bindsym $mod+p exec rofi-pass + bindsym $mod+p exec rofipass # Screenshot bindsym Print exec grim -g "${slurp}" - | wl-copy @@ -129,6 +129,9 @@ titlebar_border_thickness 1 bindsym $mod+8 workspace number 8 bindsym $mod+9 workspace number 9 bindsym $mod+0 workspace number 10 + # Switching around workspaces + bindsym $mod+Mod1+l workspace next + bindsym $mod+Mod1+h workspace prev # Move focused container to workspace bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+2 move container to workspace number 2 @@ -221,6 +224,7 @@ bindsym $mod+r mode "resize" set $mode_launcher Launcher bindsym $mod+o mode "$mode_launcher" +# Clear notifications bindsym $mod+Ctrl+m exec makoctl dismiss -a mode "$mode_launcher" { @@ -249,11 +253,12 @@ for_window [app_id="pulsemixer"] floating enable for_window [app_id="qutebrowser"] move container to workspace number 2 for_window [app_id="qutebrowser"] opacity 1 for_window [app_id="emacs"] opacity 0.95 -#for_window [app_id="__focused__"] opacity 1 +for_window [app_id="__focused__"] opacity 1 exec emacs --daemon exec mako exec waystart +exec export QT_QPA_PLATFORMTHEME="qt5ct" xwayland enable include /etc/sway/config.d/* diff --git a/waybar/config b/waybar/config index 300f851..96b6953 100644 --- a/waybar/config +++ b/waybar/config @@ -1,14 +1,14 @@ { // "layer": "top", // Waybar at top layer "position": "bottom", // Waybar position (top|bottom|left|right) - "height": 20, // Waybar height (to be removed for auto height) + "height": 25, // Waybar height (to be removed for auto height) // "width": 1280, // Waybar width // Choose the order of the modules - "modules-left": ["sway/workspaces", "sway/mode", "sway/window"], + "modules-left": ["sway/workspaces", "river/tags", "sway/mode", "sway/window"], "modules-center": ["clock"], - "modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "battery", "battery#bat2", "tray"], + "modules-right": ["pulseaudio", "network", "cpu", "memory", "battery", "battery#bat2", "tray"], "margin-top": 5, - "margin-bottom": 5, + "margin-bottom": 10, // Modules configuration "sway/workspaces": { "disable-scroll": true, @@ -25,6 +25,9 @@ "default": "" } }, + "river/tags": { + "num-tags": 5 + }, "sway/mode": { "format": " {}" }, diff --git a/waybar/style.css b/waybar/style.css index 347d34e..6d01219 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -166,7 +166,7 @@ window#waybar.solo { padding-right: 10px; border-radius: 20px; transition: none; - color: @base0C; + color: @base0E; background: @backtransparent; }