diff --git a/DankMaterialShell/firefox.css b/DankMaterialShell/firefox.css index 780404f..e7839f5 100755 --- a/DankMaterialShell/firefox.css +++ b/DankMaterialShell/firefox.css @@ -1,54 +1,54 @@ @media -moz-pref("userChrome.theme-material") { :root { - --md-sys-color-primary: #b7006f; - --md-sys-color-surface-tint: #b7006f; + --md-sys-color-primary: #0062a0; + --md-sys-color-surface-tint: #0062a0; --md-sys-color-on-primary: #ffffff; - --md-sys-color-primary-container: #ffd9e5; - --md-sys-color-on-primary-container: #3e0022; - --md-sys-color-secondary: #805159; + --md-sys-color-primary-container: #d0e4ff; + --md-sys-color-on-primary-container: #001d35; + --md-sys-color-secondary: #515e7d; --md-sys-color-on-secondary: #ffffff; - --md-sys-color-secondary-container: #ffd9de; - --md-sys-color-on-secondary-container: #321018; - --md-sys-color-tertiary: #8b4d4a; + --md-sys-color-secondary-container: #d8e2ff; + --md-sys-color-on-secondary-container: #0c1b36; + --md-sys-color-tertiary: #565b8b; --md-sys-color-on-tertiary: #ffffff; - --md-sys-color-tertiary-container: #ffdad8; - --md-sys-color-on-tertiary-container: #380b0c; + --md-sys-color-tertiary-container: #e0e0ff; + --md-sys-color-on-tertiary-container: #121644; --md-sys-color-error: #ba1a1a; --md-sys-color-on-error: #ffffff; --md-sys-color-error-container: #ffdad6; --md-sys-color-on-error-container: #410002; - --md-sys-color-background: #fff8f8; - --md-sys-color-on-background: #25181d; - --md-sys-color-surface: #fff8f8; - --md-sys-color-on-surface: #25181d; - --md-sys-color-surface-variant: #f5dce3; - --md-sys-color-on-surface-variant: #534248; - --md-sys-color-outline: #857278; - --md-sys-color-outline-variant: #d8c1c7; + --md-sys-color-background: #f8f9ff; + --md-sys-color-on-background: #151c24; + --md-sys-color-surface: #f8f9ff; + --md-sys-color-on-surface: #151c24; + --md-sys-color-surface-variant: #dde3ee; + --md-sys-color-on-surface-variant: #414750; + --md-sys-color-outline: #717881; + --md-sys-color-outline-variant: #c0c7d2; --md-sys-color-shadow: #000000; --md-sys-color-scrim: #000000; - --md-sys-color-inverse-surface: #3b2c31; - --md-sys-color-inverse-on-surface: #ffecf1; - --md-sys-color-inverse-primary: #ffb0ce; - --md-sys-color-primary-fixed: #ffd9e5; - --md-sys-color-on-primary-fixed: #3e0022; - --md-sys-color-primary-fixed-dim: #ffb0ce; - --md-sys-color-on-primary-fixed-variant: #8c0053; - --md-sys-color-secondary-fixed: #ffd9de; - --md-sys-color-on-secondary-fixed: #321018; - --md-sys-color-secondary-fixed-dim: #f2b7c0; - --md-sys-color-on-secondary-fixed-variant: #653b42; - --md-sys-color-tertiary-fixed: #ffdad8; - --md-sys-color-on-tertiary-fixed: #380b0c; - --md-sys-color-tertiary-fixed-dim: #ffb3af; - --md-sys-color-on-tertiary-fixed-variant: #6f3634; - --md-sys-color-surface-dim: #ecd4db; - --md-sys-color-surface-bright: #fff8f8; + --md-sys-color-inverse-surface: #2a3139; + --md-sys-color-inverse-on-surface: #ebf1fc; + --md-sys-color-inverse-primary: #9bcaff; + --md-sys-color-primary-fixed: #d0e4ff; + --md-sys-color-on-primary-fixed: #001d35; + --md-sys-color-primary-fixed-dim: #9bcaff; + --md-sys-color-on-primary-fixed-variant: #00497a; + --md-sys-color-secondary-fixed: #d8e2ff; + --md-sys-color-on-secondary-fixed: #0c1b36; + --md-sys-color-secondary-fixed-dim: #b8c6ea; + --md-sys-color-on-secondary-fixed-variant: #394664; + --md-sys-color-tertiary-fixed: #e0e0ff; + --md-sys-color-on-tertiary-fixed: #121644; + --md-sys-color-tertiary-fixed-dim: #bfc2fa; + --md-sys-color-on-tertiary-fixed-variant: #3e4372; + --md-sys-color-surface-dim: #d4dae5; + --md-sys-color-surface-bright: #f8f9ff; --md-sys-color-surface-container-lowest: #ffffff; - --md-sys-color-surface-container-low: #fff0f3; - --md-sys-color-surface-container: #fff8f8; - --md-sys-color-surface-container-high: #fff8f8; - --md-sys-color-surface-container-highest: #fff8f8; + --md-sys-color-surface-container-low: #eef4ff; + --md-sys-color-surface-container: #f8f9ff; + --md-sys-color-surface-container-high: #f8f9ff; + --md-sys-color-surface-container-highest: #f8f9ff; --m3-radius: 12px; --m3-radius-sm: 10px; @@ -68,55 +68,55 @@ @media (prefers-color-scheme: dark) { :root { - --md-sys-color-primary: #ffb0ce; - --md-sys-color-surface-tint: #ffb0ce; - --md-sys-color-on-primary: #64003a; - --md-sys-color-primary-container: #8c0053; - --md-sys-color-on-primary-container: #ffd9e5; - --md-sys-color-secondary: #f2b7c0; - --md-sys-color-on-secondary: #4b252c; - --md-sys-color-secondary-container: #653b42; - --md-sys-color-on-secondary-container: #ffd9de; - --md-sys-color-tertiary: #ffb3af; - --md-sys-color-on-tertiary: #53201f; - --md-sys-color-tertiary-container: #6f3634; - --md-sys-color-on-tertiary-container: #ffdad8; + --md-sys-color-primary: #9bcaff; + --md-sys-color-surface-tint: #9bcaff; + --md-sys-color-on-primary: #003256; + --md-sys-color-primary-container: #00497a; + --md-sys-color-on-primary-container: #d0e4ff; + --md-sys-color-secondary: #b8c6ea; + --md-sys-color-on-secondary: #22304c; + --md-sys-color-secondary-container: #394664; + --md-sys-color-on-secondary-container: #d8e2ff; + --md-sys-color-tertiary: #bfc2fa; + --md-sys-color-on-tertiary: #282c5a; + --md-sys-color-tertiary-container: #3e4372; + --md-sys-color-on-tertiary-container: #e0e0ff; --md-sys-color-error: #ffb4ab; --md-sys-color-on-error: #690005; --md-sys-color-error-container: #93000a; --md-sys-color-on-error-container: #ffdad6; - --md-sys-color-background: #1c1014; - --md-sys-color-on-background: #f5dce3; - --md-sys-color-surface: #1c1014; - --md-sys-color-on-surface: #f5dce3; - --md-sys-color-surface-variant: #534248; - --md-sys-color-on-surface-variant: #d8c1c7; - --md-sys-color-outline: #a08b92; - --md-sys-color-outline-variant: #534248; + --md-sys-color-background: #0d141c; + --md-sys-color-on-background: #dde3ee; + --md-sys-color-surface: #0d141c; + --md-sys-color-on-surface: #dde3ee; + --md-sys-color-surface-variant: #414750; + --md-sys-color-on-surface-variant: #c0c7d2; + --md-sys-color-outline: #8b919b; + --md-sys-color-outline-variant: #414750; --md-sys-color-shadow: #000000; --md-sys-color-scrim: #000000; - --md-sys-color-inverse-surface: #f5dce3; - --md-sys-color-inverse-on-surface: #3b2c31; - --md-sys-color-inverse-primary: #b7006f; - --md-sys-color-primary-fixed: #ffd9e5; - --md-sys-color-on-primary-fixed: #3e0022; - --md-sys-color-primary-fixed-dim: #ffb0ce; - --md-sys-color-on-primary-fixed-variant: #8c0053; - --md-sys-color-secondary-fixed: #ffd9de; - --md-sys-color-on-secondary-fixed: #321018; - --md-sys-color-secondary-fixed-dim: #f2b7c0; - --md-sys-color-on-secondary-fixed-variant: #653b42; - --md-sys-color-tertiary-fixed: #ffdad8; - --md-sys-color-on-tertiary-fixed: #380b0c; - --md-sys-color-tertiary-fixed-dim: #ffb3af; - --md-sys-color-on-tertiary-fixed-variant: #6f3634; - --md-sys-color-surface-dim: #1c1014; - --md-sys-color-surface-bright: #45353a; - --md-sys-color-surface-container-lowest: #170b0f; - --md-sys-color-surface-container-low: #25181d; - --md-sys-color-surface-container: #291c21; - --md-sys-color-surface-container-high: #34262b; - --md-sys-color-surface-container-highest: #403136; + --md-sys-color-inverse-surface: #dde3ee; + --md-sys-color-inverse-on-surface: #2a3139; + --md-sys-color-inverse-primary: #0062a0; + --md-sys-color-primary-fixed: #d0e4ff; + --md-sys-color-on-primary-fixed: #001d35; + --md-sys-color-primary-fixed-dim: #9bcaff; + --md-sys-color-on-primary-fixed-variant: #00497a; + --md-sys-color-secondary-fixed: #d8e2ff; + --md-sys-color-on-secondary-fixed: #0c1b36; + --md-sys-color-secondary-fixed-dim: #b8c6ea; + --md-sys-color-on-secondary-fixed-variant: #394664; + --md-sys-color-tertiary-fixed: #e0e0ff; + --md-sys-color-on-tertiary-fixed: #121644; + --md-sys-color-tertiary-fixed-dim: #bfc2fa; + --md-sys-color-on-tertiary-fixed-variant: #3e4372; + --md-sys-color-surface-dim: #0d141c; + --md-sys-color-surface-bright: #333a42; + --md-sys-color-surface-container-lowest: #080f16; + --md-sys-color-surface-container-low: #151c24; + --md-sys-color-surface-container: #192028; + --md-sys-color-surface-container-high: #242b33; + --md-sys-color-surface-container-highest: #2f353e; --m3-elev-1: 0 1px 2px rgba(0,0,0,.50), 0 1px 3px rgba(0,0,0,.35); --m3-elev-2: 0 4px 10px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.35); diff --git a/DankMaterialShell/settings.json b/DankMaterialShell/settings.json index 1af3b06..0a44a6f 100755 --- a/DankMaterialShell/settings.json +++ b/DankMaterialShell/settings.json @@ -209,7 +209,7 @@ "dankLauncherV2UnloadOnClose": false, "useAutoLocation": false, "weatherEnabled": true, - "networkPreference": "auto", + "networkPreference": "wifi", "iconTheme": "Tela-circle-black-light", "cursorSettings": { "theme": "System Default", diff --git a/ghostty/themes/dankcolors b/ghostty/themes/dankcolors index 3c69c4a..9556157 100644 --- a/ghostty/themes/dankcolors +++ b/ghostty/themes/dankcolors @@ -1,22 +1,22 @@ -background = #1c1014 -foreground = #f5dce3 -cursor-color = #ffb0ce -selection-background = #8c0053 -selection-foreground = #f5dce3 +background = #0d141c +foreground = #dde3ee +cursor-color = #9bcaff +selection-background = #00497a +selection-foreground = #dde3ee -palette = 0=#1c1014 -palette = 1=#ff7279 -palette = 2=#a0ff7f -palette = 3=#ffe172 -palette = 4=#f298ba -palette = 5=#76324c -palette = 6=#ffb0ce -palette = 7=#ffeff5 -palette = 8=#a5999e -palette = 9=#ff9fa3 -palette = 10=#bcffa5 -palette = 11=#ffeca5 -palette = 12=#ffbbd5 -palette = 13=#ffc7dc -palette = 14=#ffdbe8 -palette = 15=#fff8fb +palette = 0=#0d141c +palette = 1=#ff729c +palette = 2=#7fff90 +palette = 3=#fff772 +palette = 4=#80b5f2 +palette = 5=#214976 +palette = 6=#9bcaff +palette = 7=#eff6ff +palette = 8=#999fa5 +palette = 9=#ff9fbb +palette = 10=#a5ffb1 +palette = 11=#fffaa5 +palette = 12=#aad1ff +palette = 13=#b9d9ff +palette = 14=#d2e7ff +palette = 15=#f8fbff diff --git a/mango/autostart.conf b/mango/autostart.conf index 38deb0c..5ac95be 100644 --- a/mango/autostart.conf +++ b/mango/autostart.conf @@ -8,6 +8,8 @@ exec-once=dsearch serve --workers 1 --root ~ --exclude-hidden exec-once=systemctl --user start hyprpolkitagent ## first-run UI exec-once=~/.config/sdgos/firstrun.sh +## start nautilus in the background +exec-once=nautilus --gapplication-service ## start DankMaterial Shell exec-once=dms run diff --git a/mango/binds.conf b/mango/binds.conf index 8efe29c..23edff0 100644 --- a/mango/binds.conf +++ b/mango/binds.conf @@ -141,6 +141,10 @@ bind=SUPER+alt,7,toggleview,7 # toggle on workspace 7 bind=SUPER+alt,8,toggleview,8 # toggle on workspace 8 bind=SUPER+alt,9,toggleview,9 # toggle on workspace 9 +#swap all windows between two tag/workspaces +bind=SUPER,J,spawn_shell,~/.config/sdgos/misc/marker.sh # mark current workspace +bind=SUPER+SHIFT,J,spawn_shell,~/.config/sdgos/misc/swapmarked.sh # swap current workspace with marked workspace + # move between monitors with mainmod + ctrl + 1-9 bind=SUPER+ctrl,1,tagmon,name:^DP-1$ # move to monitor DP-1 bind=SUPER+ctrl,2,tagmon,name:^HDMI-A-1$ # move to monitor HDMI-A-1 diff --git a/mango/dms/colors.conf b/mango/dms/colors.conf index 2d56d08..8d8d367 100644 --- a/mango/dms/colors.conf +++ b/mango/dms/colors.conf @@ -1,6 +1,6 @@ # ! Auto-generated file. Do not edit directly. # Remove source = ./dms/colors.conf from your config to override. -bordercolor = 0xa08b92ff -focuscolor = 0xffb0ceff +bordercolor = 0x8b919bff +focuscolor = 0x9bcaffff urgentcolor = 0xffb4abff diff --git a/matugen/templates-out/obsidian.css b/matugen/templates-out/obsidian.css index 0112a8a..7157aea 100644 --- a/matugen/templates-out/obsidian.css +++ b/matugen/templates-out/obsidian.css @@ -6,113 +6,113 @@ .theme-dark, .theme-light { /* ── Material You RGB helpers ──────────────────────────── */ - --mat-bg-rgb: 28, 16, 20; - --mat-surface-rgb: 28, 16, 20; - --mat-on-surface-rgb: 245, 220, 227; - --mat-primary-rgb: 255, 176, 206; - --mat-on-primary-rgb: 100, 0, 58; + --mat-bg-rgb: 13, 20, 28; + --mat-surface-rgb: 13, 20, 28; + --mat-on-surface-rgb: 221, 227, 238; + --mat-primary-rgb: 155, 202, 255; + --mat-on-primary-rgb: 0, 50, 86; /* ── Core Backgrounds ──────────────────────────────────── */ - --background-primary: #1c1014; - --background-primary-alt: #1c1014; - --background-secondary: #25181d; - --background-secondary-alt: #291c21; + --background-primary: #0d141c; + --background-primary-alt: #0d141c; + --background-secondary: #151c24; + --background-secondary-alt: #192028; /* ── Titlebar ──────────────────────────────────────────── */ - --titlebar-background: #1c1014; - --titlebar-background-focused: #25181d; - --titlebar-text-color: #f5dce3; + --titlebar-background: #0d141c; + --titlebar-background-focused: #151c24; + --titlebar-text-color: #dde3ee; /* ── Borders & Dividers ────────────────────────────────── */ - --background-modifier-border: #534248; - --background-modifier-border-focus: #a08b92; - --background-modifier-border-hover: #a08b92; + --background-modifier-border: #414750; + --background-modifier-border-focus: #8b919b; + --background-modifier-border-hover: #8b919b; /* ── Text Colors ───────────────────────────────────────── */ - --text-normal: #f5dce3; - --text-muted: #d8c1c7; - --text-faint: #a08b92; - --text-on-accent: #64003a; - --text-selection: rgba(255, 176, 206, 0.25); + --text-normal: #dde3ee; + --text-muted: #c0c7d2; + --text-faint: #8b919b; + --text-on-accent: #003256; + --text-selection: rgba(155, 202, 255, 0.25); /* ── Accent & Interactive ──────────────────────────────── */ - --interactive-accent: #ffb0ce; - --interactive-accent-hover: #8c0053; - --interactive-accent-rgb: 255, 176, 206; - --text-accent: #ffb0ce; - --text-accent-hover: #8c0053; + --interactive-accent: #9bcaff; + --interactive-accent-hover: #00497a; + --interactive-accent-rgb: 155, 202, 255; + --text-accent: #9bcaff; + --text-accent-hover: #00497a; /* ── Hover & Active Modifiers ──────────────────────────── */ --background-modifier-hover: rgba(var(--mat-on-surface-rgb), 0.06); --background-modifier-active-hover: rgba(var(--mat-primary-rgb), 0.15); - --background-modifier-success: #6f3634; + --background-modifier-success: #3e4372; --background-modifier-error: #93000a; --background-modifier-error-hover: #ffb4ab; /* ── Obsidian Color Scale (--color-base-XX) ────────────── */ - --color-base-00: #1c1014; - --color-base-05: #1c1014; - --color-base-10: #170b0f; - --color-base-20: #25181d; - --color-base-25: #291c21; - --color-base-30: #34262b; - --color-base-35: #403136; - --color-base-40: #534248; - --color-base-50: #a08b92; - --color-base-60: #d8c1c7; - --color-base-70: #f5dce3; - --color-base-100: #f5dce3; + --color-base-00: #0d141c; + --color-base-05: #0d141c; + --color-base-10: #080f16; + --color-base-20: #151c24; + --color-base-25: #192028; + --color-base-30: #242b33; + --color-base-35: #2f353e; + --color-base-40: #414750; + --color-base-50: #8b919b; + --color-base-60: #c0c7d2; + --color-base-70: #dde3ee; + --color-base-100: #dde3ee; /* ── Semantic Colors ───────────────────────────────────── */ --color-red: #ffb4ab; - --color-orange: #ffb3af; - --color-yellow: #f2b7c0; - --color-green: #6f3634; - --color-cyan: #653b42; - --color-blue: #ffb0ce; - --color-purple: #f2b7c0; - --color-pink: #ffb3af; + --color-orange: #bfc2fa; + --color-yellow: #b8c6ea; + --color-green: #3e4372; + --color-cyan: #394664; + --color-blue: #9bcaff; + --color-purple: #b8c6ea; + --color-pink: #bfc2fa; /* ── Headings ──────────────────────────────────────────── */ - --h1-color: #ffb0ce; - --h2-color: #ffb0ce; - --h3-color: #f2b7c0; - --h4-color: #ffb3af; - --h5-color: #d8c1c7; - --h6-color: #a08b92; + --h1-color: #9bcaff; + --h2-color: #9bcaff; + --h3-color: #b8c6ea; + --h4-color: #bfc2fa; + --h5-color: #c0c7d2; + --h6-color: #8b919b; /* ── Links ─────────────────────────────────────────────── */ - --link-color: #ffb0ce; - --link-color-hover: #ffd9e5; - --link-external-color: #ffb3af; - --link-unresolved-color: #a08b92; + --link-color: #9bcaff; + --link-color-hover: #d0e4ff; + --link-external-color: #bfc2fa; + --link-unresolved-color: #8b919b; /* ── Tags ──────────────────────────────────────────────── */ - --tag-color: #ffd9e5; - --tag-background: #8c0053; - --tag-border-color: #ffb0ce; - --tag-color-hover: #64003a; - --tag-background-hover: #ffb0ce; + --tag-color: #d0e4ff; + --tag-background: #00497a; + --tag-border-color: #9bcaff; + --tag-color-hover: #003256; + --tag-background-hover: #9bcaff; /* ── Checkboxes ────────────────────────────────────────── */ - --checkbox-color: #ffb0ce; - --checkbox-color-hover: #8c0053; - --checkbox-border-color: #a08b92; - --checkbox-marker-color: #64003a; + --checkbox-color: #9bcaff; + --checkbox-color-hover: #00497a; + --checkbox-border-color: #8b919b; + --checkbox-marker-color: #003256; /* ── Code Blocks ───────────────────────────────────────── */ - --code-background: #25181d; - --code-normal: #f5dce3; - --code-comment: #a08b92; - --code-function: #ffb0ce; + --code-background: #151c24; + --code-normal: #dde3ee; + --code-comment: #8b919b; + --code-function: #9bcaff; --code-important: #ffb4ab; - --code-keyword: #f2b7c0; - --code-operator: #ffb3af; - --code-property: #d8c1c7; - --code-punctuation: #534248; - --code-string: #ffb3af; + --code-keyword: #b8c6ea; + --code-operator: #bfc2fa; + --code-property: #c0c7d2; + --code-punctuation: #414750; + --code-string: #bfc2fa; --code-tag: #ffb4ab; - --code-value: #f2b7c0; + --code-value: #b8c6ea; /* ── Scrollbar ─────────────────────────────────────────── */ --scrollbar-thumb-bg: rgba(var(--mat-on-surface-rgb), 0.12); @@ -121,16 +121,16 @@ /* ── Inputs ────────────────────────────────────────────── */ --input-shadow: none; - --input-shadow-hover: 0 0 0 2px #a08b92; + --input-shadow-hover: 0 0 0 2px #8b919b; /* ── Graph View ────────────────────────────────────────── */ - --graph-node: #ffb0ce; - --graph-node-unresolved: #a08b92; - --graph-node-focused: #ffd9e5; - --graph-node-tag: #f2b7c0; - --graph-node-attachment: #ffb3af; - --graph-line: #534248; - --graph-background: #1c1014; + --graph-node: #9bcaff; + --graph-node-unresolved: #8b919b; + --graph-node-focused: #d0e4ff; + --graph-node-tag: #b8c6ea; + --graph-node-attachment: #bfc2fa; + --graph-line: #414750; + --graph-background: #0d141c; } diff --git a/sdgos/misc/marker.sh b/sdgos/misc/marker.sh new file mode 100755 index 0000000..61b5f43 --- /dev/null +++ b/sdgos/misc/marker.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +ACTIVEMON=$(mmsg get all-monitors | jq '.monitors[] | select(.active == true) | .name' -r) +ACTIVETAG=$(mmsg get tags DP-1 | jq '.tags[] | select(.is_active == true) | .index' -r) +ACTIVEWINDOWS=$(mmsg get all-clients | jq -r --arg ACTIVETAG "$ACTIVETAG" --arg ACTIVEMON "$ACTIVEMON" '.clients[] | select(.tags[] == ($ACTIVETAG | tonumber) and .monitor == $ACTIVEMON) | .id') + +echo "active monitor is $ACTIVEMON" +echo "active tag is $ACTIVETAG" +echo "active windows are:" +echo "$ACTIVEWINDOWS" + +echo "$ACTIVEWINDOWS" > ~/.config/marker.state +echo "$ACTIVEMON:$ACTIVETAG" > ~/.config/marker.workspace +echo "marker state saved" +notify-send "monitor marked" + + + diff --git a/sdgos/misc/swapmarked.sh b/sdgos/misc/swapmarked.sh new file mode 100755 index 0000000..df17fc8 --- /dev/null +++ b/sdgos/misc/swapmarked.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +ACTIVEMON=$(mmsg get all-monitors | jq '.monitors[] | select(.active == true) | .name' -r) +ACTIVETAG=$(mmsg get tags DP-1 | jq '.tags[] | select(.is_active == true) | .index' -r) +ACTIVEWINDOWS=$(mmsg get all-clients | jq -r --arg ACTIVETAG "$ACTIVETAG" --arg ACTIVEMON "$ACTIVEMON" '.clients[] | select(.tags[] == ($ACTIVETAG | tonumber) and .monitor == $ACTIVEMON) | .id') + + +TARGETMON=$(cat ~/.config/marker.workspace | cut -d: -f1) +TARGETTAG=$(cat ~/.config/marker.workspace | cut -d: -f2) +TARGETWINDOWS=$(cat ~/.config/marker.state) + + +echo "swapping between: $ACTIVEMON:$ACTIVETAG and $TARGETMON:$TARGETTAG" +echo "swapping the following windows on $ACTIVEMON:" +echo "$ACTIVEWINDOWS" +echo "" +echo "with the following windows on $TARGETMON" +echo "$TARGETWINDOWS" + +ACTIVECOMB="" +TARGETCOMB="" + +while read LINE; do + ACTIVECOMB=$(echo "$ACTIVECOMB + $ACTIVEMON:$ACTIVETAG:$LINE") + +done <<< "$ACTIVEWINDOWS" + +while read LINE; do + TARGETCOMB=$(echo "$TARGETCOMB + $TARGETMON:$TARGETTAG:$LINE") + +done <<< "$TARGETWINDOWS" + +TARGETCOMB=$(echo "$TARGETCOMB" | sed 1d) +ACTIVECOMB=$(echo "$ACTIVECOMB" | sed 1d) + +echo "combined active is:" +echo "$ACTIVECOMB" +echo "" +echo "combined target is:" +echo "$TARGETCOMB" + +LIST=$(paste <(echo "$ACTIVECOMB") <(echo "$TARGETCOMB") | awk -F'\t' 'NF == 2 {print $1; print $2}') + + +while read LINE; do + if [ "$LINE" == "" ]; then + currentactive=$(mmsg get all-monitors | jq '.monitors[] | select(.active == true) | .name' -r) + if [ "$currentactive" == "$ACTIVEMON" ]; then + mmsg dispatch viewcrossmon,$TARGETTAG,name:$TARGETMON + else + mmsg dispatch viewcrossmon,$ACTIVETAG,name:$ACTIVEMON + fi + else + lmon=$(echo "$LINE" | cut -d: -f1) + ltag=$(echo "$LINE" | cut -d: -f2) + lclient=$(echo "$LINE" | cut -d: -f3) + if [ "$lmon" == $ACTIVEMON ]; then + mmsg dispatch viewcrossmon,$ltag,name:$lmon + sleep 0.01 + mmsg dispatch tagcrossmon,$TARGETTAG,name:$TARGETMON client,$lclient + echo "moved $lclient to $TARGETMON:$TARGETTAG" + else + mmsg dispatch viewcrossmon,$ltag,name:$lmon + sleep 0.01 + mmsg dispatch tagcrossmon,$ACTIVETAG,name:$ACTIVEMON client,$lclient + echo "moved $lclient to $TARGETMON:$TARGETTAG" + fi + fi + +done <<< "$LIST"