Finally working display toggle
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
---@module 'hl'
|
||||
|
||||
-- === MONITEURS ===
|
||||
local monitors = require("monitors")
|
||||
require("monitors")
|
||||
|
||||
-- Workspace rules (intégrées directement)
|
||||
hl.workspace_rule({ workspace = 1, monitor = "eDP-1" })
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00,0x0,1.33333333,transform,0,vrr,0
|
||||
6
.config/hypr/monitors.conf.bak
Normal file
6
.config/hypr/monitors.conf.bak
Normal file
@@ -0,0 +1,6 @@
|
||||
# Generated with hyprdynamicmonitors freeze.
|
||||
# mode: "laptop" = interne seul, "external" = externe seul, sinon (both/vide) = les deux
|
||||
|
||||
monitor=desc:BOE 0x0B29,disable
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,2560x1440@119.99800,0x0,1.00000000,transform,0,vrr,0
|
||||
|
||||
@@ -1,41 +1,5 @@
|
||||
-- Generated by hyprconf2lua v1.4.0
|
||||
-- https://github.com/Prateek-squadron/hyprconf2lua
|
||||
-- Manual review may be needed for complex directives
|
||||
-- Généré par hyprdynamicmonitors
|
||||
-- mode: "laptop" = interne seul, "external" = externe seul, sinon = les deux
|
||||
|
||||
---@module 'hl'
|
||||
|
||||
-- Generated with hyprdynamicmonitors freeze.
|
||||
|
||||
-- This is a template that you can edit, it is just a starter that pulled your current monitor setup,
|
||||
|
||||
-- adjust as needed.
|
||||
|
||||
-- You can use templates here etc, see https://github.com/fiffeek/hyprdynamicmonitors/blob/main/examples/basic/hyprconfigs/template.go.tmpl.
|
||||
|
||||
-- Monitors are given arbitrary tags (the "monitor" prefix and the ID coming from hyprland).
|
||||
|
||||
-- If you are using tui to edit, leave this at the end of your file (the last monitor config applies)
|
||||
|
||||
-- and leave the markers.
|
||||
|
||||
-- <<<<< TUI AUTO START
|
||||
|
||||
hl.monitor({
|
||||
output = "desc:BOE 0x0B29",
|
||||
mode = "2560x1600@120.00",
|
||||
position = "320x1440",
|
||||
scale = 1.33333333,
|
||||
transform = 0,
|
||||
vrr = 0,
|
||||
})
|
||||
|
||||
hl.monitor({
|
||||
output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000",
|
||||
mode = "2560x1440@119.99800",
|
||||
position = "0x0",
|
||||
scale = 1.00000000,
|
||||
transform = 0,
|
||||
vrr = 0,
|
||||
})
|
||||
|
||||
-- <<<<< TUI AUTO END
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", mode = "2560x1600@120.00", position = "320x1440", scale = 1.33333333, transform = 0, vrr = 0, disabled = false })
|
||||
hl.monitor({ output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000", mode = "2560x1440@119.99800", position = "0x0", scale = 1.0, transform = 0, vrr = 0, disabled = false })
|
||||
|
||||
5
.config/hypr/monitors.lua.bak
Normal file
5
.config/hypr/monitors.lua.bak
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Généré par hyprdynamicmonitors
|
||||
-- mode: "laptop" = interne seul, "external" = externe seul, sinon = les deux
|
||||
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", mode = "2560x1600@120.00", position = "320x1440", scale = 1.33333333, transform = 0, vrr = 0, disabled = false })
|
||||
hl.monitor({ output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000", mode = "2560x1440@119.99800", position = "0x0", scale = 1.0, transform = 0, vrr = 0, disabled = false })
|
||||
@@ -12,7 +12,7 @@ fi
|
||||
|
||||
# 2. Vérifier que le fichier de configuration existe avant de le modifier
|
||||
if [ -f "$CONFIG_DIR/config.toml" ]; then
|
||||
sed -i 's/^mode = ".*"/mode = "both"/' "$CONFIG_DIR/config.toml"
|
||||
sed -i --follow-symlinks 's/^mode = ".*"/mode = "both"/' "$CONFIG_DIR/config.toml"
|
||||
else
|
||||
echo "Erreur : $CONFIG_DIR/config.toml introuvable" >&2
|
||||
exit 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[general]
|
||||
destination = "$HOME/.config/hypr/monitors.conf"
|
||||
destination = "$HOME/.config/hypr/monitors.lua"
|
||||
|
||||
[power_events]
|
||||
|
||||
@@ -33,3 +33,7 @@ config_file_type = "template"
|
||||
[[profiles.solo.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
monitor_tag = "monitor0"
|
||||
|
||||
[fallback_profile]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/fallback-eco.go.tmpl"
|
||||
config_file_type = "template"
|
||||
@@ -1,5 +1,5 @@
|
||||
[general]
|
||||
destination = "$HOME/.config/hypr/monitors.conf"
|
||||
destination = "$HOME/.config/hypr/monitors.lua"
|
||||
|
||||
[power_events]
|
||||
|
||||
@@ -9,14 +9,13 @@ path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
[[power_events.dbus_signal_match_rules]]
|
||||
object_path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
|
||||
[profiles.dual]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/dual.go.tmpl"
|
||||
config_file_type = "template"
|
||||
[profiles.dual.conditions]
|
||||
|
||||
[profiles.dual.static_template_values]
|
||||
mode = ""
|
||||
mode = "both"
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
@@ -37,4 +36,4 @@ monitor_tag = "monitor0"
|
||||
|
||||
[fallback_profile]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/fallback.go.tmpl"
|
||||
config_file_type = "template"
|
||||
config_file_type = "template"
|
||||
@@ -1,40 +0,0 @@
|
||||
[general]
|
||||
destination = "$HOME/.config/hypr/monitors.conf"
|
||||
|
||||
[power_events]
|
||||
|
||||
[power_events.dbus_query_object]
|
||||
path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
[[power_events.dbus_signal_match_rules]]
|
||||
object_path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
|
||||
[profiles.dual]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/dual.go.tmpl"
|
||||
config_file_type = "template"
|
||||
[profiles.dual.conditions]
|
||||
|
||||
[profiles.dual.static_template_values]
|
||||
mode = "both"
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
monitor_tag = "monitor0"
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "Shenzhen KTC Technology Group H27T7P-2 0000000000000"
|
||||
monitor_tag = "monitor1"
|
||||
|
||||
[profiles.solo]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/solo.go.tmpl"
|
||||
config_file_type = "template"
|
||||
|
||||
[profiles.solo.conditions]
|
||||
[[profiles.solo.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
monitor_tag = "monitor0"
|
||||
|
||||
[fallback_profile]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/fallback.go.tmpl"
|
||||
config_file_type = "template"
|
||||
1
.config/hyprdynamicmonitors/config.toml
Symbolic link
1
.config/hyprdynamicmonitors/config.toml
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/lucas/.config/hyprdynamicmonitors/config-power.toml
|
||||
@@ -1,14 +1,12 @@
|
||||
# Generated with hyprdynamicmonitors freeze.
|
||||
# mode: "laptop" = interne seul, "external" = externe seul, sinon (both/vide) = les deux
|
||||
-- Généré par hyprdynamicmonitors
|
||||
-- mode: "laptop" = interne seul, "external" = externe seul, sinon = les deux
|
||||
{{ if eq .mode "laptop" }}
|
||||
monitor=desc:BOE 0x0B29,2560x1600@48.00,0x0,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,disable
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", mode = "2560x1600@48.00", position = "0x0", scale = 1.33333333, transform = 0, vrr = 0, disabled = false })
|
||||
hl.monitor({ output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000", disabled = true })
|
||||
{{ else if eq .mode "external" }}
|
||||
monitor=desc:BOE 0x0B29,disable
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,2560x1440@119.99800,0x0,1.00000000,transform,0,vrr,0
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", disabled = true })
|
||||
hl.monitor({ output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000", mode = "2560x1440@119.99800", position = "0x0", scale = 1.0, transform = 0, vrr = 0, disabled = false })
|
||||
{{ else }}
|
||||
# <<<<< TUI AUTO START
|
||||
monitor=desc:BOE 0x0B29,2560x1600@48.00,320x1440,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,2560x1440@119.99800,0x0,1.00000000,transform,0,vrr,0
|
||||
# <<<<< TUI AUTO END
|
||||
{{ end }}
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", mode = "2560x1600@48.00", position = "320x1440", scale = 1.33333333, transform = 0, vrr = 0, disabled = false })
|
||||
hl.monitor({ output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000", mode = "2560x1440@119.99800", position = "0x0", scale = 1.0, transform = 0, vrr = 0, disabled = false })
|
||||
{{ end }}
|
||||
@@ -1,14 +1,12 @@
|
||||
# Generated with hyprdynamicmonitors freeze.
|
||||
# mode: "laptop" = interne seul, "external" = externe seul, sinon (both/vide) = les deux
|
||||
-- Généré par hyprdynamicmonitors
|
||||
-- mode: "laptop" = interne seul, "external" = externe seul, sinon = les deux
|
||||
{{ if eq .mode "laptop" }}
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00,0x0,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,disable
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", mode = "2560x1600@120.00", position = "0x0", scale = 1.33333333, transform = 0, vrr = 0, disabled = false })
|
||||
hl.monitor({ output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000", disabled = true })
|
||||
{{ else if eq .mode "external" }}
|
||||
monitor=desc:BOE 0x0B29,disable
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,2560x1440@119.99800,0x0,1.00000000,transform,0,vrr,0
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", disabled = true })
|
||||
hl.monitor({ output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000", mode = "2560x1440@119.99800", position = "0x0", scale = 1.0, transform = 0, vrr = 0, disabled = false })
|
||||
{{ else }}
|
||||
# <<<<< TUI AUTO START
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00,320x1440,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,2560x1440@119.99800,0x0,1.00000000,transform,0,vrr,0
|
||||
# <<<<< TUI AUTO END
|
||||
{{ end }}
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", mode = "2560x1600@120.00", position = "320x1440", scale = 1.33333333, transform = 0, vrr = 0, disabled = false })
|
||||
hl.monitor({ output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000", mode = "2560x1440@119.99800", position = "0x0", scale = 1.0, transform = 0, vrr = 0, disabled = false })
|
||||
{{ end }}
|
||||
@@ -0,0 +1,7 @@
|
||||
{{- range .Monitors}}
|
||||
{{- if eq .Name "eDP-1"}}
|
||||
hl.monitor({ output = "eDP-1", mode = "2560x1600@48.00", position = "320x1440", scale = 1.3333334, disabled = false })
|
||||
{{- else}}
|
||||
hl.monitor({ output = "{{.Name}}", mode = "preferred", position = "auto", scale = 1, disabled = false })
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
@@ -1,7 +1,7 @@
|
||||
{{- range .Monitors}}
|
||||
{{- if eq .Name "eDP-1"}}
|
||||
monitor=eDP-1,2560x1600@120,320x1440,1.3333334
|
||||
hl.monitor({ output = "eDP-1", mode = "2560x1600@120", position = "320x1440", scale = 1.3333334, disabled = false })
|
||||
{{- else}}
|
||||
monitor={{.Name}},preferred,auto,1
|
||||
{{- end}}
|
||||
hl.monitor({ output = "{{.Name}}", mode = "preferred", position = "auto", scale = 1, disabled = false })
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
@@ -1 +1 @@
|
||||
monitor=desc:BOE 0x0B29,2560x1600@48.00,0x0,1.33333333,transform,0,vrr,0
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", mode = "2560x1600@48.00", position = "0x0", scale = 1.33333333, transform = 0, vrr = 0, disabled = false })
|
||||
@@ -1 +1 @@
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00,0x0,1.33333333,transform,0,vrr,0
|
||||
hl.monitor({ output = "desc:BOE 0x0B29", mode = "2560x1600@120.00", position = "0x0", scale = 1.33333333, transform = 0, vrr = 0, disabled = false })
|
||||
@@ -24,7 +24,8 @@ esac
|
||||
set_mode "$next"
|
||||
|
||||
# Redémarrage de hyprdynamicmonitors pour appliquer la nouvelle config
|
||||
pkill -x hyprdynamicmonitors 2>/dev/null || true
|
||||
hyprdynamicmonitors &
|
||||
pkill -f -x hyprdynamicmonitors 2>/dev/null || true
|
||||
sleep 0.2
|
||||
hyprdynamicmonitors >/dev/null 2>&1 &
|
||||
|
||||
notify-send "Écrans" "Mode : $next"
|
||||
Reference in New Issue
Block a user