You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+155Lines changed: 155 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,11 @@ An event-driven service that automatically manages Hyprland monitor configuratio
65
65
*[Development Commands](#development-commands)
66
66
*[Development Workflow](#development-workflow)
67
67
*[Release Candidates](#release-candidates)
68
+
*[FAQ](#faq)
69
+
*[How do I assign workspaces to specific monitors?](#how-do-i-assign-workspaces-to-specific-monitors)
70
+
*[How do I use the TUI to create or edit profiles?](#how-do-i-use-the-tui-to-create-or-edit-profiles)
71
+
*[Can I use the TUI without running the hyprdynamicmonitors daemon?](#can-i-use-the-tui-without-running-the-hyprdynamicmonitors-daemon)
72
+
*[Why are my comments becoming part of the configuration in templates?](#why-are-my-comments-becoming-part-of-the-configuration-in-templates)
68
73
*[Alternative software](#alternative-software)
69
74
<!--te-->
70
75
@@ -879,6 +884,156 @@ To install the RC version from AUR:
879
884
yay -S hyprdynamicmonitors-rc-bin
880
885
```
881
886
887
+
## FAQ
888
+
889
+
### How do I assign workspaces to specific monitors?
890
+
891
+
You can include workspace assignments directly in your profile configuration files. HyprDynamicMonitors generates or links Hyprland configuration files, so any valid Hyprland configuration syntax works.
892
+
893
+
**Example with static configuration:**
894
+
895
+
In your profile configuration file (e.g., `hyprconfigs/triple-monitor.conf`):
896
+
```hyprconfig
897
+
# Monitor configuration
898
+
monitor=desc:BOE 0x0C6B,preferred,0x0,1
899
+
monitor=desc:LG Electronics LG ULTRAWIDE 408NTVSDT319,preferred,1920x0,1
900
+
monitor=desc:Dell Inc. DELL P2222H B2RY1H3,preferred,3840x0,1
901
+
902
+
# Workspace assignments
903
+
workspace=1,monitor:desc:BOE 0x0C6B,default:true
904
+
workspace=2,monitor:desc:LG Electronics LG ULTRAWIDE 408NTVSDT319,default:true
905
+
workspace=3,monitor:desc:Dell Inc. DELL P2222H B2RY1H3,default:true
906
+
```
907
+
908
+
**Example with templates:**
909
+
910
+
In `hyprconfigs/dual-monitor.go.tmpl`:
911
+
```go
912
+
{{- $laptop:= index .MonitorsByTag"laptop" -}}
913
+
{{- $external:= index .MonitorsByTag"external" -}}
You can also use the TUI (`hyprdynamicmonitors tui`) to create and edit profiles interactively.
923
+
924
+
### How do I use the TUI to create or edit profiles?
925
+
926
+
The TUI provides an interactive way to configure monitors and manage profiles. The workflow involves two main views:
927
+
928
+
**Step 1: Configure monitors in the Monitors view**
929
+
- Adjust your monitor settings (resolution, position, scale, etc.)
930
+
- Apply the configuration with `a` to test it in Hyprland
931
+
- Once satisfied with the layout, proceed to save it as a profile
932
+
933
+
**Step 2: Switch to the HDM Profile view**
934
+
- Press `Tab` to switch between Monitors view and HDM Profile view
935
+
- Choose to either:
936
+
-**Edit existing profile**: Press `a` to apply the current monitor configuration to the selected profile
937
+
-**Create new profile**: Press `n` to create a new profile with the current monitor configuration
938
+
939
+
**Understanding the generated configuration:**
940
+
941
+
The TUI places generated configuration between comment markers in your profile config files:
942
+
```hyprconfig
943
+
# <<<<< TUI AUTO START
944
+
monitor=eDP-1,2880x1920@120,0x0,1.5
945
+
monitor=DP-1,3840x2160@60,2880x0,1
946
+
# <<<<< TUI AUTO END
947
+
```
948
+
949
+
You can add additional settings outside these markers, and they will be preserved across TUI updates. This is useful for:
950
+
- Overriding specific settings
951
+
- Adding workspace assignments
952
+
- Including additional Hyprland configuration
953
+
954
+
**Manual editing:**
955
+
956
+
From the HDM Profile view, you can manually edit files using your `$EDITOR`:
957
+
- Edit the profile configuration file (the Hyprland config)
958
+
- Edit the HDM configuration file (the TOML config)
959
+
960
+
This allows you to fine-tune settings or add advanced configuration that the TUI doesn't directly support.
961
+
962
+
For more details, see the [TUI documentation](./docs/tui-help.md).
963
+
964
+
### Can I use the TUI without running the hyprdynamicmonitors daemon?
965
+
966
+
Yes, the TUI can be used standalone without the daemon running. However, functionality is limited:
967
+
968
+
**What works without the daemon:**
969
+
- Experimenting with monitor configurations in the Monitors view
970
+
- Applying configurations manually and ephemerally with `a` (changes are temporary until Hyprland restarts)
971
+
- Testing different layouts and settings interactively
972
+
973
+
**What requires a valid configuration:**
974
+
- Saving profiles to HyprDynamicMonitors configuration (HDM Profile view features)
975
+
- Persisting monitor configurations that automatically apply on monitor connect/disconnect
976
+
- Power state-based profile switching
977
+
978
+
**Typical standalone usage:**
979
+
```bash
980
+
# Use TUI to experiment with monitor layouts
981
+
hyprdynamicmonitors tui
982
+
983
+
# Configure monitors interactively, apply with 'a' to test
984
+
# Changes are applied to Hyprland but not persisted
985
+
```
986
+
987
+
If you want to persist configurations created in the TUI, you need a valid HyprDynamicMonitors config file. You can start with a minimal config and build from there using the TUI's profile creation features.
988
+
989
+
### Why are my comments becoming part of the configuration in templates?
990
+
991
+
This is due to Go template whitespace trimming behavior. When you use `-}}`, it removes all whitespace (including newlines) after the template action.
992
+
993
+
**Problem example:**
994
+
```go
995
+
# auto generated by hyprdynamicmonitors
996
+
997
+
{{- $laptop:= index .MonitorsByTag"LaptopMonitor" -}}
998
+
{{- $external:= index .MonitorsByTag"ExternalMonitor" -}}
999
+
1000
+
monitor={{$laptop.Name}}, disable
1001
+
# change to your preferred external monitor config
1002
+
monitor={{$external.Name}},preferred,0x0,1
1003
+
```
1004
+
1005
+
The `-}}` after the variable definitions removes the newline, causing `monitor={{$laptop.Name}}, disable` to be pulled up into the comment above it, creating one long comment line.
1006
+
1007
+
**Solution 1: Remove trailing dash from the last template action**
1008
+
```go
1009
+
# auto generated by hyprdynamicmonitors
1010
+
1011
+
{{- $laptop:= index .MonitorsByTag"LaptopMonitor" -}}
1012
+
{{- $external:= index .MonitorsByTag"ExternalMonitor" }}
1013
+
1014
+
monitor={{$laptop.Name}}, disable
1015
+
# change to your preferred external monitor config
1016
+
monitor={{$external.Name}},preferred,0x0,1
1017
+
```
1018
+
1019
+
**Solution 2: Define all variables at the start, then add content**
1020
+
```go
1021
+
{{- $laptop:= index .MonitorsByTag"LaptopMonitor" -}}
1022
+
{{- $external:= index .MonitorsByTag"ExternalMonitor" -}}
1023
+
1024
+
1025
+
# auto generated by hyprdynamicmonitors
1026
+
# change to your preferred external monitor config
1027
+
monitor={{$laptop.Name}}, disable
1028
+
monitor={{$external.Name}},preferred,0x0,1
1029
+
```
1030
+
1031
+
**Key points:**
1032
+
-`-}}` trims all whitespace **after** the action, including newlines
1033
+
- This can cause the next line to merge with whatever comes before the template action
1034
+
- Use `}}` (without trailing dash) on the last variable definition before your config
1035
+
- Or group all variable definitions at the top, separated from config with blank lines
1036
+
882
1037
## Alternative software
883
1038
884
1039
Most similar tools are more generic, working with any Wayland compositor. In contrast, `hyprdynamicmonitors` is specifically designed for Hyprland (using its IPC) but provides several advantages:
0 commit comments