added marker swapping system

This commit is contained in:
2026-06-02 03:45:40 +02:00
parent dbae27b8d8
commit c1b7d01769
9 changed files with 284 additions and 188 deletions
+82 -82
View File
@@ -1,54 +1,54 @@
@media -moz-pref("userChrome.theme-material") { @media -moz-pref("userChrome.theme-material") {
:root { :root {
--md-sys-color-primary: #b7006f; --md-sys-color-primary: #0062a0;
--md-sys-color-surface-tint: #b7006f; --md-sys-color-surface-tint: #0062a0;
--md-sys-color-on-primary: #ffffff; --md-sys-color-on-primary: #ffffff;
--md-sys-color-primary-container: #ffd9e5; --md-sys-color-primary-container: #d0e4ff;
--md-sys-color-on-primary-container: #3e0022; --md-sys-color-on-primary-container: #001d35;
--md-sys-color-secondary: #805159; --md-sys-color-secondary: #515e7d;
--md-sys-color-on-secondary: #ffffff; --md-sys-color-on-secondary: #ffffff;
--md-sys-color-secondary-container: #ffd9de; --md-sys-color-secondary-container: #d8e2ff;
--md-sys-color-on-secondary-container: #321018; --md-sys-color-on-secondary-container: #0c1b36;
--md-sys-color-tertiary: #8b4d4a; --md-sys-color-tertiary: #565b8b;
--md-sys-color-on-tertiary: #ffffff; --md-sys-color-on-tertiary: #ffffff;
--md-sys-color-tertiary-container: #ffdad8; --md-sys-color-tertiary-container: #e0e0ff;
--md-sys-color-on-tertiary-container: #380b0c; --md-sys-color-on-tertiary-container: #121644;
--md-sys-color-error: #ba1a1a; --md-sys-color-error: #ba1a1a;
--md-sys-color-on-error: #ffffff; --md-sys-color-on-error: #ffffff;
--md-sys-color-error-container: #ffdad6; --md-sys-color-error-container: #ffdad6;
--md-sys-color-on-error-container: #410002; --md-sys-color-on-error-container: #410002;
--md-sys-color-background: #fff8f8; --md-sys-color-background: #f8f9ff;
--md-sys-color-on-background: #25181d; --md-sys-color-on-background: #151c24;
--md-sys-color-surface: #fff8f8; --md-sys-color-surface: #f8f9ff;
--md-sys-color-on-surface: #25181d; --md-sys-color-on-surface: #151c24;
--md-sys-color-surface-variant: #f5dce3; --md-sys-color-surface-variant: #dde3ee;
--md-sys-color-on-surface-variant: #534248; --md-sys-color-on-surface-variant: #414750;
--md-sys-color-outline: #857278; --md-sys-color-outline: #717881;
--md-sys-color-outline-variant: #d8c1c7; --md-sys-color-outline-variant: #c0c7d2;
--md-sys-color-shadow: #000000; --md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000; --md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #3b2c31; --md-sys-color-inverse-surface: #2a3139;
--md-sys-color-inverse-on-surface: #ffecf1; --md-sys-color-inverse-on-surface: #ebf1fc;
--md-sys-color-inverse-primary: #ffb0ce; --md-sys-color-inverse-primary: #9bcaff;
--md-sys-color-primary-fixed: #ffd9e5; --md-sys-color-primary-fixed: #d0e4ff;
--md-sys-color-on-primary-fixed: #3e0022; --md-sys-color-on-primary-fixed: #001d35;
--md-sys-color-primary-fixed-dim: #ffb0ce; --md-sys-color-primary-fixed-dim: #9bcaff;
--md-sys-color-on-primary-fixed-variant: #8c0053; --md-sys-color-on-primary-fixed-variant: #00497a;
--md-sys-color-secondary-fixed: #ffd9de; --md-sys-color-secondary-fixed: #d8e2ff;
--md-sys-color-on-secondary-fixed: #321018; --md-sys-color-on-secondary-fixed: #0c1b36;
--md-sys-color-secondary-fixed-dim: #f2b7c0; --md-sys-color-secondary-fixed-dim: #b8c6ea;
--md-sys-color-on-secondary-fixed-variant: #653b42; --md-sys-color-on-secondary-fixed-variant: #394664;
--md-sys-color-tertiary-fixed: #ffdad8; --md-sys-color-tertiary-fixed: #e0e0ff;
--md-sys-color-on-tertiary-fixed: #380b0c; --md-sys-color-on-tertiary-fixed: #121644;
--md-sys-color-tertiary-fixed-dim: #ffb3af; --md-sys-color-tertiary-fixed-dim: #bfc2fa;
--md-sys-color-on-tertiary-fixed-variant: #6f3634; --md-sys-color-on-tertiary-fixed-variant: #3e4372;
--md-sys-color-surface-dim: #ecd4db; --md-sys-color-surface-dim: #d4dae5;
--md-sys-color-surface-bright: #fff8f8; --md-sys-color-surface-bright: #f8f9ff;
--md-sys-color-surface-container-lowest: #ffffff; --md-sys-color-surface-container-lowest: #ffffff;
--md-sys-color-surface-container-low: #fff0f3; --md-sys-color-surface-container-low: #eef4ff;
--md-sys-color-surface-container: #fff8f8; --md-sys-color-surface-container: #f8f9ff;
--md-sys-color-surface-container-high: #fff8f8; --md-sys-color-surface-container-high: #f8f9ff;
--md-sys-color-surface-container-highest: #fff8f8; --md-sys-color-surface-container-highest: #f8f9ff;
--m3-radius: 12px; --m3-radius: 12px;
--m3-radius-sm: 10px; --m3-radius-sm: 10px;
@@ -68,55 +68,55 @@
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--md-sys-color-primary: #ffb0ce; --md-sys-color-primary: #9bcaff;
--md-sys-color-surface-tint: #ffb0ce; --md-sys-color-surface-tint: #9bcaff;
--md-sys-color-on-primary: #64003a; --md-sys-color-on-primary: #003256;
--md-sys-color-primary-container: #8c0053; --md-sys-color-primary-container: #00497a;
--md-sys-color-on-primary-container: #ffd9e5; --md-sys-color-on-primary-container: #d0e4ff;
--md-sys-color-secondary: #f2b7c0; --md-sys-color-secondary: #b8c6ea;
--md-sys-color-on-secondary: #4b252c; --md-sys-color-on-secondary: #22304c;
--md-sys-color-secondary-container: #653b42; --md-sys-color-secondary-container: #394664;
--md-sys-color-on-secondary-container: #ffd9de; --md-sys-color-on-secondary-container: #d8e2ff;
--md-sys-color-tertiary: #ffb3af; --md-sys-color-tertiary: #bfc2fa;
--md-sys-color-on-tertiary: #53201f; --md-sys-color-on-tertiary: #282c5a;
--md-sys-color-tertiary-container: #6f3634; --md-sys-color-tertiary-container: #3e4372;
--md-sys-color-on-tertiary-container: #ffdad8; --md-sys-color-on-tertiary-container: #e0e0ff;
--md-sys-color-error: #ffb4ab; --md-sys-color-error: #ffb4ab;
--md-sys-color-on-error: #690005; --md-sys-color-on-error: #690005;
--md-sys-color-error-container: #93000a; --md-sys-color-error-container: #93000a;
--md-sys-color-on-error-container: #ffdad6; --md-sys-color-on-error-container: #ffdad6;
--md-sys-color-background: #1c1014; --md-sys-color-background: #0d141c;
--md-sys-color-on-background: #f5dce3; --md-sys-color-on-background: #dde3ee;
--md-sys-color-surface: #1c1014; --md-sys-color-surface: #0d141c;
--md-sys-color-on-surface: #f5dce3; --md-sys-color-on-surface: #dde3ee;
--md-sys-color-surface-variant: #534248; --md-sys-color-surface-variant: #414750;
--md-sys-color-on-surface-variant: #d8c1c7; --md-sys-color-on-surface-variant: #c0c7d2;
--md-sys-color-outline: #a08b92; --md-sys-color-outline: #8b919b;
--md-sys-color-outline-variant: #534248; --md-sys-color-outline-variant: #414750;
--md-sys-color-shadow: #000000; --md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000; --md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #f5dce3; --md-sys-color-inverse-surface: #dde3ee;
--md-sys-color-inverse-on-surface: #3b2c31; --md-sys-color-inverse-on-surface: #2a3139;
--md-sys-color-inverse-primary: #b7006f; --md-sys-color-inverse-primary: #0062a0;
--md-sys-color-primary-fixed: #ffd9e5; --md-sys-color-primary-fixed: #d0e4ff;
--md-sys-color-on-primary-fixed: #3e0022; --md-sys-color-on-primary-fixed: #001d35;
--md-sys-color-primary-fixed-dim: #ffb0ce; --md-sys-color-primary-fixed-dim: #9bcaff;
--md-sys-color-on-primary-fixed-variant: #8c0053; --md-sys-color-on-primary-fixed-variant: #00497a;
--md-sys-color-secondary-fixed: #ffd9de; --md-sys-color-secondary-fixed: #d8e2ff;
--md-sys-color-on-secondary-fixed: #321018; --md-sys-color-on-secondary-fixed: #0c1b36;
--md-sys-color-secondary-fixed-dim: #f2b7c0; --md-sys-color-secondary-fixed-dim: #b8c6ea;
--md-sys-color-on-secondary-fixed-variant: #653b42; --md-sys-color-on-secondary-fixed-variant: #394664;
--md-sys-color-tertiary-fixed: #ffdad8; --md-sys-color-tertiary-fixed: #e0e0ff;
--md-sys-color-on-tertiary-fixed: #380b0c; --md-sys-color-on-tertiary-fixed: #121644;
--md-sys-color-tertiary-fixed-dim: #ffb3af; --md-sys-color-tertiary-fixed-dim: #bfc2fa;
--md-sys-color-on-tertiary-fixed-variant: #6f3634; --md-sys-color-on-tertiary-fixed-variant: #3e4372;
--md-sys-color-surface-dim: #1c1014; --md-sys-color-surface-dim: #0d141c;
--md-sys-color-surface-bright: #45353a; --md-sys-color-surface-bright: #333a42;
--md-sys-color-surface-container-lowest: #170b0f; --md-sys-color-surface-container-lowest: #080f16;
--md-sys-color-surface-container-low: #25181d; --md-sys-color-surface-container-low: #151c24;
--md-sys-color-surface-container: #291c21; --md-sys-color-surface-container: #192028;
--md-sys-color-surface-container-high: #34262b; --md-sys-color-surface-container-high: #242b33;
--md-sys-color-surface-container-highest: #403136; --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-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); --m3-elev-2: 0 4px 10px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.35);
+1 -1
View File
@@ -209,7 +209,7 @@
"dankLauncherV2UnloadOnClose": false, "dankLauncherV2UnloadOnClose": false,
"useAutoLocation": false, "useAutoLocation": false,
"weatherEnabled": true, "weatherEnabled": true,
"networkPreference": "auto", "networkPreference": "wifi",
"iconTheme": "Tela-circle-black-light", "iconTheme": "Tela-circle-black-light",
"cursorSettings": { "cursorSettings": {
"theme": "System Default", "theme": "System Default",
+21 -21
View File
@@ -1,22 +1,22 @@
background = #1c1014 background = #0d141c
foreground = #f5dce3 foreground = #dde3ee
cursor-color = #ffb0ce cursor-color = #9bcaff
selection-background = #8c0053 selection-background = #00497a
selection-foreground = #f5dce3 selection-foreground = #dde3ee
palette = 0=#1c1014 palette = 0=#0d141c
palette = 1=#ff7279 palette = 1=#ff729c
palette = 2=#a0ff7f palette = 2=#7fff90
palette = 3=#ffe172 palette = 3=#fff772
palette = 4=#f298ba palette = 4=#80b5f2
palette = 5=#76324c palette = 5=#214976
palette = 6=#ffb0ce palette = 6=#9bcaff
palette = 7=#ffeff5 palette = 7=#eff6ff
palette = 8=#a5999e palette = 8=#999fa5
palette = 9=#ff9fa3 palette = 9=#ff9fbb
palette = 10=#bcffa5 palette = 10=#a5ffb1
palette = 11=#ffeca5 palette = 11=#fffaa5
palette = 12=#ffbbd5 palette = 12=#aad1ff
palette = 13=#ffc7dc palette = 13=#b9d9ff
palette = 14=#ffdbe8 palette = 14=#d2e7ff
palette = 15=#fff8fb palette = 15=#f8fbff
+2
View File
@@ -8,6 +8,8 @@ exec-once=dsearch serve --workers 1 --root ~ --exclude-hidden
exec-once=systemctl --user start hyprpolkitagent exec-once=systemctl --user start hyprpolkitagent
## first-run UI ## first-run UI
exec-once=~/.config/sdgos/firstrun.sh exec-once=~/.config/sdgos/firstrun.sh
## start nautilus in the background
exec-once=nautilus --gapplication-service
## start DankMaterial Shell ## start DankMaterial Shell
exec-once=dms run exec-once=dms run
+4
View File
@@ -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,8,toggleview,8 # toggle on workspace 8
bind=SUPER+alt,9,toggleview,9 # toggle on workspace 9 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 # move between monitors with mainmod + ctrl + 1-9
bind=SUPER+ctrl,1,tagmon,name:^DP-1$ # move to monitor DP-1 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 bind=SUPER+ctrl,2,tagmon,name:^HDMI-A-1$ # move to monitor HDMI-A-1
+2 -2
View File
@@ -1,6 +1,6 @@
# ! Auto-generated file. Do not edit directly. # ! Auto-generated file. Do not edit directly.
# Remove source = ./dms/colors.conf from your config to override. # Remove source = ./dms/colors.conf from your config to override.
bordercolor = 0xa08b92ff bordercolor = 0x8b919bff
focuscolor = 0xffb0ceff focuscolor = 0x9bcaffff
urgentcolor = 0xffb4abff urgentcolor = 0xffb4abff
+82 -82
View File
@@ -6,113 +6,113 @@
.theme-dark, .theme-light { .theme-dark, .theme-light {
/* ── Material You RGB helpers ──────────────────────────── */ /* ── Material You RGB helpers ──────────────────────────── */
--mat-bg-rgb: 28, 16, 20; --mat-bg-rgb: 13, 20, 28;
--mat-surface-rgb: 28, 16, 20; --mat-surface-rgb: 13, 20, 28;
--mat-on-surface-rgb: 245, 220, 227; --mat-on-surface-rgb: 221, 227, 238;
--mat-primary-rgb: 255, 176, 206; --mat-primary-rgb: 155, 202, 255;
--mat-on-primary-rgb: 100, 0, 58; --mat-on-primary-rgb: 0, 50, 86;
/* ── Core Backgrounds ──────────────────────────────────── */ /* ── Core Backgrounds ──────────────────────────────────── */
--background-primary: #1c1014; --background-primary: #0d141c;
--background-primary-alt: #1c1014; --background-primary-alt: #0d141c;
--background-secondary: #25181d; --background-secondary: #151c24;
--background-secondary-alt: #291c21; --background-secondary-alt: #192028;
/* ── Titlebar ──────────────────────────────────────────── */ /* ── Titlebar ──────────────────────────────────────────── */
--titlebar-background: #1c1014; --titlebar-background: #0d141c;
--titlebar-background-focused: #25181d; --titlebar-background-focused: #151c24;
--titlebar-text-color: #f5dce3; --titlebar-text-color: #dde3ee;
/* ── Borders & Dividers ────────────────────────────────── */ /* ── Borders & Dividers ────────────────────────────────── */
--background-modifier-border: #534248; --background-modifier-border: #414750;
--background-modifier-border-focus: #a08b92; --background-modifier-border-focus: #8b919b;
--background-modifier-border-hover: #a08b92; --background-modifier-border-hover: #8b919b;
/* ── Text Colors ───────────────────────────────────────── */ /* ── Text Colors ───────────────────────────────────────── */
--text-normal: #f5dce3; --text-normal: #dde3ee;
--text-muted: #d8c1c7; --text-muted: #c0c7d2;
--text-faint: #a08b92; --text-faint: #8b919b;
--text-on-accent: #64003a; --text-on-accent: #003256;
--text-selection: rgba(255, 176, 206, 0.25); --text-selection: rgba(155, 202, 255, 0.25);
/* ── Accent & Interactive ──────────────────────────────── */ /* ── Accent & Interactive ──────────────────────────────── */
--interactive-accent: #ffb0ce; --interactive-accent: #9bcaff;
--interactive-accent-hover: #8c0053; --interactive-accent-hover: #00497a;
--interactive-accent-rgb: 255, 176, 206; --interactive-accent-rgb: 155, 202, 255;
--text-accent: #ffb0ce; --text-accent: #9bcaff;
--text-accent-hover: #8c0053; --text-accent-hover: #00497a;
/* ── Hover & Active Modifiers ──────────────────────────── */ /* ── Hover & Active Modifiers ──────────────────────────── */
--background-modifier-hover: rgba(var(--mat-on-surface-rgb), 0.06); --background-modifier-hover: rgba(var(--mat-on-surface-rgb), 0.06);
--background-modifier-active-hover: rgba(var(--mat-primary-rgb), 0.15); --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: #93000a;
--background-modifier-error-hover: #ffb4ab; --background-modifier-error-hover: #ffb4ab;
/* ── Obsidian Color Scale (--color-base-XX) ────────────── */ /* ── Obsidian Color Scale (--color-base-XX) ────────────── */
--color-base-00: #1c1014; --color-base-00: #0d141c;
--color-base-05: #1c1014; --color-base-05: #0d141c;
--color-base-10: #170b0f; --color-base-10: #080f16;
--color-base-20: #25181d; --color-base-20: #151c24;
--color-base-25: #291c21; --color-base-25: #192028;
--color-base-30: #34262b; --color-base-30: #242b33;
--color-base-35: #403136; --color-base-35: #2f353e;
--color-base-40: #534248; --color-base-40: #414750;
--color-base-50: #a08b92; --color-base-50: #8b919b;
--color-base-60: #d8c1c7; --color-base-60: #c0c7d2;
--color-base-70: #f5dce3; --color-base-70: #dde3ee;
--color-base-100: #f5dce3; --color-base-100: #dde3ee;
/* ── Semantic Colors ───────────────────────────────────── */ /* ── Semantic Colors ───────────────────────────────────── */
--color-red: #ffb4ab; --color-red: #ffb4ab;
--color-orange: #ffb3af; --color-orange: #bfc2fa;
--color-yellow: #f2b7c0; --color-yellow: #b8c6ea;
--color-green: #6f3634; --color-green: #3e4372;
--color-cyan: #653b42; --color-cyan: #394664;
--color-blue: #ffb0ce; --color-blue: #9bcaff;
--color-purple: #f2b7c0; --color-purple: #b8c6ea;
--color-pink: #ffb3af; --color-pink: #bfc2fa;
/* ── Headings ──────────────────────────────────────────── */ /* ── Headings ──────────────────────────────────────────── */
--h1-color: #ffb0ce; --h1-color: #9bcaff;
--h2-color: #ffb0ce; --h2-color: #9bcaff;
--h3-color: #f2b7c0; --h3-color: #b8c6ea;
--h4-color: #ffb3af; --h4-color: #bfc2fa;
--h5-color: #d8c1c7; --h5-color: #c0c7d2;
--h6-color: #a08b92; --h6-color: #8b919b;
/* ── Links ─────────────────────────────────────────────── */ /* ── Links ─────────────────────────────────────────────── */
--link-color: #ffb0ce; --link-color: #9bcaff;
--link-color-hover: #ffd9e5; --link-color-hover: #d0e4ff;
--link-external-color: #ffb3af; --link-external-color: #bfc2fa;
--link-unresolved-color: #a08b92; --link-unresolved-color: #8b919b;
/* ── Tags ──────────────────────────────────────────────── */ /* ── Tags ──────────────────────────────────────────────── */
--tag-color: #ffd9e5; --tag-color: #d0e4ff;
--tag-background: #8c0053; --tag-background: #00497a;
--tag-border-color: #ffb0ce; --tag-border-color: #9bcaff;
--tag-color-hover: #64003a; --tag-color-hover: #003256;
--tag-background-hover: #ffb0ce; --tag-background-hover: #9bcaff;
/* ── Checkboxes ────────────────────────────────────────── */ /* ── Checkboxes ────────────────────────────────────────── */
--checkbox-color: #ffb0ce; --checkbox-color: #9bcaff;
--checkbox-color-hover: #8c0053; --checkbox-color-hover: #00497a;
--checkbox-border-color: #a08b92; --checkbox-border-color: #8b919b;
--checkbox-marker-color: #64003a; --checkbox-marker-color: #003256;
/* ── Code Blocks ───────────────────────────────────────── */ /* ── Code Blocks ───────────────────────────────────────── */
--code-background: #25181d; --code-background: #151c24;
--code-normal: #f5dce3; --code-normal: #dde3ee;
--code-comment: #a08b92; --code-comment: #8b919b;
--code-function: #ffb0ce; --code-function: #9bcaff;
--code-important: #ffb4ab; --code-important: #ffb4ab;
--code-keyword: #f2b7c0; --code-keyword: #b8c6ea;
--code-operator: #ffb3af; --code-operator: #bfc2fa;
--code-property: #d8c1c7; --code-property: #c0c7d2;
--code-punctuation: #534248; --code-punctuation: #414750;
--code-string: #ffb3af; --code-string: #bfc2fa;
--code-tag: #ffb4ab; --code-tag: #ffb4ab;
--code-value: #f2b7c0; --code-value: #b8c6ea;
/* ── Scrollbar ─────────────────────────────────────────── */ /* ── Scrollbar ─────────────────────────────────────────── */
--scrollbar-thumb-bg: rgba(var(--mat-on-surface-rgb), 0.12); --scrollbar-thumb-bg: rgba(var(--mat-on-surface-rgb), 0.12);
@@ -121,16 +121,16 @@
/* ── Inputs ────────────────────────────────────────────── */ /* ── Inputs ────────────────────────────────────────────── */
--input-shadow: none; --input-shadow: none;
--input-shadow-hover: 0 0 0 2px #a08b92; --input-shadow-hover: 0 0 0 2px #8b919b;
/* ── Graph View ────────────────────────────────────────── */ /* ── Graph View ────────────────────────────────────────── */
--graph-node: #ffb0ce; --graph-node: #9bcaff;
--graph-node-unresolved: #a08b92; --graph-node-unresolved: #8b919b;
--graph-node-focused: #ffd9e5; --graph-node-focused: #d0e4ff;
--graph-node-tag: #f2b7c0; --graph-node-tag: #b8c6ea;
--graph-node-attachment: #ffb3af; --graph-node-attachment: #bfc2fa;
--graph-line: #534248; --graph-line: #414750;
--graph-background: #1c1014; --graph-background: #0d141c;
} }
+18
View File
@@ -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"
+72
View File
@@ -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"