diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2025-04-02 16:10:16 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2025-04-02 16:10:16 -0400 |
commit | 2ceb1116a3dcb9471d426d57a1a76b6a1a25fa6c (patch) | |
tree | fc97e434fdc5b65d60e2be610e46efc9633a5437 | |
parent | 4ccdb6fb1f53bc6c799ece8c2f03a0fede093acd (diff) |
-rw-r--r-- | .config/foot/foot.ini | 249 | ||||
-rwxr-xr-x | .config/lf/lfrc | 4 | ||||
-rwxr-xr-x | .config/river/init | 17 | ||||
-rwxr-xr-x | .config/startup/battlestation | 10 | ||||
-rwxr-xr-x | .config/startup/workstation | 13 | ||||
-rw-r--r-- | .config/sxhkd/sxhkdrc | 236 | ||||
-rw-r--r-- | .config/tofi/config | 1 | ||||
-rw-r--r-- | .config/waybar/config.json | 1 | ||||
-rwxr-xr-x | .local/bin/dropbox-restore | 6 | ||||
-rwxr-xr-x | .local/bin/rotdir | 12 | ||||
-rw-r--r-- | .profile | 12 |
11 files changed, 36 insertions, 525 deletions
diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini deleted file mode 100644 index 9750704..0000000 --- a/.config/foot/foot.ini +++ /dev/null @@ -1,249 +0,0 @@ -# -*- conf -*- - -# shell=$SHELL # (if set, otherwise user's default shell from /etc/passwd) -term=foot # (or xterm-256color if built with -Dterminfo=disabled) -# login-shell=no - -app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode -title=foot -locked-title=no - -font=monospace:size=13 -# font-bold=<bold variant of regular font> -# font-italic=<italic variant of regular font> -# font-bold-italic=<bold+italic variant of regular font> -# font-size-adjustment=0.5 -# line-height=<font metrics> -# letter-spacing=0 -# horizontal-letter-offset=0 -# vertical-letter-offset=0 -# underline-offset=<font metrics> -# underline-thickness=<font underline thickness> -# box-drawings-uses-font-glyphs=no -# dpi-aware=no - -# initial-window-size-pixels=700x500 # Or, -# initial-window-size-chars=<COLSxROWS> -# initial-window-mode=windowed -# pad=0x0 # optionally append 'center' -# resize-by-cells=yes -# resize-delay-ms=100 - -# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} - -# bold-text-in-bright=no -# word-delimiters=,│`|:"'()[]{}<> -# selection-target=primary -# workers=<number of logical CPUs> -# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux) -# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD) - -[environment] -# name=value - -[bell] -# urgent=no -# notify=no -# visual=no -# command= -# command-focused=no - -[scrollback] -# lines=1000 -# multiplier=3.0 -# indicator-position=relative -# indicator-format="" - -[url] -launch=xdg-open ${url} -label-letters=sadfjklewcmpgh -osc8-underline=url-mode -protocols=http, https, ftp, ftps, file, gemini, gopher, rsync -uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] - -[cursor] -style=block -# color=<inverse foreground/background> -# blink=no -# blink-rate=500 -# beam-thickness=1.5 -# underline-thickness=<font underline thickness> - -[mouse] -hide-when-typing=yes -# alternate-scroll-mode=yes - -[touch] -# long-press-delay=400 - -[colors] -alpha=0.82 -background=111a1f -foreground=acb3b5 -# flash=7f7f00 -# flash-alpha=0.5 - -regular0=111a1f -regular1=8d7856 -regular2=798362 -regular3=9b9257 -regular4=63768a -regular5=b7416e -regular6=6998b3 -regular7=c5c8c6 - -bright0=868b8d -bright1=810002 -bright2=037500 -bright3=ebcb88 -bright4=779988 -bright5=738c9c -bright6=66aabb -bright7=c0c7ca - -## Normal/regular colors (color palette 0-7) -# regular0=242424 # black -# regular1=f62b5a # red -# regular2=47b413 # green -# regular3=e3c401 # yellow -# regular4=24acd4 # blue -# regular5=f2affd # magenta -# regular6=13c299 # cyan -# regular7=e6e6e6 # white - -## Bright colors (color palette 8-15) -# bright0=616161 # bright black -# bright1=ff4d51 # bright red -# bright2=35d450 # bright green -# bright3=e9e836 # bright yellow -# bright4=5dc5f8 # bright blue -# bright5=feabf2 # bright magenta -# bright6=24dfc4 # bright cyan -# bright7=ffffff # bright white - -## dimmed colors (see foot.ini(5) man page) -# dim0=<not set> -# ... -# dim7=<not-set> - -## The remaining 256-color palette -# 16 = <256-color palette #16> -# ... -# 255 = <256-color palette #255> - -## Misc colors -# selection-foreground=<inverse foreground/background> -# selection-background=<inverse foreground/background> -# jump-labels=<regular0> <regular3> # black-on-yellow -# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue -# search-box-no-match=<regular0> <regular1> # black-on-red -# search-box-match=<regular0> <regular3> # black-on-yellow -# urls=<regular3> - -[csd] -# preferred=server -# size=26 -# font=<primary font> -# color=<foreground color> -# hide-when-maximized=no -# double-click-to-maximize=yes -# border-width=0 -# border-color=<csd.color> -# button-width=26 -# button-color=<background color> -# button-minimize-color=<regular4> -# button-maximize-color=<regular2> -# button-close-color=<regular1> - -[key-bindings] -# scrollback-up-page=Shift+Page_Up -# scrollback-up-half-page=none -# scrollback-up-line=none -# scrollback-down-page=Shift+Page_Down -# scrollback-down-half-page=none -# scrollback-down-line=none -# scrollback-home=none -# scrollback-end=none -clipboard-copy=Mod1+c XF86Copy -clipboard-paste=Mod1+v XF86Paste -# primary-paste=Shift+Insert -# search-start=Control+Shift+r -font-increase=Mod1+Shift+k Control+equal Control+KP_Add -font-decrease=Mod1+Shift+j Control+KP_Subtract -font-reset=Mod1+Shift+0 Control+KP_0 -# spawn-terminal=Control+Shift+n -# minimize=none -# maximize=none -# fullscreen=none -# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none -# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none -# pipe-selected=[xargs -r firefox] none -# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard -# show-urls-launch=Control+Shift+o -# show-urls-copy=none -# show-urls-persistent=none -# prompt-prev=Control+Shift+z -# prompt-next=Control+Shift+x -# unicode-input=Control+Shift+u -# noop=none - -[search-bindings] -# cancel=Control+g Control+c Escape -# commit=Return -# find-prev=Control+r -# find-next=Control+s -# cursor-left=Left Control+b -# cursor-left-word=Control+Left Mod1+b -# cursor-right=Right Control+f -# cursor-right-word=Control+Right Mod1+f -# cursor-home=Home Control+a -# cursor-end=End Control+e -# delete-prev=BackSpace -# delete-prev-word=Mod1+BackSpace Control+BackSpace -# delete-next=Delete -# delete-next-word=Mod1+d Control+Delete -# extend-char=Shift+Right -# extend-to-word-boundary=Control+w Control+Shift+Right -# extend-to-next-whitespace=Control+Shift+w -# extend-line-down=Shift+Down -# extend-backward-char=Shift+Left -# extend-backward-to-word-boundary=Control+Shift+Left -# extend-backward-to-next-whitespace=none -# extend-line-up=Shift+Up -# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste -# primary-paste=Shift+Insert -# unicode-input=none -# quit=none -# scrollback-up-page=Shift+Page_Up -# scrollback-up-half-page=none -# scrollback-up-line=none -# scrollback-down-page=Shift+Page_Down -# scrollback-down-half-page=none -# scrollback-down-line=none -# scrollback-home=none -# scrollback-end=none - -[url-bindings] -# cancel=Control+g Control+c Control+d Escape -# toggle-url-visible=t - -[text-bindings] -# \x03=Mod4+c # Map Super+c -> Ctrl+c - -[mouse-bindings] -# scrollback-up-mouse=BTN_WHEEL_BACK -# scrollback-down-mouse=BTN_WHEEL_FORWARD -# font-increase=Control+BTN_WHEEL_BACK -# font-decrease=Control+BTN_WHEEL_FORWARD -# selection-override-modifiers=Shift -# primary-paste=BTN_MIDDLE -# select-begin=BTN_LEFT -# select-begin-block=Control+BTN_LEFT -# select-extend=BTN_RIGHT -# select-extend-character-wise=Control+BTN_RIGHT -# select-word=BTN_LEFT-2 -# select-word-whitespace=Control+BTN_LEFT-2 -# select-quote = BTN_LEFT-3 -# select-row=BTN_LEFT-4 - -# vim: ft=dosini diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 48a5d0d..5e2e6cb 100755 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -126,9 +126,9 @@ map N push :!touch<space> map W $setsid -f $TERMINAL >/dev/null 2>&1 map Y $printf "%s" "$fx" | wl-copy -map E $dropbox-cli exclude add "$f" && notify-send -a " Dropbox" "Excluded $f from computer" +map E $maestral excluded add "$f" && notify-send -a " Dropbox" "Excluded $f from computer" map R $dropbox-restore "$f" -map S $dropbox-cli sharelink "$f" | wl-copy && notify-send -a " Dropbox" "Link copied to clipboard." +map S $maestral sharelink "$f" | wl-copy && notify-send -a " Dropbox" "Link copied to clipboard." # Source Bookmarks source "~/.config/lf/shortcuts" diff --git a/.config/river/init b/.config/river/init index 676e7b8..f7c1d2d 100755 --- a/.config/river/init +++ b/.config/river/init @@ -1,4 +1,4 @@ -#!/usr/bin/lua +#!/usr/bin/lua5.4 --[[ @@ -508,23 +508,26 @@ local mappings = { }, } --- -- These mappings are repeated, so they are separated from the mappings table +-- These mappings are repeated, so they are separated from the mappings table local function tag_mappings() for i = 1, 9 do - -- local tag_num = 1 << (i - 1) - local tag_num = math.pow(2, i - 1) + local tag_num = 1 << (i - 1) + -- Super+[1-9] to focus tag [0-8] os.execute(string.format("riverctl map normal Super %s set-focused-tags %s", i, tag_num)) + -- Super+Shift+[1-9] to tag focused view with tag [0-8] os.execute(string.format("riverctl map normal Super+Shift %s set-view-tags %s", i, tag_num)) + -- Super+Control+[1-9] to toggle focus of tag [0-8] - os.execute(string.format("riverctl map normal Super+Control %s toggle-focused-tags %s", i, tag_num)) + os.execute(string.format("riverctl map normal Alt %s toggle-focused-tags %s", i, tag_num)) + -- Super+Alt+[1-9] to toggle tag [0-8] of focused view os.execute(string.format("riverctl map normal Super+Alt %s toggle-view-tags %s", i, tag_num)) end + -- river has a total of 32 tags - -- local all_tags = (1 << 32) - 1 - local all_tags = math.pow(2, 32) - 1 + local all_tags = (1 << 32) - 1 os.execute(string.format("riverctl map normal Super 0 set-focused-tags %s", all_tags)) os.execute(string.format("riverctl map normal Super+Shift 0 set-view-tags %s", all_tags)) end diff --git a/.config/startup/battlestation b/.config/startup/battlestation deleted file mode 100755 index 19c541e..0000000 --- a/.config/startup/battlestation +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Pipewire setup: -gentoo-pipewire-launcher & - -# Load Nvidia X Server Settings -nvidia-settings --load-config-only & - -# Load stacked dual monitor configuration -$XDG_CONFIG_HOME/screenlayout/battlestation-dualmon & diff --git a/.config/startup/workstation b/.config/startup/workstation deleted file mode 100755 index afbc776..0000000 --- a/.config/startup/workstation +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# Pipewire setup: -gentoo-pipewire-launcher & - -# Autolock the screen after 5 minutes with xautolock (slock) -xautolock -time 5 -locker slock & - -# Configure monitor layout (and wallpaper) -"$XDG_CONFIG_HOME/screenlayout/workstation-singlemon" & - -# Automatically start dropbox -dropbox start & diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc deleted file mode 100644 index 7a296fa..0000000 --- a/.config/sxhkd/sxhkdrc +++ /dev/null @@ -1,236 +0,0 @@ -# _ _ _ -# | | | | | | -# _____ _| |__ | | ____| | -# / __\ \/ / '_ \| |/ / _` | -# \__ \> <| | | | < (_| | -# |___/_/\_\_| |_|_|\_\__,_| -# -# - -# Commands are procedurally added to the manual. - -# To do so, for every command, add a line starting -# with `##` which has a generic description of what -# the command does. - -# The pdf will associate it with the binding BELOW IT. - -# `#` followed by a space will be ignored and treated -# as regular comments. - -# `#-#` at the beggining of a line will be converted to -# a header in the manual. - -#-# dwm #-# -## Quit dwm -super + shift + q - dwmc quit -## Quit Current/focused App -super + q - quitapp -## Toggle the dwm bar -super + shift + b - dwmc togglebar -## Change layout to {tiling, bstackhoriz} -super + {_,shift} + t - dwmc setlayoutex {0,2} -## Change layout to {nolayout, monocle} -super + {_,shift} + g - dwmc setlayoutex {5,1} -## Change layout to {centeredmaster, tilewide} -super + {_,shift} + m - dwmc setlayoutex {3,4} -## Make window fullscreen -super + f - dwmc fullscreen -## Make current window floating -super + shift + space - dwmc togglefloating -## Cycle up and down the window stack (change focus) -super + {j,k} - dwmc focusstack {+,-}1 -## Rotate clockwise/counterclockwise the window stack -super + shift + {j,k} - dwmc rotatestack {+,-}1 -## Move current window up/down the stack -super + shift + {h,l} - dwmc movestack {-,+}1 -## Change focus to/swap the master window -super + {_, shift} + s - dwmc {focusmaster, zoom} -## Add/Remove windows from the master stack -super + {_,shift} + i - dwmc incnmaster {+,-}1 -## Increase/Decrease master stack width -super + {h,l} - dwmc setmfact {-,+}0.05 -## Toggle view next tag -super + Tab - dwmc view -## Cycle forward/backward through monitor focus -super + {comma,period} - dwmc focusmon {-,+}1 -## Move current window to previous/next monitor -super + shift + {comma,period} - dwmc tagmon {-,+}1 -## Set the master monitor to be the previous/next monitor -super + alt + {comma,period} - dwmc setmastermon {-,+}1 -## View all tags -super + 0 - dwmc viewall -## Move current window to tag {1-9} -super + shift + {1-9} - dwmc tagex {0-8} -## Only view the tag {1-9} -super + {1-9} - dwmc viewex {0-8} -## Toggle the visibility tag {1-9} -super + alt + {1-9} - dwmc toggleviewex {0-8} -## Toggle (pin/unpin) the current window on tag {1-9} -alt + {1-9} - dwmc toggletagex {0-8} -## Pin current window to all tags -super + shift + 0 - dwmc tagall -## Make bigger/minimize window weight -super + {bracketleft,bracketright} - dwmc setcfact {-0.05,+0.05} -## Nullify window weight -super + n - dwmc setcfact 0 -# ## Decrease/increase gaps -super + {minus, shift + equal} - dwmc incrgaps {-,+}1 -# ## Set gaps to zero -super + equal - dwmc defaultgaps - -#-# Miscellaneous #-# -## Lock Screen -super + BackSpace - slock -## Quit Current App -super + q - kill -15 `xdotool getwindowfocus getwindowpid` -## Change Keyboard Layout -alt + Return - layouttoggle -## Toggle Compositor -super + c - killall picom || setsid picom -## Open this manual -super + alt + shift + h - manualgen -## Start colorpicker (Jack12816/colorpicker) -super + shift + c - colorhandler - -#-# Standard Applications #-# -## Terminal window -super + Return - $TERMINAL -## Default Browser -super + w - $BROWSER -## Quickly Search DuckDuckGo -super + shift + w - ducksearch -## TUI Email Client (neomutt) -super + e - kill -46 $(pidof dwmblocks) && killall neomutt || $TERMINAL -e neomutt && kill -46 $(pidof dwmblocks) - -#-# Floating Apps/Utilities #-# -## Network Manager -XF86WLAN - killall nmtui || dropdowntoggle network nmtui -## TUI Audio Mixer (pulsemixer) -super + shift + p - killall pulsemixer || dropdowntoggle audio pulsemixer -## Display selector (connect to projector/secondary monitor) -super + p - displayselect -## TODOs (orgmode-nvim) -super + space - dropdowntoggle orgmode nvim "$HOME/Dropbox/org/index.org" -## Terminal Calculator -super + a - dropdowntoggle calc tmux-py -## Terminal Shell -super + shift + a - dropdowntoggle shell tmux-shell -## Terminal remote session (ssh) -super + r - sshchoose - -#-# Prompts (dmenu) #-# -## Application Launcher -super + d - j4-dmenu-desktop -## Emoji & Font-Awesome Selector -alt + grave - emoji-copy -## Mount/Unmount Devices Utility -alt + {_,shift} + m - { mountmenu, umountmenu } -## Recording Utility -alt + r - recordmenu kill || recordmenu -## Start SSH session -alt + s - pickssh -## Select bright or dark .Xresources theme -alt + Escape - theme="$(ls $HOME/.config/Xresources/ | dmenu)" && cat "$HOME/.config/Xresources/$theme" | xrdb -load - -#-# PrintScreen Utilities #-# -## All displays -Print - scrot && notify-send -a " Screenshot" "Stitched screenshot completed" -## Current window -alt + Print - scrot -q 100 -u -z && notify-send -i "$HOME/.fonts/svg/image.svg" -a " Screenshot" "Window screenshot completed" -## Cursor Selection -super + Print - scrot -q 100 -s -z && notify-send -i "$HOME/.fonts/svg/image.svg" -a " Screenshot" "Selection screenshot completed" - -#-# Special Keys #-# -## Control Network Manager -XF86AudioMedia - killall nmtui || dropdowntoggle network nmtui -## Control Bluetooth -shift + XF86AudioMedia - killall bluetuith || dropdowntoggle bluetooth bluetuith -## Increase/decrease Volume -{XF86AudioRaiseVolume, XF86AudioLowerVolume} - volumectl 5 {+,-} -## Max-Out Volume -shift + XF86AudioRaiseVolume - volumectl 100 -## Set Volume to 5 percent -shift + XF86AudioLowerVolume - volumectl 5 -## Mute Audio -XF86AudioMute - volumectl mute -## Increase/decrease Brightness -{XF86MonBrightnessUp, XF86MonBrightnessDown} - backlightctl -{i,d} 5 -## Set brightness to maximum -shift + XF86MonBrightnessUp - backlightctl -s 100 -## Set brightness to minimum -shift + XF86MonBrightnessDown - backlightctl -s 0 -## Fix games with MX Master mouse -ctrl + alt + Tab - dwmc focusmon +1 && sleep 0.1 && dwmc focusmon +1 - -#-# Music Controls (using `playerctl`) #-# -## Next/Previous Song (using playerctl) -super + {bracketright, bracketleft} - playerctl {next, previous} -## Toggle music playback -super + backslash - playerctl play-pause diff --git a/.config/tofi/config b/.config/tofi/config index 8130030..ed84c33 100644 --- a/.config/tofi/config +++ b/.config/tofi/config @@ -1,4 +1,3 @@ -matching-algorithm = fuzzy anchor = center width = 30% height = 40% diff --git a/.config/waybar/config.json b/.config/waybar/config.json index 70606e5..60e5019 100644 --- a/.config/waybar/config.json +++ b/.config/waybar/config.json @@ -19,7 +19,6 @@ "modules-right": [ "custom/dotfiles", "custom/mail", - "custom/eselect", "custom/layout", "custom/date", "custom/time", diff --git a/.local/bin/dropbox-restore b/.local/bin/dropbox-restore index 3c1fcc7..54157d4 100755 --- a/.local/bin/dropbox-restore +++ b/.local/bin/dropbox-restore @@ -19,13 +19,13 @@ else exit 1 fi -excluded_files=$(dropbox-cli exclude list | awk '{print $1}' | sed 's/\/$//') +excluded_files=$(maestral excluded list) if [ -z "$excluded_files" ]; then notify-send -a " Dropbox" "No files are excluded in this directory." exit 1 fi -echo "$excluded_files" | dmenu -w "$(xdotool getactivewindow)" -p " Select a file to restore:" | while read -r file; do - dropbox-cli exclude remove "$file" +echo "$excluded_files" | tofi -p " Select a file to restore:" | while read -r file; do + maestral excluded remove "$file" done diff --git a/.local/bin/rotdir b/.local/bin/rotdir new file mode 100755 index 0000000..d171f29 --- /dev/null +++ b/.local/bin/rotdir @@ -0,0 +1,12 @@ +#!/bin/sh + +# When I open an image from the file manager in nsxiv (the image viewer), I want +# to be able to press the next/previous keys to key through the rest of the +# images in the same directory. This script "rotates" the content of a +# directory based on the first chosen file, so that if I open the 15th image, +# if I press next, it will go to the 16th etc. Autistic, I know, but this is +# one of the reasons that nsxiv is great for being able to read standard input. + +[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1 +base="$(basename "$1")" +ls "$PWD" | awk -v BASE="$base" 'BEGIN { lines = ""; m = 0; } { if ($0 == BASE) { m = 1; } } { if (!m) { if (lines) { lines = lines"\n"; } lines = lines""$0; } else { print $0; } } END { print lines; }' @@ -14,7 +14,7 @@ unsetopt PROMPT_SP 2>/dev/null export EDITOR=nvim export TERMINAL=foot export TERMINAL_PROG=foot -export BROWSER=firefox-bin +export BROWSER=firefox # Misc export XDG_CONFIG_HOME="$HOME/.config" @@ -83,8 +83,14 @@ fi # Start Desktop Environment if on the main TTY [ "$(tty)" = "/dev/tty1" ] && ! pidof river >/dev/null 2>&1 && { - dbus-launch --exit-with-session river -no-xwayland + dbus-launch --exit-with-session river -no-xwayland & + /usr/bin/pipewire & + /usr/bin/wireplumber & + /usr/bin/pipewire-pulse & } [ "$(tty)" = "/dev/tty2" ] && ! pidof river >/dev/null 2>&1 && { - dbus-launch --exit-with-session river + dbus-launch --exit-with-session river & + /usr/bin/pipewire & + /usr/bin/wireplumber & + /usr/bin/pipewire-pulse & } |