From 2ffe54a061ac8c68506cf4fcd4b0bc840b384189 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 11 Feb 2021 10:52:13 -0600 Subject: [PATCH 1/3] Fix desktop, reduce exa color noise --- apps/de/kanshi/config | 6 ++++-- apps/de/sway/config | 1 + apps/de/waybar/config | 2 +- apps/shell/fish/config.fish | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/de/kanshi/config b/apps/de/kanshi/config index 26e0f35..7a18f1b 100644 --- a/apps/de/kanshi/config +++ b/apps/de/kanshi/config @@ -5,10 +5,12 @@ profile desktop-H { exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-H-workspaces.sh" } -profile desktop-H { - output "Samsung Electric Company SyncMaster H1AK500000" enable mode 3840x2160 position 0,0 scale 1 transform normal +profile tv4k { + output "Samsung Electric Company CF791 HTRJ500315" disable output "Dell Inc. DELL U2719DC 5DL4QS2" disable output "Dell Inc. DELL U2719DC 9DL4QS2" disable + output "Samsung Electric Company SyncMaster H1AK500000" enable mode 4096x2160@60Hz position 0,0 scale 1 transform normal + # exec "$HOME/.config/lytedev-dotfiles/apps/de/kanshi/desktop-H-workspaces.sh" } profile desktop-H { diff --git a/apps/de/sway/config b/apps/de/sway/config index f55afa9..a3ed737 100644 --- a/apps/de/sway/config +++ b/apps/de/sway/config @@ -47,6 +47,7 @@ bindsym $mod+shift+alt+return exec kitty bindsym $mod+c kill bindsym $mod+shift+c kill # TODO: kill -9? bindsym $mod+space exec $dfpbin/app-launcher +bindsym $mod+shift+s exec $dfpbin/clipshot bindsym $mod+e exec thunar bindsym $mod+shift+r reload bindsym $mod+control+Escape exit diff --git a/apps/de/waybar/config b/apps/de/waybar/config index 9b2fa63..c4d9122 100644 --- a/apps/de/waybar/config +++ b/apps/de/waybar/config @@ -1,7 +1,7 @@ { "layer": "top", "position": "bottom", - "output": ["DP-1", "eDP-1"], + "output": ["DP-1"], "height": 32, "modules-left": ["sway/workspaces"], "modules-center": ["clock"], diff --git a/apps/shell/fish/config.fish b/apps/shell/fish/config.fish index 7b11961..da5498a 100755 --- a/apps/shell/fish/config.fish +++ b/apps/shell/fish/config.fish @@ -19,6 +19,7 @@ set -Ux BROWSER firefox-developer-edition set -Ux ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history set -Ux LESS "-r" set -Ux LS_COLORS 'ow=01;36;40' # more sane ls colors +set -Ux EXA_COLORS '*=0' set -Ux EDITOR nvim set -Ux VISUAL nvim set -Ux PAGER less From 7cdad89918dbff8c34286a8c5f15536a89e92dd4 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 18 Feb 2021 13:26:10 -0600 Subject: [PATCH 2/3] Work on backups script --- apps/de/sway/config | 1 + bin/backupify | 21 +++++++++++++++++++++ bin/bupstash-wip | 14 ++++++++++++++ bin/unbackupify | 18 ++++++++++++++++++ env/nix/machines/virt.nix | 0 5 files changed, 54 insertions(+) create mode 100755 bin/backupify create mode 100755 bin/bupstash-wip create mode 100755 bin/unbackupify create mode 100644 env/nix/machines/virt.nix diff --git a/apps/de/sway/config b/apps/de/sway/config index a3ed737..2d6de5f 100644 --- a/apps/de/sway/config +++ b/apps/de/sway/config @@ -169,6 +169,7 @@ client.unfocused #111111 #111111 #ffffff #111111 #111111 exec_always 'killall kanshi; kanshi' exec mako +exec pipewire exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." bar { diff --git a/bin/backupify b/bin/backupify new file mode 100755 index 0000000..6ec5004 --- /dev/null +++ b/bin/backupify @@ -0,0 +1,21 @@ +#!/usr/bin/env fish + +set host rift +set dir /storage/daniel/backups +set ext .tar.zstd.gpg + +if not set -q argv[1] + echo "No directory provided" + exit 2 +end +if not test -d $argv[1] + echo "Invalid directory given: $argv[1]" + exit 1 +end +set fn (date +%Y%m%d_%H%M%S)(basename $argv[1]) +tar -cvf - $argv[1] 2>/dev/null | + zstd --ultra -T2 -22 | + gpg --encrypt --recipient daniel@lyte.dev | + ssh $host "cat - > $dir/$fn$ext" +# TODO: checksum? +echo "Uploaded to host rift via ssh at $dir/$fn$ext" diff --git a/bin/bupstash-wip b/bin/bupstash-wip new file mode 100755 index 0000000..e8417a6 --- /dev/null +++ b/bin/bupstash-wip @@ -0,0 +1,14 @@ +#!/usr/bin/env fish + +set keyfile $HOME/.bupstash/backups.key +if not test -f $keyfile + echo Loading key from pass... + pass bupstash | tail -n+3 > $keyfile; or begin; + echo Failed to load key from pass + exit 1 + end +end + +set rift ssh://rift/storage/daniel-backups + +bupstash init --repository $rift diff --git a/bin/unbackupify b/bin/unbackupify new file mode 100755 index 0000000..92a8e6e --- /dev/null +++ b/bin/unbackupify @@ -0,0 +1,18 @@ +#!/usr/bin/env fish + +set host rift +set dir /storage/daniel/backups +set ext .tar.zstd.gpg + +if not set -q argv[1] + echo "No backup filename provided" + exit 2 +end +# TODO: autocomplete? +# TODO: checksum? +set fn $argv[1] +ssh $host "cat $dir/$fn$ext" | + gpg --decrypt | + zstd --ultra -T2 -22 -dc | + tar -xvf - +echo "Restored!" diff --git a/env/nix/machines/virt.nix b/env/nix/machines/virt.nix new file mode 100644 index 0000000..e69de29 From c757c40ce74cdc0b959e9e027a82e2ed7dbd7c83 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 18 Feb 2021 13:30:21 -0600 Subject: [PATCH 3/3] Force relative paths in tar --- bin/backupify | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/backupify b/bin/backupify index 6ec5004..2934892 100755 --- a/bin/backupify +++ b/bin/backupify @@ -13,9 +13,11 @@ if not test -d $argv[1] exit 1 end set fn (date +%Y%m%d_%H%M%S)(basename $argv[1]) -tar -cvf - $argv[1] 2>/dev/null | +pushd (dirname $argv[1]) +tar cvf - (basename $argv[1]) 2>/dev/null | zstd --ultra -T2 -22 | gpg --encrypt --recipient daniel@lyte.dev | ssh $host "cat - > $dir/$fn$ext" +popd # TODO: checksum? echo "Uploaded to host rift via ssh at $dir/$fn$ext"