move from bug.n to komorebi+yasb

This commit is contained in:
Cynthia Foxwell 2022-09-14 22:26:38 -06:00
parent ee5c00e084
commit f57b5f90dd
4 changed files with 452 additions and 2 deletions

154
windows/.yasb/config.yaml Normal file
View file

@ -0,0 +1,154 @@
# Configuration for Yasb (Yet Another Status Bar)
# Author: @denBot
# Last updated: 08/11/2021
# General Bar Configuration Notes:
# - All bars must be defined in within the `bars` section
# - Each bar configuration should be defined using a name, e.g. 'yasb-bar', 'my-awesome-bar', etc.
# - Default bar options can be found at: https://github.com/denBot/yasb/blob/main/src/core/validation/bar.py#L1-L10
# General Widget Configuration Notes:
# - ALL configured widgets must be defined in within the `widgets` section of this config file
# - Each widget configuration should be allocated a unique name, e.g. 'my-widget', 'my-custom-clock', etc.
# > This makes it easier for you to keep track of your configured widgets and add them to your bar(s)
# - Each widget should specify a widget `type` - this points to the python class of the widget you are configuring
# > For example: type: "yasb.clock.ClockWidget"
# - Each widget supports mouse event callback functionality (left, middle, right click).
# > The callbacks "do_nothing" and "exec" can be used across any widget which allows them.
# > "exec" allows you to run programs from the command-line, where each argument is separated by a space
# > "do_nothing" allows you to override default mouse events to do nothing
# > "toggle_label" *some widgets* allow you to toggle between two label formats
# - Example callbacks:
# on_left: "exec wt.exe" -- run the windows terminal when the widget is left-clicked
# on_middle: "do_nothing" -- overrides default widget middle-click behaviour to do nothing
# on_right: "exec cmd /c Taskmg" -- open the task manager when the widget is right-clicked
watch_stylesheet: true
watch_config: true
bars:
yasb-bar:
enabled: true
screens: ['*']
class_name: "yasb-bar"
alignment:
position: "top"
center: false
blur_effect:
enabled: false
acrylic: false
dark: false
window_flags:
always_on_top: false
windows_app_bar: true
dimensions:
width: "100%"
height: 18
padding:
top: 0
left: 0
bottom: 0
right: 0
widgets:
left: ["komorebi_workspaces", "komorebi_active_layout"]
center: ["komorebi_multi_window"]
right: ["musicbee", "cpu", "memory", "clock"]
widgets:
active_window:
type: "yasb.active_window.ActiveWindowWidget"
options:
label: "{win[title]}"
label_alt: "[class_name='{win[class_name]}' exe='{win[process][name]}' hwnd={win[hwnd]}]"
label_no_window: ""
max_length: 48
max_length_ellipsis: "..."
monitor_exclusive: true
battery:
type: "yasb.battery.BatteryWidget"
options:
time_remaining_natural: true
clock:
type: "yasb.clock.ClockWidget"
options:
label: "\ue018 {%H:%M:%S}"
label_alt: "\ue1cd {%b, %m/%d/%Y}"
cpu:
type: "yasb.cpu.CpuWidget"
options:
label: "\ue040 {info[percent][total]}%"
update_interval: 500
memory:
type: "yasb.memory.MemoryWidget"
options:
label: "\ue021 {virtual_mem_free}"
label_alt: "\ue021 {virtual_mem_percent}%"
update_interval: 5000
callbacks:
on_right: "exec cmd /c Taskmgr"
komorebi_workspaces:
type: "komorebi.workspaces.WorkspaceWidget"
options:
label_offline: ""
label_workspace_btn: "{index}"
label_default_name: "{index}"
label_zero_index: false
hide_empty_workspaces: false
komorebi_active_layout:
type: "komorebi.active_layout.ActiveLayoutWidget"
options:
hide_if_offline: false
label: "{icon}"
layout_icons:
bsp: "\ue136"
columns: "\ue26c"
rows: "\ue133"
vertical_stack: "\ue131"
horizontal_stack: "\ue132"
ultrawide_vertical_stack: "\ue002"
monocle: "\ue13a"
maximised: "\ue130"
floating: "\ue135"
paused: "\ue09b"
callbacks:
on_left: 'next_layout'
on_middle: 'toggle_monocle'
on_right: 'prev_layout'
komorebi_multi_window:
type: "komorebi.multi_window.MultiWindowWidget"
options:
label: "{win[title]}"
label_alt: "[class={win[class]} exe={win[exe]} hwnd={win[hwnd]}]"
show_icon: false
min_update_interval: 100
update_title:
live_update: true
update_interval: 1000
callbacks:
on_left: "do_nothing"
on_middle: "do_nothing"
on_right: "toggle_label"
musicbee:
type: "musicbee.musicbee.MusicBeeWidget"
options:
label: "{state} {artist} - {title} [{position}/{duration}]"
label_alt: "{album_artist} // {album}"
update_interval: 1000
playback_icons:
playing: "\ue09a"
paused: "\ue09b"
stopped: "\ue099"
loading: "\u2026"
unknown: "?"
callbacks:
on_left: "do_nothing"
on_middle: "do_nothing"
on_right: "toggle_label"

80
windows/.yasb/styles.css Normal file
View file

@ -0,0 +1,80 @@
/*:root {
--_color0: #32344a;
--_color1: #f7768e;
--_color2: #9ece6a;
--_color3: #e0af68;
--_color4: #7aa2f7;
--_color5: #ad8ee6;
--_color6: #449dab;
--_color7: #787c99;
--_color8: #444b6a;
--_color9: #ff7a93;
--_color10: #b9f27c;
--_color11: #ff9e64;
--_color12: #7da6ff;
--_color13: #bb9af7;
--_color14: #0db9d7;
--_color15: #acb0d0;
--_colorFG: #a9b1d6;
--primary: #1a1b26;
--secondary: #16161e;
--tertiary: #101014;
--accent: #3d59a1;
--highlight: #565f89;
}*/
* {
font-family: "Terminus", "Unifont", "SijiNGWindows";
font-size: 12px;
font-weight: 400;
color: #a9b1d6;
border: none;
}
.bar {
background: #1a1b26;
padding: 0 2px;
}
.container-right .widget {
margin: 0 4px;
}
.komorebi-workspaces {
margin-left: 0;
}
.ws-btn {
padding: 0 4px;
background: transparent;
}
.ws-btn.populated {
color: #9ece6a;
}
.ws-btn.active {
color: #ad8ee6;
}
.komorebi-active-layout .label {
margin: -4px 2px 0px 4px;
}
.komorebi-multi-window .window {
margin: 0 8px;
color: #444b6a;
}
.clock-widget .label {
color: #449dab;
}
.cpu-widget .label {
color: #e0af68;
}
.memory-widget .label {
color: #9ece6a;
}
.musicbee-widget .label {
color: #ad8ee6;
}

View file

@ -183,6 +183,9 @@ Config_rule=diesel win32;PAYDAY 2;;0;1;;0;0;0;
Config_rule=Shell_TrayWnd;;;0;;;;;0;
Config_rule=gdkWindowToplevel;;;0;1;;0;0;0;
Config_rule=VMUIFrame;;;0;1;;0;0;0;
Config_rule=Window Class;tistow;;0;1;;0;0;0;
Config_rule=TForm1;Exeinfo PE.*;;0;1;;0;0;0;
Config_rule=HwndWrapper[PowerToys.PowerOCR.*];TextExtractor;;0;1;;0;0;0;
;; Configuration management
Config_autoSaveSession=auto
@ -229,7 +232,7 @@ Config_hotkey=#m::
Config_hotkey=#Left::View_setLayoutProperty(MFactor, 0, -0.05)
Config_hotkey=#Right::View_setLayoutProperty(MFactor, 0, +0.05)
Config_hotkey=#^t::View_setLayoutProperty(Axis, 0, +1, 1)
Config_hotkey=#^+Enter::View_setLayoutProperty(Axis, 0, +1, 1)
Config_hotkey=#^Enter::View_setLayoutProperty(Axis, 0, +2, 1)
Config_hotkey=#^Tab::View_setLayoutProperty(Axis, 0, +1, 2)
Config_hotkey=#^+Tab::View_setLayoutProperty(Axis, 0, +1, 3)
@ -266,7 +269,7 @@ Config_hotkey=#^q::ExitApp
;; Our Hotkeys
Config_hotkey=#!r::Reload
Config_hotkey=#Enter::Run, shell:AppsFolder\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe!App
Config_hotkey=#Enter::Run, wezterm-gui.exe
Config_hotkey=#+Space::Monitor_toggleBar()
Config_hotkey=#q::Manager_closeWindow()

213
windows/komorebi.ahk Normal file
View file

@ -0,0 +1,213 @@
#SingleInstance Force
; You can generate a fresh version of this file with "komorebic ahk-library"
#Include %A_ScriptDir%\komorebic.lib.ahk
; https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations
#Include %A_ScriptDir%\komorebi.generated.ahk
; Default to minimizing windows when switching workspaces
WindowHidingBehaviour("hide")
; Set cross-monitor move behaviour to insert instead of swap
CrossMonitorMoveBehaviour("swap")
; Enable hot reloading of changes to this file
WatchConfiguration("enable")
; Ensure there is 1 workspace created on monitor 0
EnsureWorkspaces(0, 9)
; Configure the invisible border dimensions
InvisibleBorders(2,2,2,2)
MouseFollowsFocus("disable")
; Configure the 1st workspace
WorkspaceName(0, 0, "I")
WorkspaceName(0, 1, "II")
WorkspaceName(0, 2, "III")
WorkspaceName(0, 3, "IV")
WorkspaceName(0, 4, "V")
WorkspaceName(0, 5, "VI")
WorkspaceName(0, 6, "VII")
WorkspaceName(0, 7, "VIII")
WorkspaceName(0, 8, "IX")
WorkspacePadding(0, 0, 0)
WorkspacePadding(0, 1, 0)
WorkspacePadding(0, 2, 0)
WorkspacePadding(0, 3, 0)
WorkspacePadding(0, 4, 0)
WorkspacePadding(0, 5, 0)
WorkspacePadding(0, 6, 0)
WorkspacePadding(0, 7, 0)
WorkspacePadding(0, 8, 0)
ContainerPadding(0, 0, 8)
ContainerPadding(0, 1, 8)
ContainerPadding(0, 2, 8)
ContainerPadding(0, 3, 8)
ContainerPadding(0, 4, 8)
ContainerPadding(0, 5, 8)
ContainerPadding(0, 6, 8)
ContainerPadding(0, 7, 8)
ContainerPadding(0, 8, 8)
; Uncomment the next two lines if you want a visual border drawn around the focused window
; ActiveWindowBorderColour(66, 165, 245) ; this is a nice blue colour
; ActiveWindowBorder("enable")
; Allow komorebi to start managing windows
CompleteConfiguration()
; Change the focused window, Alt + Vim direction keys (HJKL)
;!h::
;Focus("left")
;return
;
;!j::
;Focus("down")
;return
;
;!k::
;Focus("up")
;return
;
;!l::
;Focus("right")
;return
#!q::
Stop()
return
#!r::
ReloadConfiguration()
return
; Move the focused window in a given direction, Alt + Shift + Vim direction keys (HJKL)
#+h::
Move("left")
return
#+j::
Move("down")
return
#+k::
Move("up")
return
#+l::
Move("right")
return
#+w::
Move("up")
return
#+a::
Move("left")
return
#+s::
Move("down")
return
#+d::
Move("right")
return
#1::
FocusWorkspace(0)
return
#2::
FocusWorkspace(1)
return
#3::
FocusWorkspace(2)
return
#4::
FocusWorkspace(3)
return
#5::
FocusWorkspace(4)
return
#6::
FocusWorkspace(5)
return
#7::
FocusWorkspace(6)
return
#8::
FocusWorkspace(7)
return
#9::
FocusWorkspace(8)
return
#+1::
SendToWorkspace(0)
return
#+2::
SendToWorkspace(1)
return
#+3::
SendToWorkspace(2)
return
#+4::
SendToWorkspace(3)
return
#+5::
SendToWorkspace(4)
return
#+6::
SendToWorkspace(5)
return
#+7::
SendToWorkspace(6)
return
#+8::
SendToWorkspace(7)
return
#+9::
SendToWorkspace(8)
return
#f::
ToggleFloat()
return
#t::
Manage()
return
#+t::
Unmanage()
return
#Space::
Run, wezterm start
return
; There are many more commands that you can bind to whatever keys combinations you want!
;
; Have a look at the komorebic.lib.ahk file to see which arguments are required by different commands
;
; If you want more information about a command, you can run every komorebic command with "--help"
;
; For example, if you see this in komorebic.lib.ahk
;
; WorkspaceLayout(monitor, workspace, value) {
; Run, komorebic.exe workspace-layout %monitor% %workspace% %value%, , Hide
; }
;
; Just run "komorebic.exe workspace-layout --help" and you'll get all the information you need to use the command
;
; komorebic.exe-workspace-layout
; Set the layout for the specified workspace
;
; USAGE:
; komorebic.exe workspace-layout <MONITOR> <WORKSPACE> <VALUE>
;
; ARGS:
; <MONITOR> Monitor index (zero-indexed)
; <WORKSPACE> Workspace index on the specified monitor (zero-indexed)
; <VALUE> [possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack]
;
; OPTIONS:
; -h, --help Print help information