R.I.P. Tycho Station

This commit is contained in:
Ezri Brimhall 2024-10-31 16:23:48 -06:00
parent 4bc48de8d6
commit 71308fd9d5
Signed by: ezri
GPG Key ID: 058A78E5680C6F24
16 changed files with 179 additions and 152 deletions

View File

@ -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"

View File

@ -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

View File

@ -21,6 +21,8 @@
&.side {
margin: 10px;
margin-top: 20px;
margin-right: 0px;
}
&.bg {

View File

@ -12,7 +12,7 @@
(defwindow leftbar
:monitor 1
:geometry (geometry :width "1440px"
:geometry (geometry :width "100%"
:height "36px"
:anchor "top center")
:exclusive true
@ -52,6 +52,17 @@
(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
:monitor 0

View File

@ -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})))
))

View File

@ -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": {},
}

View File

@ -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 []

View File

@ -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

View File

@ -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 #

View File

@ -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
}

View File

@ -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
}

View File

@ -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)
}

View File

@ -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"]
}

View File

@ -1 +1,2 @@
.config/ssh/1*.conf
.config/ssh/3*.conf

View File

@ -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

Binary file not shown.