diff --git a/common/bin/clipshot b/common/bin/clipshot index c4b4d4d..8becd5a 100755 --- a/common/bin/clipshot +++ b/common/bin/clipshot @@ -5,6 +5,7 @@ set -x umask 077 d="$(date +"%Y-%m-%d_%H-%M-%S")" fn="$SCROTS_PATH/clipshot_$d.png" +mkdir -p "$SCROTS_PATH" if is_wayland; then dim="$(slurp -d)" diff --git a/common/bin/dotfiles-link-environments b/common/bin/dotfiles-link-environments index 8718fad..0d157d0 100755 --- a/common/bin/dotfiles-link-environments +++ b/common/bin/dotfiles-link-environments @@ -12,6 +12,7 @@ files $dfp/common/envs | \ --preview="ls -la --color=always {}" | \ string trim | \ read -a -d \n -z lines +mkdir -p $ENV_PATH for l in $lines test $l = "" && continue set ll (string replace -a / - $l) diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 2f86dc9..4a29504 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -8,7 +8,8 @@ set lock_file $HOME/.using-lytedev-dotfiles.lock if not test -f $lock_file echo This will delete existing files. Make sure you know what you\'re doing. - read -r -p "Are you sure you want to continue? [y/N] " response + printf 'Are you sure you want to continue? [y/N] ' + read response set response (string lower $response) if string match $response y echo "agreed" > "$lock_file" @@ -51,7 +52,6 @@ l common/kitty $c/kitty l common/mutt/rc $h/.muttrc l common/git/config $h/.gitconfig l common/elixir/iex.exs $h/.iex.exs -l common/data/user-dirs $c/user-dirs.dirs popd for s in $c/lytedev-env/*/dotfiles-setup.d.fish diff --git a/common/bin/pass-otp b/common/bin/pass-otp index 92f9a1d..023a8d3 100755 --- a/common/bin/pass-otp +++ b/common/bin/pass-otp @@ -5,7 +5,7 @@ key="$1"; shift args=("$@") -otp="$(set -e; pass "$key" 2>/dev/null | grep -Pi '^otp.*: ?.*$' | cut -d ':' -f 2 | sed 's/ //g')" +otp="$(set -e; pass "$key" 2>/dev/null | grep -Pi '^otp' | cut -d ':' -f 2 | sed 's/ //g')" otp_status="$?" [[ $otp_status != 0 ]] && { echo "pass command failed with exit code $otp_status"; exit 1; } [[ -z $otp ]] && { echo "No OTP secret found for pass entry '$key'"; exit 2; } diff --git a/common/fish/config.fish b/common/fish/config.fish index f3fa1b2..68d5af2 100755 --- a/common/fish/config.fish +++ b/common/fish/config.fish @@ -13,7 +13,7 @@ end status --is-interactive || exit -$DOTFILES_PATH/common/colors/vconsole +test (uname) = Linux && $DOTFILES_PATH/common/colors/vconsole for f in key-bindings colors prompt aliases source $FISH_PATH/$f.fish end @@ -40,6 +40,15 @@ function fish_greeting; test -f /proc/sys/kernel/pty/nr && printf "%6d PTYs open\n" (cat /proc/sys/kernel/pty/nr) end +if has_command brew && test -f (brew --prefix asdf)/lib/asdf.fish + set -Ux ASDF_DIR (brew --prefix asdf) + source (brew --prefix asdf)/lib/asdf.fish +else if test -f $HOME/.asdf/asdf.fish + source $HOME/.asdf/asdf.fish +else if test -f /opt/asdf-vm/asdf.fish + source /opt/asdf-vm/asdf.fish +end + # assume the user uses "$HOME" to just store their mess of dotfiles and other # nonsense that clutters it up and that they have a preferred starting # directory where they keep the stuff they actually care about @@ -47,9 +56,3 @@ end if test $PWD = $HOME; or test $PWD = $NICE_HOME; cd $NICE_HOME || cd end - -if test -f $HOME/.asdf/asdf.fish - source $HOME/.asdf/asdf.fish -else if test -f /opt/asdf-vm/asdf.fish - source /opt/asdf-vm/asdf.fish -end diff --git a/common/fish/paths.fish b/common/fish/paths.fish index 868668d..e5256aa 100755 --- a/common/fish/paths.fish +++ b/common/fish/paths.fish @@ -2,7 +2,7 @@ set -Ux GOPATH $HOME/.go -set -U fish_user_paths \ +set paths_candidates \ $HOME/.go \ $GOPATH/bin \ $DOTFILES_PATH/common/bin \ @@ -12,15 +12,16 @@ set -U fish_user_paths \ $HOME/.yarn/bin \ $HOME/.netlify/helper/bin -for d in $ENV_PATH/*/bin - test -d $d && set -Ua fish_user_paths $d +set -ge fish_user_paths +for d in $paths_candidates $ENV_PATH/*/bin + test -d $d && set -gxa fish_user_paths $d end -test -d $HOME/.local/bin && set -Ua fish_user_paths $HOME/.local/bin -test -d $HOME/.bin && set -Ua fish_user_paths $HOME/.local/bin +test -d $HOME/.local/bin && set -gxa fish_user_paths $HOME/.local/bin +test -d $HOME/.bin && set -gxa fish_user_paths $HOME/.local/bin -has_command python && set -Ua fish_user_paths (python -m site --user-base)/bin -has_command ruby && set -Ua fish_user_paths (ruby -e 'print Gem.user_dir')/bin +has_command python && set -gxa fish_user_paths (python -m site --user-base)/bin +has_command ruby && set -gxa fish_user_paths (ruby -e 'print Gem.user_dir')/bin if set -q NICE_HOME else diff --git a/common/git/config b/common/git/config index ad2210f..bf05120 100644 --- a/common/git/config +++ b/common/git/config @@ -1,6 +1,3 @@ -[push] - default = current - [user] name = Daniel Flanagan email = daniel@lyte.dev diff --git a/common/htop/rc b/common/htop/rc index c340c95..9e52749 100644 --- a/common/htop/rc +++ b/common/htop/rc @@ -1,7 +1,7 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=47 +sort_key=46 sort_direction=1 tree_sort_key=0 tree_sort_direction=1 diff --git a/host/laptop/third/config.d.fish b/host/laptop/third/config.d.fish index 956d991..3e438fa 100644 --- a/host/laptop/third/config.d.fish +++ b/host/laptop/third/config.d.fish @@ -1,2 +1,2 @@ set e $argv[1] -set -Ua fish_user_paths $e/bin +set -gxa fish_user_paths $e/bin diff --git a/os/linux/arch/provision.d/optional/ui-packages.bash b/os/linux/arch/provision.d/optional/ui-packages.bash index c5bb29f..7eda7dd 100755 --- a/os/linux/arch/provision.d/optional/ui-packages.bash +++ b/os/linux/arch/provision.d/optional/ui-packages.bash @@ -11,7 +11,7 @@ fi # TODO: switch to Nautilus? -yay -Sy \ +yay -Sy --needed \ xf86-input-libinput \ libinput libinput-gestures `# Trackpad Control` \ bluez bluez-libs bluez-utils bluez-tools `# Bluetooth` \ @@ -46,7 +46,7 @@ yay -Sy \ firefox-nightly `# Default Web Browser` \ alsa-utils `# Audio Utilities` \ alsa-plugins `# Plugins for ALSA` \ - pulseaudio pavucontrol pulsemixer `# Audio Backend and Controls` \ + pavucontrol pulsemixer `# Audio Backend and Controls` \ playerctl `# Media Keys Controls` \ feh `# Image Viewer & Wallpaper Manager` \ wlroots sway `# Wayland Compositor` \ @@ -57,7 +57,7 @@ yay -Sy \ slurp grim wl-clipboard `# Sway Screen Selection & Clipping` \ pipewire pipewire-pulse pipewire-media-session `# Pipewire` \ xdg-desktop-portal xdg-desktop-portal-wlr `# Screensharing` \ - obs-studio-wayland obs-xdg-portal `# OBS` \ + obs-studio `# OBS` \ ttf-iosevka `# Primary Fonts` \ ttf-font-awesome `# Icon Font` \ ripcord `# Discord and Slack Client` diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 5043f1d..6a21bae 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -1,20 +1,17 @@ -profile desktop-1x4kside { - output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 0,1200 scale 1 transform normal - output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 3440,0 scale 1.5 transform 90 -} - -profile desktop-1x4kside2 { - output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal - output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 -} - profile desktop-H-2x4kside2 { - output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 - output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal - output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 4880,0 scale 1.5 transform 90 + output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1 transform 270 + output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 2160,1200 scale 1 transform normal + output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 5600,0 scale 1 transform 90 exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" } +# profile desktop-H-2x4kside2 { +# output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 +# output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal +# output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 4880,0 scale 1.5 transform 90 +# exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" +# } + profile tv4k { output "Samsung Electric Company CF791 HTRJ500315" disable output "Samsung Electric Company SyncMaster H1AK500000" enable mode 4096x2160@60Hz position 0,0 scale 1 transform normal @@ -25,12 +22,6 @@ profile desktop-ultrawide { exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-single-workspace.sh" } -profile laptop-solo { +profile laptop { output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 2 transform normal } - -profile laptop-single-ext-mon { - output "Dell Inc. DELL U2719DC 9CL4QS2" enable mode 2560x1440@60Hz position 0,0 scale 1 transform normal - output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,1440 scale 2 transform normal - exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/laptop-workspaces.sh" -} diff --git a/os/linux/kanshi/desktop-H-workspaces.sh b/os/linux/kanshi/desktop-H-workspaces.sh index e48ce03..2cb03a8 100755 --- a/os/linux/kanshi/desktop-H-workspaces.sh +++ b/os/linux/kanshi/desktop-H-workspaces.sh @@ -2,34 +2,21 @@ # kanshi will potentially run this more than once LOCKFILE="/tmp/lytedev-kanshi-workspace-arranging.lock" -if ! [[ -f $LOCKFILE ]]; then - touch "$LOCKFILE" - # TODO: something is pretty broken with sway/kanshi right now - sleep 0.1 - # TODO: some way to ensure the lock file is cleaned up? - # maybe check if the file is older than a minute? +[[ -f $LOCKFILE ]] && { echo "Already locked: $LOCKFILE" >&2; exit 1; } - move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; } - setup_output() { out="$1"; shift; while (($#)); do move_workspace "$1" "$out"; shift; done; } +touch "$LOCKFILE" +sleep 0.1 - set -x - # setup_output 'Dell Inc. DELL U2719DC 9DL4QS2' 7 8 9 - # setup_output 'Dell Inc. DELL U2719DC 5DL4QS2' 4 5 6 - # setup_output 'Samsung Electric Company CF791 HTRJ500315' 1 2 3 +move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; } +setup_output() { out="$1"; shift; while (($#)); do move_workspace "$1" "$out"; shift; done; } - setup_output 'Dell Inc. DELL U2720Q CWTM623' 9 8 - setup_output 'Dell Inc. DELL U2720Q D3TM623' 6 5 - setup_output 'Samsung Electric Company CF791 HTRJ500315' 3 2 - setup_output 'Dell Inc. DELL U2720Q CWTM623' 7 - setup_output 'Dell Inc. DELL U2720Q D3TM623' 4 - setup_output 'Samsung Electric Company CF791 HTRJ500315' 1 +set -x - # setup_output 'Dell Inc. DELL U2719DC 9DL4QS2' 8 9 7 - # setup_output 'Dell Inc. DELL U2719DC 5DL4QS2' 5 6 4 - # setup_output 'Samsung Electric Company CF791 HTRJ500315' 2 3 1 +setup_output 'Dell Inc. DELL U2720Q CWTM623' 9 8 +setup_output 'Dell Inc. DELL U2720Q D3TM623' 6 5 +setup_output 'Samsung Electric Company CF791 HTRJ500315' 3 2 +setup_output 'Dell Inc. DELL U2720Q CWTM623' 7 +setup_output 'Dell Inc. DELL U2720Q D3TM623' 4 +setup_output 'Samsung Electric Company CF791 HTRJ500315' 1 - rm "$LOCKFILE" -else - echo "Already locked: $LOCKFILE" >&2 - exit 1 -fi +rm "$LOCKFILE" diff --git a/os/linux/sway/config b/os/linux/sway/config index 7dee090..ea9973c 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -157,6 +157,9 @@ mode "resize" { bindsym escape mode "default" } +for_window [title="."] title_format "%title" +for_window [app_id="__focused__"] title_format "%title" + for_window [app_id="floating_terminal"] floating enable for_window [class="floating_terminal"] floating enable # for_window [class=".*"] layout splitv diff --git a/common/data/user-dirs b/os/linux/user-dirs similarity index 100% rename from common/data/user-dirs rename to os/linux/user-dirs