Merge branch 'master' of ssh://git.lyte.dev:2222/lytedev/dotfiles

This commit is contained in:
Daniel Flanagan 2021-05-29 22:52:11 -05:00
commit 088545b9cc
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
14 changed files with 55 additions and 71 deletions

View file

@ -5,6 +5,7 @@ set -x
umask 077 umask 077
d="$(date +"%Y-%m-%d_%H-%M-%S")" d="$(date +"%Y-%m-%d_%H-%M-%S")"
fn="$SCROTS_PATH/clipshot_$d.png" fn="$SCROTS_PATH/clipshot_$d.png"
mkdir -p "$SCROTS_PATH"
if is_wayland; then if is_wayland; then
dim="$(slurp -d)" dim="$(slurp -d)"

View file

@ -12,6 +12,7 @@ files $dfp/common/envs | \
--preview="ls -la --color=always {}" | \ --preview="ls -la --color=always {}" | \
string trim | \ string trim | \
read -a -d \n -z lines read -a -d \n -z lines
mkdir -p $ENV_PATH
for l in $lines for l in $lines
test $l = "" && continue test $l = "" && continue
set ll (string replace -a / - $l) set ll (string replace -a / - $l)

View file

@ -8,7 +8,8 @@ set lock_file $HOME/.using-lytedev-dotfiles.lock
if not test -f $lock_file if not test -f $lock_file
echo This will delete existing files. Make sure you know what you\'re doing. 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) set response (string lower $response)
if string match $response y if string match $response y
echo "agreed" > "$lock_file" echo "agreed" > "$lock_file"
@ -51,7 +52,6 @@ l common/kitty $c/kitty
l common/mutt/rc $h/.muttrc l common/mutt/rc $h/.muttrc
l common/git/config $h/.gitconfig l common/git/config $h/.gitconfig
l common/elixir/iex.exs $h/.iex.exs l common/elixir/iex.exs $h/.iex.exs
l common/data/user-dirs $c/user-dirs.dirs
popd popd
for s in $c/lytedev-env/*/dotfiles-setup.d.fish for s in $c/lytedev-env/*/dotfiles-setup.d.fish

View file

@ -5,7 +5,7 @@
key="$1"; shift key="$1"; shift
args=("$@") 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="$?"
[[ $otp_status != 0 ]] && { echo "pass command failed with exit code $otp_status"; exit 1; } [[ $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; } [[ -z $otp ]] && { echo "No OTP secret found for pass entry '$key'"; exit 2; }

View file

@ -13,7 +13,7 @@ end
status --is-interactive || exit 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 for f in key-bindings colors prompt aliases
source $FISH_PATH/$f.fish source $FISH_PATH/$f.fish
end 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) test -f /proc/sys/kernel/pty/nr && printf "%6d PTYs open\n" (cat /proc/sys/kernel/pty/nr)
end 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 # 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 # nonsense that clutters it up and that they have a preferred starting
# directory where they keep the stuff they actually care about # directory where they keep the stuff they actually care about
@ -47,9 +56,3 @@ end
if test $PWD = $HOME; or test $PWD = $NICE_HOME; if test $PWD = $HOME; or test $PWD = $NICE_HOME;
cd $NICE_HOME || cd cd $NICE_HOME || cd
end 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

View file

@ -2,7 +2,7 @@
set -Ux GOPATH $HOME/.go set -Ux GOPATH $HOME/.go
set -U fish_user_paths \ set paths_candidates \
$HOME/.go \ $HOME/.go \
$GOPATH/bin \ $GOPATH/bin \
$DOTFILES_PATH/common/bin \ $DOTFILES_PATH/common/bin \
@ -12,15 +12,16 @@ set -U fish_user_paths \
$HOME/.yarn/bin \ $HOME/.yarn/bin \
$HOME/.netlify/helper/bin $HOME/.netlify/helper/bin
for d in $ENV_PATH/*/bin set -ge fish_user_paths
test -d $d && set -Ua fish_user_paths $d for d in $paths_candidates $ENV_PATH/*/bin
test -d $d && set -gxa fish_user_paths $d
end end
test -d $HOME/.local/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 -Ua 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 python && set -gxa 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 ruby && set -gxa fish_user_paths (ruby -e 'print Gem.user_dir')/bin
if set -q NICE_HOME if set -q NICE_HOME
else else

View file

@ -1,6 +1,3 @@
[push]
default = current
[user] [user]
name = Daniel Flanagan name = Daniel Flanagan
email = daniel@lyte.dev email = daniel@lyte.dev

View file

@ -1,7 +1,7 @@
# Beware! This file is rewritten by htop when settings are changed in the interface. # Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly. # The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1 fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=47 sort_key=46
sort_direction=1 sort_direction=1
tree_sort_key=0 tree_sort_key=0
tree_sort_direction=1 tree_sort_direction=1

View file

@ -1,2 +1,2 @@
set e $argv[1] set e $argv[1]
set -Ua fish_user_paths $e/bin set -gxa fish_user_paths $e/bin

View file

@ -11,7 +11,7 @@ fi
# TODO: switch to Nautilus? # TODO: switch to Nautilus?
yay -Sy \ yay -Sy --needed \
xf86-input-libinput \ xf86-input-libinput \
libinput libinput-gestures `# Trackpad Control` \ libinput libinput-gestures `# Trackpad Control` \
bluez bluez-libs bluez-utils bluez-tools `# Bluetooth` \ bluez bluez-libs bluez-utils bluez-tools `# Bluetooth` \
@ -46,7 +46,7 @@ yay -Sy \
firefox-nightly `# Default Web Browser` \ firefox-nightly `# Default Web Browser` \
alsa-utils `# Audio Utilities` \ alsa-utils `# Audio Utilities` \
alsa-plugins `# Plugins for ALSA` \ alsa-plugins `# Plugins for ALSA` \
pulseaudio pavucontrol pulsemixer `# Audio Backend and Controls` \ pavucontrol pulsemixer `# Audio Backend and Controls` \
playerctl `# Media Keys Controls` \ playerctl `# Media Keys Controls` \
feh `# Image Viewer & Wallpaper Manager` \ feh `# Image Viewer & Wallpaper Manager` \
wlroots sway `# Wayland Compositor` \ wlroots sway `# Wayland Compositor` \
@ -57,7 +57,7 @@ yay -Sy \
slurp grim wl-clipboard `# Sway Screen Selection & Clipping` \ slurp grim wl-clipboard `# Sway Screen Selection & Clipping` \
pipewire pipewire-pulse pipewire-media-session `# Pipewire` \ pipewire pipewire-pulse pipewire-media-session `# Pipewire` \
xdg-desktop-portal xdg-desktop-portal-wlr `# Screensharing` \ xdg-desktop-portal xdg-desktop-portal-wlr `# Screensharing` \
obs-studio-wayland obs-xdg-portal `# OBS` \ obs-studio `# OBS` \
ttf-iosevka `# Primary Fonts` \ ttf-iosevka `# Primary Fonts` \
ttf-font-awesome `# Icon Font` \ ttf-font-awesome `# Icon Font` \
ripcord `# Discord and Slack Client` ripcord `# Discord and Slack Client`

View file

@ -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 { profile desktop-H-2x4kside2 {
output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 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 1440,800 scale 1 transform normal 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 4880,0 scale 1.5 transform 90 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" 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 { profile tv4k {
output "Samsung Electric Company CF791 HTRJ500315" disable output "Samsung Electric Company CF791 HTRJ500315" disable
output "Samsung Electric Company SyncMaster H1AK500000" enable mode 4096x2160@60Hz position 0,0 scale 1 transform normal 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" 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 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"
}

View file

@ -2,20 +2,15 @@
# kanshi will potentially run this more than once # kanshi will potentially run this more than once
LOCKFILE="/tmp/lytedev-kanshi-workspace-arranging.lock" LOCKFILE="/tmp/lytedev-kanshi-workspace-arranging.lock"
if ! [[ -f $LOCKFILE ]]; then [[ -f $LOCKFILE ]] && { echo "Already locked: $LOCKFILE" >&2; exit 1; }
touch "$LOCKFILE" touch "$LOCKFILE"
# TODO: something is pretty broken with sway/kanshi right now
sleep 0.1 sleep 0.1
# TODO: some way to ensure the lock file is cleaned up?
# maybe check if the file is older than a minute?
move_workspace() { swaymsg workspace "$1"; swaymsg move workspace to "'$2'"; } 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() { out="$1"; shift; while (($#)); do move_workspace "$1" "$out"; shift; done; }
set -x 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
setup_output 'Dell Inc. DELL U2720Q CWTM623' 9 8 setup_output 'Dell Inc. DELL U2720Q CWTM623' 9 8
setup_output 'Dell Inc. DELL U2720Q D3TM623' 6 5 setup_output 'Dell Inc. DELL U2720Q D3TM623' 6 5
@ -24,12 +19,4 @@ if ! [[ -f $LOCKFILE ]]; then
setup_output 'Dell Inc. DELL U2720Q D3TM623' 4 setup_output 'Dell Inc. DELL U2720Q D3TM623' 4
setup_output 'Samsung Electric Company CF791 HTRJ500315' 1 setup_output 'Samsung Electric Company CF791 HTRJ500315' 1
# 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
rm "$LOCKFILE" rm "$LOCKFILE"
else
echo "Already locked: $LOCKFILE" >&2
exit 1
fi

View file

@ -157,6 +157,9 @@ mode "resize" {
bindsym escape mode "default" bindsym escape mode "default"
} }
for_window [title="."] title_format "<span background="#111111">%title</span>"
for_window [app_id="__focused__"] title_format "<span background="#111111">%title</span>"
for_window [app_id="floating_terminal"] floating enable for_window [app_id="floating_terminal"] floating enable
for_window [class="floating_terminal"] floating enable for_window [class="floating_terminal"] floating enable
# for_window [class=".*"] layout splitv # for_window [class=".*"] layout splitv