Further updates for new tycho station display arrangement

This commit is contained in:
Ezri Brimhall 2024-04-23 11:16:33 -06:00
parent b54f4ff676
commit f73ad6951c
Signed by: ezri
GPG Key ID: 058A78E5680C6F24
8 changed files with 83 additions and 41 deletions

View File

@ -11,11 +11,11 @@
(include "./windows.yuck")
(defwindow leftbar
:monitor 0
:monitor 1
:geometry (geometry :width "100%"
:height "36px"
:anchor "top center"):exclusive
true
:anchor "top center")
:exclusive true
:focusable false
:stacking "fg"
(centerbox :orientation "h"
@ -25,11 +25,11 @@
(tycho-leftbar--right)))
(defwindow centerbar
:monitor 1
:monitor 0
:geometry (geometry :width "100%"
:height "26px"
:anchor "top center"):exclusive
true
:anchor "top center")
:exclusive true
:focusable false
:stacking "fg"
(centerbox :orientation "h"
@ -54,12 +54,12 @@
(defwindow network-status
:monitor 0
:monitor 2
:geometry (geometry :width "200px"
:height "0px"
:x "80px"
:x "407px"
:y "0px"
:anchor "top left")
:anchor "top right")
:exclusive false
:focusable false
:stacking "overlay"

View File

@ -96,7 +96,8 @@
:space-evenly false
:spacing 20
:class "leftbox"
(system-name)))
(clock)
))
(defwidget tycho-leftbar--center []
(box :orientation "h"
@ -104,6 +105,7 @@
:space-evenly false
:spacing 20
:class "centerbox"
(system-name)
))
(defwidget tycho-leftbar--right []
@ -121,10 +123,7 @@
:space-evenly false
:spacing 20
:class "leftbox"
(clock)
(network)
(vpn-network)
(aggietime-shift)
(sway-workspaces :group "center")
(sway-workspace :group "center")))
(defwidget tycho-centerbar--center []
@ -133,7 +132,7 @@
:space-evenly false
:spacing 20
:class "centerbox"
(sway-workspaces :group "center")
(system-name)
))
(defwidget tycho-centerbar--right []
@ -142,6 +141,9 @@
:space-evenly false
:spacing 20
:class "rightbox"
(aggietime-shift)
(vpn-network)
(network)
(mpris2)
(system-memory)
(system-cpu-avg)
@ -162,6 +164,7 @@
:space-evenly false
:spacing 20
:class "centerbox"
(system-name)
))
(defwidget tycho-rightbar--right []
@ -170,6 +173,7 @@
:space-evenly false
:spacing 20
:class "rightbox"
(system-name)))
(clock)
))

View File

@ -2,12 +2,12 @@
# Tycho Station Display Config #
### ###
set $leftdisplay DP-1
set $centerdisplay DP-2
set $rightdisplay DP-3
set $leftdisplay "HP Inc. HP Z27n G2 6CM0151FHY"
set $centerdisplay "HP Inc. HP Z27n G2 6CM0151FLX"
set $rightdisplay "HP Inc. HP Z27n G2 6CM0151FD4"
output {
$leftdisplay pos 0 0 mode 1920x1080 transform 270
$centerdisplay pos 1080 384 mode 2560x1440 scale 1.25
$rightdisplay pos 3128 0 mode 2560x1440 scale 1.25 transform 270
$leftdisplay pos 0 0 mode 2560x1440 transform 270
$centerdisplay pos 1440 510 mode 2560x1440 transform 0
$rightdisplay pos 4000 30 mode 2560x1440 transform 90
}

View File

@ -0,0 +1,10 @@
# -*-conf-*-
#timeout 10 'pgrep swaylock &> /dev/null && swaymsg "output * power off"' resume 'pgrep swaylock &> /dev/null && swaymsg "output * power on" && gpg-connect-agent UPDATESTARTUPTTY /bye'
#timeout 15 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGSTOP electron' resume 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGCONT electron'
timeout 120 'pgrep swaylock &> /dev/null && systemctl suspend'
lock ~/.local/bin/screenlock
before-sleep 'loginctl lock-session'
unlock 'pkill -SIGUSR1 swaylock'
idlehint 600

View File

@ -2,9 +2,9 @@
"default_context": "work",
"display_ordering": ["left", "center", "right"],
"display_layout": {
"left": "DP-1",
"right": "DP-3",
"center": "DP-2"
"left": "DP-5",
"right": "DP-7",
"center": "DP-4"
},
"contexts": {
"work": {
@ -18,14 +18,14 @@
{
"index": 4,
"name": "project",
"exec": "firefox-beta",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},
{
"index": 3,
"name": "documentation",
"exec": "firefox-beta",
"exec": "firefox",
"args": ["--new-window"],
"environ": {},
"program_name": "firefox"
@ -61,14 +61,14 @@
{
"index": 8,
"name": "internet",
"exec": "firefox-beta",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},
{
"index": 9,
"name": "project",
"exec": "firefox-beta",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},
@ -133,7 +133,7 @@
{
"index": 19,
"name": "project",
"exec": "firefox-beta",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},

View File

@ -43,7 +43,12 @@
'(mouse-autoselect-window t)
'(package-selected-packages
'(kotlin-mode magit counsel doom-modeline doom-themes use-package))
'(tab-width 2))
'(tab-width 2)
'(vterm-eval-cmds
'(("find-file" find-file)
("message" message)
("vterm-clear-scrollback" vterm-clear-scrollback)
("find-file-other-window" find-file-other-window))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

View File

@ -312,7 +312,7 @@ Indent using tabs, render with tab-width of 2.
(tab-line-mode nil)))
(global-tab-line-mode t)
(add-hook 'after-make-frame-functions 'my-tab-config)
#+END_SRC
@ -385,7 +385,10 @@ Indent using tabs, render with tab-width of 2.
#+BEGIN_SRC emacs-lisp
(add-to-list 'auto-mode-alist '("\\.yuck\\'" . conf-unix-mode))
#+END_SRC
** Webdev
#+BEGIN_SRC emacs-lisp
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode))
#+END_SRC
* Markdown mode
** Auto Text Wrap
#+BEGIN_SRC emacs-lisp
@ -556,12 +559,22 @@ After installing the ~rust-analyzer~ program, the following can be used:
(set-face-background 'mmm-default-submode-face nil)))
#+END_SRC
*** Web Stuff
**** typescript-mode
**** Typescript
#+BEGIN_SRC emacs-lisp
;; TODO: Update to tree-sitter in Emacs 29
(use-package typescript-mode
:ensure t)
(setq typescript-indent-level 2)
(setq major-mode-remap-alist
'((typescript-mode . typescript-ts-mode)
(python-mode . python-ts-mode)
(js2-mode . js-ts-mode)
(json-mode . json-ts-mode)))
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))
(add-hook 'tsx-ts-mode-hook #'lsp)
(add-hook 'tsx-ts-mode-hook #'setup-tide-mode)
(add-hook 'typescript-ts-mode-hook #'lsp)
(add-hook 'typescript-ts-mode-hook #'setup-tide-mode)
#+END_SRC
**** TIDE
#+BEGIN_SRC emacs-lisp
@ -595,7 +608,6 @@ After installing the ~rust-analyzer~ program, the following can be used:
:mode (("\\.scss\\'" . web-mode)
("\\.css\\'" . web-mode)
("\\.jsx\\'" . web-mode)
("\\.tsx\\'" . web-mode)
("\\.html\\'" . web-mode))
:commands web-mode)
#+END_SRC

View File

@ -3,7 +3,8 @@
output_sets=()
# Get output ordering
for output in $(jq <~/.config/sway/workspaces.json '.display_layout[.display_ordering.[]] | strings' -r); do
for output in $(swaymsg -t get_outputs | jq '[ (.[] | select(.active) | pick(.name, .rect)) ] | sort_by(.rect.x) | .[] | .name' -r); do
output_sets+=$output
done
@ -38,15 +39,24 @@ function get_ws {
ws_set=$1
ws_target=$2
echo "Searching for workspace $ws_target on output $ws_set" >&2
while ((ws_target > workspace_counts[ws_set + 1])); do
echo "Workspace $ws_target does not exist on output $ws_set, moving to the next one" >&2
((ws_set = (ws_set + 1) % ${#output_sets[@]}))
if [[ $ws_set == $1 ]]; then
echo "No more outputs to check, staying on the current workspace" >&2
echo $current_workspace
return
fi
done
workspace=$(($(get_previous_output_workspaces $ws_set) + ws_target))
echo "Staying on this output would be workspace $workspace" >&2
echo "Looking at workspace $workspace (located on output $ws_target)" >&2
if [[ $workspace == $current_workspace ]]; then
echo "We're already on the target workspace, so we should look to change outputs" >&2
initial_ws_set=$ws_set
while :; do
ws_set=$(((ws_set + 1) % ${#output_sets[@]}))
echo "Checking output $ws_set" >&2
if ((ws_target < workspace_counts[ws_set + 1])); then
if ((ws_target <= workspace_counts[ws_set + 1])); then
workspace=$(($(get_previous_output_workspaces $ws_set) + ws_target))
break
elif ((ws_set == initial_ws_set)); then
@ -57,6 +67,7 @@ function get_ws {
fi
done
fi
echo "Found on output $ws_set" >&2
echo $workspace
}