diff options
Diffstat (limited to 'fmurphy/.glzr')
-rwxr-xr-x | fmurphy/.glzr/glazewm/config.yaml | 297 | ||||
-rwxr-xr-x | fmurphy/.glzr/zebar/bar/bar.zebar.json | 34 | ||||
-rwxr-xr-x | fmurphy/.glzr/zebar/bar/index.html | 100 | ||||
-rwxr-xr-x | fmurphy/.glzr/zebar/bar/styles.css | 130 | ||||
-rwxr-xr-x | fmurphy/.glzr/zebar/settings.json | 6 |
5 files changed, 567 insertions, 0 deletions
diff --git a/fmurphy/.glzr/glazewm/config.yaml b/fmurphy/.glzr/glazewm/config.yaml new file mode 100755 index 0000000..ee28f85 --- /dev/null +++ b/fmurphy/.glzr/glazewm/config.yaml @@ -0,0 +1,297 @@ +general: + # Commands to run when the WM has started. This is useful for running a + # script or launching another application. + # Example: The below command launches Zebar. + startup_commands: ['shell-exec zebar'] + + # Commands to run just before the WM is shutdown. + # Example: The below command kills Zebar. + shutdown_commands: ['shell-exec taskkill /IM zebar.exe /F'] + + # Commands to run after the WM config is reloaded. + config_reload_commands: [] + + # Whether to automatically focus windows underneath the cursor. + focus_follows_cursor: true + + # Whether to switch back and forth between the previously focused + # workspace when focusing the current workspace. + toggle_workspace_on_refocus: false + + cursor_jump: + # Whether to automatically move the cursor on the specified trigger. + enabled: true + + # Trigger for cursor jump: + # - 'monitor_focus': Jump when focus changes between monitors. + # - 'window_focus': Jump when focus changes between windows. + trigger: 'monitor_focus' + + # How windows should be hidden when switching workspaces. + # - 'cloak': Recommended. Hides windows with no animation. + # - 'hide': Legacy method (v3.5 and earlier) that has a brief animation, + # but has stability issues with some apps. + hide_method: 'cloak' + + # Affects which windows get shown in the native Windows taskbar. Has no + # effect if `hide_method: 'hide'`. + # - 'true': Show all windows (regardless of workspace). + # - 'false': Only show windows from the currently shown workspaces. + show_all_in_taskbar: false + +gaps: + # Whether to scale the gaps with the DPI of the monitor. + scale_with_dpi: true + + # Gap between adjacent windows. + inner_gap: '5px' + + # Gap between windows and the screen edge. + outer_gap: + top: '29px' + right: '5px' + bottom: '5px' + left: '5px' + +window_effects: + # Visual effects to apply to the focused window. + focused_window: + # Highlight the window with a colored border. + # ** Exclusive to Windows 11 due to API limitations. + border: + enabled: true + color: '#89b4fa' + + # Remove the title bar from the window's frame. Note that this can + # cause rendering issues for some applications. + hide_title_bar: + enabled: false + + # Change the corner style of the window's frame. + # ** Exclusive to Windows 11 due to API limitations. + corner_style: + enabled: true + # Allowed values: 'square', 'rounded', 'small_rounded'. + style: 'rounded' + + # Change the transparency of the window. + transparency: + enabled: true + # Can be something like '95%' or '0.95' for slightly transparent windows. + # '0' or '0%' is fully transparent (and, by consequence, unfocusable). + opacity: '95%' + + # Visual effects to apply to non-focused windows. + other_windows: + border: + enabled: true + color: '#585b70' + hide_title_bar: + enabled: false + corner_style: + enabled: true + style: 'rounded' + transparency: + enabled: true + opacity: '95%' + +window_behavior: + # New windows are created in this state whenever possible. + # Allowed values: 'tiling', 'floating'. + initial_state: 'tiling' + + # Sets the default options for when a new window is created. This also + # changes the defaults for when the state change commands, like + # `set-floating`, are used without any flags. + state_defaults: + floating: + # Whether to center floating windows by default. + centered: true + + # Whether to show floating windows as always on top. + shown_on_top: false + + fullscreen: + # Maximize the window if possible. If the window doesn't have a + # maximize button, then it'll be fullscreen'ed normally instead. + maximized: false + + # Whether to show fullscreen windows as always on top. + shown_on_top: false + +workspaces: + - name: '1' + bind_to_monitor: 1 + keep_alive: true + - name: '2' + - name: '3' + - name: '4' + - name: '5' + - name: '6' + - name: '7' + - name: '8' + - name: '9' + bind_to_monitor: 0 + keep_alive: true + +window_rules: + - commands: ['ignore'] + match: + # Ignores any Zebar windows. + - window_process: { equals: 'zebar' } + + # Ignores picture-in-picture windows for browsers. + - window_title: { regex: '[Pp]icture.in.[Pp]icture' } + window_class: { regex: 'Chrome_WidgetWin_1|MozillaDialogClass' } + + # Ignore rules for various 3rd-party apps. + - window_process: { equals: 'PowerToys' } + window_class: { regex: 'HwndWrapper\[PowerToys\.PowerAccent.*?\]' } + - window_process: { equals: 'PowerToys' } + window_title: { regex: '.*? - Peek' } + - window_process: { equals: 'Lively' } + window_class: { regex: 'HwndWrapper' } + - window_process: { equals: 'EXCEL' } + window_class: { not_regex: 'XLMAIN' } + - window_process: { equals: 'WINWORD' } + window_class: { not_regex: 'OpusApp' } + - window_process: { equals: 'POWERPNT' } + window_class: { not_regex: 'PPTFrameClass' } + +binding_modes: + # When enabled, the focused window can be resized via arrow keys or HJKL. + - name: 'resize' + keybindings: + - commands: ['resize --width -2%'] + bindings: ['h', 'left'] + - commands: ['resize --width +2%'] + bindings: ['l', 'right'] + - commands: ['resize --height +2%'] + bindings: ['k', 'up'] + - commands: ['resize --height -2%'] + bindings: ['j', 'down'] + # Press enter/escape to return to default keybindings. + - commands: ['wm-disable-binding-mode --name resize'] + bindings: ['escape', 'enter'] + +keybindings: + # Shift focus in a given direction. + - commands: ['focus --direction left'] + bindings: ['LWin+left'] + - commands: ['focus --direction right'] + bindings: ['LWin+right'] + - commands: ['focus --direction up'] + bindings: ['LWin+up'] + - commands: ['focus --direction down'] + bindings: ['LWin+down'] + + # Move focused window in a given direction. + - commands: ['move --direction left'] + bindings: ['LWin+shift+left'] + - commands: ['move --direction right'] + bindings: ['LWin+shift+right'] + - commands: ['move --direction up'] + bindings: ['LWin+shift+up'] + - commands: ['move --direction down'] + bindings: ['LWin+shift+down'] + + # As an Winernative to the resize keybindings above, resize mode enables + # resizing via arrow keys or HJKL. The binding mode is defined above with + # the name 'resize'. + - commands: ['wm-enable-binding-mode --name resize'] + bindings: ['LWin+r'] + + # Disables window management and all other keybindings until LWin+shift+p + # is pressed again. + - commands: ['wm-toggle-pause'] + bindings: ['LWin+shift+p'] + + # Change tiling direction. This determines where new tiling windows will + # be inserted. + - commands: ['toggle-tiling-direction'] + bindings: ['LWin+v'] + + # Change focus from tiling windows -> floating -> fullscreen. + - commands: ['wm-cycle-focus'] + bindings: ['LWin+space'] + + # Change the focused window to be floating. + - commands: ['toggle-floating --centered'] + bindings: ['LWin+shift+space'] + + # Change the focused window to be tiling. + - commands: ['toggle-tiling'] + bindings: ['LWin+t'] + + # Change the focused window to be fullscreen. + - commands: ['toggle-fullscreen'] + bindings: ['LWin+f'] + + # Minimize focused window. + - commands: ['toggle-minimized'] + bindings: ['LWin+m'] + + # Close focused window. + - commands: ['close'] + bindings: ['LWin+shift+q'] + + # Kill GlazeWM process safely. + - commands: ['wm-exit'] + bindings: ['LWin+shift+e'] + + # Re-evaluate configuration file. + - commands: ['wm-reload-config'] + bindings: ['LWin+shift+r'] + + # Redraw all windows. + - commands: ['wm-redraw'] + bindings: ['LWin+shift+w'] + + # Launch CMD terminal. Alternatively, use `shell-exec wt` or + # `shell-exec %ProgramFiles%/Git/git-bash.exe` to start Windows + # Terminal and Git Bash respectively. + - commands: ['shell-exec wt'] + bindings: ['LWin+enter'] + + - commands: ['shell-exec %ProgramFiles%/LibreWolf/librewolf.exe'] + bindings: ['LWin+w'] + + # Change focus to a workspace defined in `workspaces` config. + - commands: ['focus --workspace 1'] + bindings: ['LWin+1'] + - commands: ['focus --workspace 2'] + bindings: ['LWin+2'] + - commands: ['focus --workspace 3'] + bindings: ['LWin+3'] + - commands: ['focus --workspace 4'] + bindings: ['LWin+4'] + - commands: ['focus --workspace 5'] + bindings: ['LWin+5'] + - commands: ['focus --workspace 6'] + bindings: ['LWin+6'] + - commands: ['focus --workspace 7'] + bindings: ['LWin+7'] + - commands: ['focus --workspace 8'] + bindings: ['LWin+8'] + - commands: ['focus --workspace 9'] + bindings: ['LWin+9'] + + # Move focused window to a workspace defined in `workspaces` config. + - commands: ['move --workspace 1'] + bindings: ['LWin+shift+1'] + - commands: ['move --workspace 2'] + bindings: ['LWin+shift+2'] + - commands: ['move --workspace 3'] + bindings: ['LWin+shift+3'] + - commands: ['move --workspace 4'] + bindings: ['LWin+shift+4'] + - commands: ['move --workspace 5'] + bindings: ['LWin+shift+5'] + - commands: ['move --workspace 6'] + bindings: ['LWin+shift+6'] + - commands: ['move --workspace 7'] + bindings: ['LWin+shift+7'] + - commands: ['move --workspace 8'] + bindings: ['LWin+shift+8'] + - commands: ['move --workspace 9'] + bindings: ['LWin+shift+9'] diff --git a/fmurphy/.glzr/zebar/bar/bar.zebar.json b/fmurphy/.glzr/zebar/bar/bar.zebar.json new file mode 100755 index 0000000..b06cf19 --- /dev/null +++ b/fmurphy/.glzr/zebar/bar/bar.zebar.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://github.com/glzr-io/zebar/raw/v2.7.0/resources/widget-schema.json", + "htmlPath": "./index.html", + "zOrder": "normal", + "shownInTaskbar": false, + "focused": false, + "resizable": false, + "transparent": true, + "caching": { + "defaultDuration": 604800, + "rules": [] + }, + "privileges": { + "shellCommands": [] + }, + "presets": [ + { + "name": "default", + "anchor": "top_left", + "offsetX": "0px", + "offsetY": "0px", + "width": "100%", + "height": "48px", + "monitorSelection": { + "type": "all" + }, + "dockToEdge": { + "enabled": false, + "edge": null, + "windowMargin": "0px" + } + } + ] +} diff --git a/fmurphy/.glzr/zebar/bar/index.html b/fmurphy/.glzr/zebar/bar/index.html new file mode 100755 index 0000000..a100410 --- /dev/null +++ b/fmurphy/.glzr/zebar/bar/index.html @@ -0,0 +1,100 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + + <!-- Custom styles. --> + <link rel="stylesheet" type="text/css" href="./styles.css" /> + + <!-- Allows React to be run buildless via "text/babel" script below. --> + <script + src="https://unpkg.com/@babel/standalone@7.25.6/babel.min.js" + integrity="sha256-aS0B0wnsaDByLfE16h4MDCP1fQFccysd1YWOcV+gbBo=" + crossorigin="anonymous" + ></script> + </head> + <body> + <div id="root"></div> + + <script type="text/babel" data-type="module"> + import React, { + useState, + useEffect, + } from 'https://esm.sh/react@18?dev'; + import { createRoot } from 'https://esm.sh/react-dom@18/client?dev'; + import * as zebar from 'https://esm.sh/zebar@2'; + + const providers = zebar.createProviderGroup({ + glazewm: { type: 'glazewm' }, + cpu: { type: 'cpu' }, + memory: { type: 'memory' }, + date: { type: 'date', formatting: 'yyyy-LL-dd HH:mm:ss' }, + }); + + createRoot(document.getElementById('root')).render(<App />); + + function App() { + const [output, setOutput] = useState(providers.outputMap); + + useEffect(() => { + providers.onOutput(() => setOutput(providers.outputMap)); + }, []); + + return ( + <div className="app"> + <div className="left"> + {output.glazewm && ( + <div className="workspaces"> + {output.glazewm.currentWorkspaces.map(workspace => ( + <button + className={`workspace ${workspace.hasFocus && 'focused'} ${workspace.isDisplayed && 'displayed'}`} + onClick={() => + output.glazewm.runCommand( + `focus --workspace ${workspace.name}`, + ) + } + key={workspace.name} + > + {workspace.displayName ?? workspace.name} + </button> + ))} + </div> + )} + </div> + + <div className="center"> + {output.date && ( + <div className="date"> + {output.date.formatted} + </div> + )} + </div> + + <div className="right"> + {output.memory && ( + <div className="memory"> + <i className="nf nf-fae-chip"></i> + {Math.round(output.memory.usage)}% + </div> + )} + + {output.cpu && ( + <div className="cpu"> + <i className="nf nf-oct-cpu"></i> + + {/* Change the text color if the CPU usage is high. */} + <span + className={output.cpu.usage > 85 ? 'high-usage' : ''} + > + {Math.round(output.cpu.usage)}% + </span> + </div> + )} + </div> + </div> + ); + } + </script> + </body> +</html> diff --git a/fmurphy/.glzr/zebar/bar/styles.css b/fmurphy/.glzr/zebar/bar/styles.css new file mode 100755 index 0000000..64bdc5e --- /dev/null +++ b/fmurphy/.glzr/zebar/bar/styles.css @@ -0,0 +1,130 @@ +@import 'https://www.nerdfonts.com/assets/css/webfont.css'; + +* { + --red: #f38ba8; + --blue: #89b4fa; + --text: #cdd6f4; + --subtext1: #bac2de; + --subtext0: #a6adc8; + --overlay2: #9399b2; + --overlay1: #7f849c; + --overlay0: #6c7086; + --surface2: #585b70; + --surface1: #45475a; + --surface0: #313244; + --base: #1e1e2e; + --mantle: #181825; + --crust: #11111b; + --primary: var(--blue); + --gap: 5px; + --border: 24px; + box-sizing: border-box; +} + +i { + color: var(--primary); + margin-right: 7px; +} + +div, +span, +p { + cursor: default; + user-select: none; +} + +html, +body, +#root { + height: 100%; + font-size: 12px; + overflow: hidden; + font-family: ui-monospace, monospace; +} + +.app { + display: grid; + position: relative; + grid-template-columns: 1fr 1fr 1fr; + align-items: center; + height: 24px; + color: var(--text); + background: var(--base); +} + +.left { + display: flex; + align-items: center; + margin-left: var(--gap); + + .workspaces { + display: flex; + align-items: center; + + .workspace { + background: var(--surface1); + color: var(--text); + margin-right: var(--gap); + padding: 2px 6px; + border: none; + border-radius: 2px; + cursor: pointer; + + &.focused { + background: var(--primary); + color: var(--mantle); + } + + &:hover:not(.focused) { + background: var(--overlay0); + } + } + } +} + +.center { + display: flex; + align-items: center; + justify-self: center; +} + +.right { + display: flex; + align-items: center; + justify-self: end; + + .memory, + .cpu { + margin-right: 20px; + } + + .cpu .high-usage { + color: var(--red); + } +} + +.app::before { + content: ''; + position: absolute; + bottom: calc(var(--border) * -1); + left: 0; + height: var(--border); + width: var(--border); + border-top-left-radius: 50%; + background: transparent; + box-shadow: 0 calc(var(--border) * -0.5) 0 0 var(--base); + z-index: -1; +} + +.app::after { + content: ''; + position: absolute; + bottom: calc(var(--border) * -1); + right: 0; + height: var(--border); + width: var(--border); + border-top-right-radius: 50%; + background: transparent; + box-shadow: 0 calc(var(--border) * -0.5) 0 0 var(--base); + z-index: -1; +} diff --git a/fmurphy/.glzr/zebar/settings.json b/fmurphy/.glzr/zebar/settings.json new file mode 100755 index 0000000..004ce9e --- /dev/null +++ b/fmurphy/.glzr/zebar/settings.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://github.com/glzr-io/zebar/raw/v2.7.0/resources/settings-schema.json", + "startupConfigs": [ + "bar\\bar.zebar.json" + ] +} |