From 71308fd9d5dfbd4e4fe3092aecd6883639400e69 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Thu, 31 Oct 2024 16:23:48 -0600 Subject: [PATCH] R.I.P. Tycho Station --- .config/alacritty/alacritty.toml##default | 4 +- .config/alacritty/alacritty.yml | 92 --------------- .config/eww/eww.scss | 2 + .config/eww/eww.yuck##hostname.tycho | 13 +- .../eww/modules/network.yuck##hostname.tycho | 111 ++++++++++++++++++ .config/eww/scripts/sway.py | 12 +- .config/eww/windows.yuck | 14 ++- .config/htop/htoprc | 20 ++-- .config/sway/config | 4 +- .../display-arrangement.conf##hostname.tycho | 8 +- ...-gaps.conf##class.has-sidebar-5-workspaces | 10 +- ...kspace-arrangement.conf##class.tie-fighter | 28 ----- .config/sway/workspaces.json##hostname.tycho | 4 +- .config/yadm/encrypt | 1 + .local/bin/sway-find-workspace | 8 +- .local/share/yadm/archive | Bin 1266 -> 1259 bytes 16 files changed, 179 insertions(+), 152 deletions(-) delete mode 100644 .config/alacritty/alacritty.yml diff --git a/.config/alacritty/alacritty.toml##default b/.config/alacritty/alacritty.toml##default index c87e543..1f4c1a0 100644 --- a/.config/alacritty/alacritty.toml##default +++ b/.config/alacritty/alacritty.toml##default @@ -1,4 +1,3 @@ -working_directory = "/home/ezri" [bell] animation = "EaseOutSine" @@ -64,3 +63,6 @@ dynamic_padding = true dynamic_title = true opacity = 0.8 title = "Terminal" + +[general] +working_directory = "/home/ezri" diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml deleted file mode 100644 index acd84db..0000000 --- a/.config/alacritty/alacritty.yml +++ /dev/null @@ -1,92 +0,0 @@ -colors: - # Default colors - primary: - # background: '0x1b191b' - # foreground: '0x9a7c9d' - background: '0x1e1e1e' - foreground: '0x9a7c9d' - - # Normal colors - normal: - black: '0x2d272f' - red: '0xcf6a4c' - green: '0x8f9d6a' - yellow: '0xf9ee98' - blue: '0x7587a6' - magenta: '0x9b859d' - cyan: '0xafc4db' - white: '0xa7a7a7' - - # Bright colors - bright: - black: '0x3f3242' - red: '0xcf6a4c' - green: '0x8f9d6a' - yellow: '0xf9ee98' - blue: '0x7587a6' - magenta: '0x9b859d' - cyan: '0xafc4db' - white: '0xffffff' - - # normal: - # black: '0x453f45' - # red: '0xd27377' - # green: '0x7e9d7c' - # yellow: '0xd2c377' - # blue: '0x7587a6' - # magenta: '0xae96b0' - # cyan: '0xb0c4c2' - # white: '0xd6cad7' - - # bright: - # black: '0x453f45' - # red: '0xd27377' - # green: '0x7e9d7c' - # yellow: '0xd2c377' - # blue: '0x7587a6' - # magenta: '0xae96b0' - # cyan: '0xb0c4c2' - # white: '0xd6cad7' - -cursor: - - style: - blinking: Always - shape: underline - - -font: - size: 9 - - normal: - family: JetBrainsMono Nerd Font - style: Regular - bold: - family: JetBrainsMono Nerd Font - style: Bold - italic: - family: JetBrainsMono Nerd Font - style: Italic - bold_italic: - family: JetBrainsMono Nerd Font - style: Semibold Italic - -window: - title: Terminal - dynamic_title: true - opacity: 0.98 - dynamic_padding: true - -bell: - - animation: EaseOutSine - duration: 200 - color: '0x9a7c9d' - -working_directory: /home/ezri - -draw_bold_text_with_bright_colors: false - -debug: - render_timer: false - highlight_damage: false diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 26d935f..cbe9000 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -21,6 +21,8 @@ &.side { margin: 10px; + margin-top: 20px; + margin-right: 0px; } &.bg { diff --git a/.config/eww/eww.yuck##hostname.tycho b/.config/eww/eww.yuck##hostname.tycho index ada759f..ede8402 100644 --- a/.config/eww/eww.yuck##hostname.tycho +++ b/.config/eww/eww.yuck##hostname.tycho @@ -12,7 +12,7 @@ (defwindow leftbar :monitor 1 - :geometry (geometry :width "1440px" + :geometry (geometry :width "100%" :height "36px" :anchor "top center") :exclusive true @@ -51,6 +51,17 @@ (tycho-rightbar--left) (tycho-rightbar--center) (tycho-rightbar--right))) + +(defwindow sidebar + :monitor 1 + :geometry (geometry :width "200px" + :height "100%" + :anchor "left center") + :exclusive true + :focusable false + :stacking "fg" + (tycho-sidebar)) + (defwindow network-status diff --git a/.config/eww/modules/network.yuck##hostname.tycho b/.config/eww/modules/network.yuck##hostname.tycho index 6fede46..a92f2cd 100644 --- a/.config/eww/modules/network.yuck##hostname.tycho +++ b/.config/eww/modules/network.yuck##hostname.tycho @@ -234,3 +234,114 @@ (label :class {network--data.last_update.unix < clock--data.unix - 30 ? "highlight" : "special"} :text "${network--data.last_update.month}-${network--data.last_update.day} ${network--data.last_update.hour}:${network--data.last_update.minute}:${network--data.last_update.second}"))) )) + +(defwidget network-sidebar-details [] + (box :orientation "v" + :halign "start" + :class "module" + :space-evenly false + :spacing 5 + :width 200 + (box :orientation "h" + :halign "center" + :class "nebula" + :spacing 10 + :space-evenly false + (label :class "medium special" + :text "Comms")) + (box :orientation "h" + :halign "center" + :class "nebula" + :spacing 10 + :space-evenly false + (label :class "nebula green" + :text "Online" + :visible {network--data.online}) + (label :class "nebula highlight" + :text "Offline" + :visible {!network--data.online})) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Route On:") + "" + (box :halign "end" + (label :text "No Route" + :class "highlight" + :visible {network--data.online && !network--data.have_default_route}) + (label :text "${network--data.default_route}" + :class "special" + :visible {network--data.online && network--data.have_default_route}))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :valign "start" + :class "nebula" + "Address:") + "" + (box :halign "end" + :orientation "v" + (label :text "${network--data.default_interface.addresses[0].address}" + :class "special") + (label :text "/${network--data.default_interface.addresses[0].prefixlen}" + :halign "end" + :class "special"))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Public IP:") + "" + (box :halign "end" + (label :text "Offline" + :class "highlight" + :visible {!network--data.have_public_ip}) + (label :text {network--data.public_ip.ip} + :class "special" + :visible {network--data.have_public_ip}))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Gateway:") + "" + (box :halign "end" + (label :text "Error" + :class "highlight nebula" + :visible {!network--data.have_gateway}) + (label :text {network--data.gateway} + :class "special" + :visible {network--data.have_gateway}))) + (centerbox :orientation "h" + :halign "start" + :class "nebula" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + "VPN:") + "" + (box :halign "end" + (label :text "Offline" + :class "highlight" + :visible {!network--data.interfaces.ezrinet.online}) + (label :text "Online" + :class "green" + :visible {network--data.interfaces.ezrinet.online}))) + + )) + + diff --git a/.config/eww/scripts/sway.py b/.config/eww/scripts/sway.py index 0e62c3c..7eb13d9 100755 --- a/.config/eww/scripts/sway.py +++ b/.config/eww/scripts/sway.py @@ -48,7 +48,9 @@ class Workspace: self.alerted = False @classmethod - def parse_file(cls: type, filename: str) -> Tuple[WorkspaceTree, WorkspaceList]: + def parse_file( + cls: type, filename: str + ) -> Tuple[WorkspaceTree, WorkspaceList, str]: result = {} initial: dict = None @@ -75,7 +77,9 @@ class Workspace: for context, groups in initial["contexts"].items() } - return result, workspaces + default_context = initial.get("default_context", "personal") + + return result, workspaces, default_context @staticmethod def full_dictify(tree: WorkspaceTree): @@ -99,7 +103,7 @@ class Workspace: } -workspace_tree, workspace_list = Workspace.parse_file( +workspace_tree, workspace_list, default_context = Workspace.parse_file( f"{os.environ['HOME']}/.config/sway/workspaces.json" ) @@ -107,7 +111,7 @@ data = { "ws": {}, "mode": "default", "current": {}, - "context": "work" if gethostname() == "tycho.vpn.ezri.dev" else "personal", + "context": default_context, "visible": {}, } diff --git a/.config/eww/windows.yuck b/.config/eww/windows.yuck index cd88f73..a98918b 100644 --- a/.config/eww/windows.yuck +++ b/.config/eww/windows.yuck @@ -115,13 +115,23 @@ ;; Bars for Tycho Station ;; ;;; ;;; +(defwidget tycho-sidebar [] + (box :orientation "v" + :valign "start" + :space-evenly false + :spacing 20 + :class "root side" + (sideclock) + (network-sidebar-details) + (system-gauges))) + (defwidget tycho-leftbar--left [] (box :orientation "h" :halign "start" :space-evenly false :spacing 20 :class "leftbox" - (clock) + (system-name) )) (defwidget tycho-leftbar--center [] @@ -130,7 +140,7 @@ :space-evenly false :spacing 20 :class "centerbox" - (system-name) + )) (defwidget tycho-leftbar--right [] diff --git a/.config/htop/htoprc b/.config/htop/htoprc index a0a4d7a..d673940 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -38,20 +38,20 @@ column_meters_0=Hostname Blank Tasks LoadAverage Uptime Clock column_meter_modes_0=2 2 2 2 2 2 column_meters_1=AllCPUs2 Blank MemorySwap column_meter_modes_1=1 2 1 -tree_view=0 -sort_key=47 -tree_sort_key=46 -sort_direction=-1 -tree_sort_direction=-1 +tree_view=1 +sort_key=0 +tree_sort_key=0 +sort_direction=1 +tree_sort_direction=1 tree_view_always_by_pid=0 all_branches_collapsed=0 screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command -.sort_key=PERCENT_MEM -.tree_sort_key=PERCENT_CPU +.sort_key=PID +.tree_sort_key=PID .tree_view_always_by_pid=0 -.tree_view=0 -.sort_direction=-1 -.tree_sort_direction=-1 +.tree_view=1 +.sort_direction=1 +.tree_sort_direction=1 .all_branches_collapsed=0 screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command .sort_key=IO_RATE diff --git a/.config/sway/config b/.config/sway/config index 4b8d55b..e1564d6 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -30,8 +30,8 @@ set $colorwallpaper '#1e1e1e' output * bg '#1e1e1e' solid_color ## Include Device-Specific Configs -include display-arrangement.conf -include workspace-arrangement.conf +#include display-arrangement.conf +#include workspace-arrangement.conf ### ### # Window Management Keybinds # diff --git a/.config/sway/display-arrangement.conf##hostname.tycho b/.config/sway/display-arrangement.conf##hostname.tycho index 8e31ef1..5c4a657 100644 --- a/.config/sway/display-arrangement.conf##hostname.tycho +++ b/.config/sway/display-arrangement.conf##hostname.tycho @@ -7,10 +7,10 @@ set $centerdisplay "Hewlett Packard HP S340c CN490508SQ" set $rightdisplay "HP Inc. HP Z27n G2 6CM0151FD4" output { - $leftdisplay pos 0 0 mode 2560x1440@60Hz transform 270 - $leftdisplay bg ~/Images/Sidepaper.png center - $centerdisplay pos 1440 450 mode 3440x1440 transform 0 + $leftdisplay pos 0 450 mode 2560x1440@60Hz + $leftdisplay bg ~/Images/Wallpaper.png center + $centerdisplay pos 2560 450 mode 3440x1440 transform 0 $centerdisplay bg ~/Images/Wallpaper.png center - $rightdisplay pos 4880 0 mode 2560x1440@60Hz transform 90 + $rightdisplay pos 6000 0 mode 2560x1440@60Hz transform 90 $rightdisplay bg ~/Images/Sidepaper.png center } \ No newline at end of file diff --git a/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces b/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces index 7c2196d..9e2e779 100644 --- a/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces +++ b/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces @@ -3,9 +3,9 @@ #### #### workspace { - 1 gaps left 210 - 2 gaps left 210 - 3 gaps left 210 - 4 gaps left 210 - 5 gaps left 210 + # 1 gaps left 260 + # 2 gaps left 260 + # 3 gaps left 260 + # 4 gaps left 260 + # 5 gaps left 260 } diff --git a/.config/sway/workspace-arrangement.conf##class.tie-fighter b/.config/sway/workspace-arrangement.conf##class.tie-fighter index 467d0e4..3714e9a 100644 --- a/.config/sway/workspace-arrangement.conf##class.tie-fighter +++ b/.config/sway/workspace-arrangement.conf##class.tie-fighter @@ -36,31 +36,3 @@ workspace { 19 output $rightdisplay 20 output $rightdisplay } - -## Workspace Switching Keybinds -bindsym { - $mod+1 exec swaymsg workspace $(sway-find-workspace 1 ) - $mod+2 exec swaymsg workspace $(sway-find-workspace 2 ) - $mod+3 exec swaymsg workspace $(sway-find-workspace 3 ) - $mod+4 exec swaymsg workspace $(sway-find-workspace 4 ) - $mod+5 exec swaymsg workspace $(sway-find-workspace 5 ) - $mod+6 exec swaymsg workspace $(sway-find-workspace 6 ) - $mod+7 exec swaymsg workspace $(sway-find-workspace 7 ) - $mod+8 exec swaymsg workspace $(sway-find-workspace 8 ) - $mod+9 exec swaymsg workspace $(sway-find-workspace 9 ) - $mod+0 exec swaymsg workspace $(sway-find-workspace 10) -} - -## Window Reassignment Keybinds -bindsym { - $mod+Shift+1 exec swaymsg move container to workspace $(sway-find-workspace 1 ) - $mod+Shift+2 exec swaymsg move container to workspace $(sway-find-workspace 2 ) - $mod+Shift+3 exec swaymsg move container to workspace $(sway-find-workspace 3 ) - $mod+Shift+4 exec swaymsg move container to workspace $(sway-find-workspace 4 ) - $mod+Shift+5 exec swaymsg move container to workspace $(sway-find-workspace 5 ) - $mod+Shift+6 exec swaymsg move container to workspace $(sway-find-workspace 6 ) - $mod+Shift+7 exec swaymsg move container to workspace $(sway-find-workspace 7 ) - $mod+Shift+8 exec swaymsg move container to workspace $(sway-find-workspace 8 ) - $mod+Shift+9 exec swaymsg move container to workspace $(sway-find-workspace 9 ) - $mod+Shift+0 exec swaymsg move container to workspace $(sway-find-workspace 10) -} diff --git a/.config/sway/workspaces.json##hostname.tycho b/.config/sway/workspaces.json##hostname.tycho index fc9c249..45312f2 100644 --- a/.config/sway/workspaces.json##hostname.tycho +++ b/.config/sway/workspaces.json##hostname.tycho @@ -154,7 +154,7 @@ "serial": "6CM0151FHY", "group": "left", "position": [0, 450], - "mode": "2560x1440@60Hz", + "mode": "2560x1440@75Hz", "eww_windows": ["sidebar", "leftbar"] }, { @@ -172,7 +172,7 @@ "serial": "6CM0151FD4", "group": "right", "position": [6000, 0], - "mode": "2560x1440@60Hz", + "mode": "2560x1440@75Hz", "transform": 90, "eww_windows": ["rightbar"] } diff --git a/.config/yadm/encrypt b/.config/yadm/encrypt index c056182..34662f3 100644 --- a/.config/yadm/encrypt +++ b/.config/yadm/encrypt @@ -1 +1,2 @@ .config/ssh/1*.conf +.config/ssh/3*.conf diff --git a/.local/bin/sway-find-workspace b/.local/bin/sway-find-workspace index 69be005..8f6ddba 100755 --- a/.local/bin/sway-find-workspace +++ b/.local/bin/sway-find-workspace @@ -10,10 +10,16 @@ done echo "Output sets: $output_sets" >&2 +if [[ -f $XDG_RUNTIME_DIR/wm_context ]]; then + wm_context=$(<$XDG_RUNTIME_DIR/wm_context) +else + wm_context=$(jq <~/.config/sway/workspaces.json '.default_context' -r) +fi + workspace_counts=() total_workspaces=0 for output in {1..${#output_sets[@]}}; do - workspace_counts+=$(jq <~/.config/sway/workspaces.json ".contexts[.default_context] | [values[]][$((output - 1))] | length" -r) + workspace_counts+=$(jq <~/.config/sway/workspaces.json ".contexts.${wm_context} | [values[]][$((output - 1))] | length" -r) ((total_workspaces += workspace_counts[output])) done diff --git a/.local/share/yadm/archive b/.local/share/yadm/archive index 0e3a26c6e2c91ece334f40add951ce1377bff9b6..dc8f39327e9719ea7fea9efa379455cc197da155 100644 GIT binary patch literal 1259 zcmV4Fm}T2n0Uxa>9MkYX8#e0qw$sK|gi^$W(C0_3x+u`!}J$rKoRT77*GkT%Ev3_yydFLu#V58-3b%zaH-FNG` zBTJ0qNz~|#>(>{ktf$M3*t8Rg!K%EK4rR3*fvEBw7B9Q$;o`)YNbqy@x;SBx7VFO} zwv`XA*Z#jr(T`9|BT5rn)OZA+lu3(SaPhD7saR^8k$e{k_UraUxsO2nT9slRB)N17 zAUkC@zuOB-uIs2`>?J`rI3t1wZ_cA_!Nr< z*?WdF_RamipbPx@f70m{A1=iZ(y7b3a(h$d3{;n1%)~(ceabmSJOi>jYHu=!k0 zc(VzADY;s@G-qN$)Y;|R?3NrtOkL6v-~*VY=?}&+^a4{OxS0JPDzCCu*!IYy27P3T z0apPjX@n+90ikTJ(X2W_!%<5!0jF-u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