Comments (2)
So I think the parser silently fails because enable
isn't supported. This should obviously be supported and the parser should not fail.
Can you try removing enable
to see if it's the case? (Putting nothing instead should work)
from kanshi.
Aaah. So;
{
output VGA-1
output LVDS-1 disable
}
{
output LVDS-1
output VGA-1 disable
}
gives;
Connected outputs:
output VGA-1 vendor PHL product Philips 170S serial VN 004623
output LVDS-1 vendor SEC product 0x3651 serial 0x0
Matching configuration: Some([MatchedOutput { connected: ConnectedOutput { name: "VGA-1", edid: EDID { header: Header { vendor: ['P', 'H', 'L'], product: 2078, serial: 4623, week: 2, year: 15, version: 1, revision: 3 }, display: Display { video_input: 31, width: 34, height: 27, gamma: 120, features: 238 }, chromaticity: (), established_timing: (), standard_timing: (), descriptors: [DetailedTiming, SerialNumber("VN 004623"), ProductName("Philips 170S"), RangeLimits] } }, saved: SavedOutput { name: "VGA-1", vendor: "", product: "", serial: "", enabled: true, width: 0, height: 0, rate: 0.0, x: 0, y: 0, primary: false, scale: 0 } }, MatchedOutput { connected: ConnectedOutput { name: "LVDS-1", edid: EDID { header: Header { vendor: ['S', 'E', 'C'], product: 13905, serial: 0, week: 0, year: 18, version: 1, revision: 3 }, display: Display { video_input: 128, width: 34, height: 19, gamma: 120, features: 10 }, chromaticity: (), established_timing: (), standard_timing: (), descriptors: [DetailedTiming, Unknown([0, 0, 0, 0, 0, 0, 0, 0, 30, 180, 2, 116, 0]), UnspecifiedText("SAMSUNG"), UnspecifiedText("156AT05-H01")] } }, saved: SavedOutput { name: "LVDS-1", vendor: "", product: "", serial: "", enabled: false, width: 0, height: 0, rate: 0.0, x: 0, y: 0, primary: false, scale: 0 } }])
output VGA-1 position 0,0
output LVDS-1 disable
If I queue up kanshi
(or kanshi -s kanshi -f sway --primary-workspace "LVDS-1"
) in the terminal, unplug my external monitor, then press enter, I get;
Connected outputs:
output LVDS-1 vendor SEC product 0x3651 serial 0x0
Matching configuration: None
but sway doesn't enable the internal monitor.
So, to closer match the example config, I then removed output VGA-1 disable
from my config, queued up kanshi
, removed the cable, and pressed enter. That got me;
Connected outputs:
output LVDS-1 vendor SEC product 0x3651 serial 0x0
Matching configuration: Some([MatchedOutput { connected: ConnectedOutput { name: "LVDS-1", edid: EDID { header: Header { vendor: ['S', 'E', 'C'], product: 13905, serial: 0, week: 0, year: 18, version: 1, revision: 3 }, display: Display { video_input: 128, width: 34, height: 19, gamma: 120, features: 10 }, chromaticity: (), established_timing: (), standard_timing: (), descriptors: [DetailedTiming, Unknown([0, 0, 0, 0, 0, 0, 0, 0, 30, 180, 2, 116, 0]), UnspecifiedText("SAMSUNG"), UnspecifiedText("156AT05-H01")] } }, saved: SavedOutput { name: "LVDS-1", vendor: "", product: "", serial: "", enabled: true, width: 0, height: 0, rate: 0.0, x: 0, y: 0, primary: false, scale: 0 } }])
output LVDS-1 position 0,0
(Same with the variation with -s -f etc. arguments above.)
N.b. in my sway config I have;
bindsym $mod+Ctrl+F9 exec "sway output VGA-1 enable && sleep 1 && sway output LVDS-1 disable"
bindsym $mod+Ctrl+Shift+F9 exec "sway output LVDS-1 enable && sleep 1 && sway output VGA-1 disable"
Before testing tonight, I used the top one to switch to my external monitor. Using the second to get back to my internal screen has crashed sway
75% of times I have used it so far, but that's a wee FYI of how the output state was before what I tried removing the 'enable'.
from kanshi.
Related Issues (20)
- kanshi exits when undocking laptop from two external monitors HOT 2
- Support adaptive_sync HOT 1
- Secondary display only shows pointer HOT 1
- Migration to sr.ht HOT 1
- Kanshi doesn't apply display position configuration after disabling display HOT 3
- Error out on duplicate profile
- Feature request: Use regex in output name HOT 8
- Syntax to specify profile names can become ambiguous
- Sample configuration does not work HOT 2
- Feature Request: Variables/workspace support HOT 2
- Zombie processes HOT 4
- Profile not matched HOT 3
- Add support for matching make/model/serial
- Apply or select a given profile HOT 2
- Any particular reason why the sway-output syntax is different? HOT 2
- Sometimes kanshi does not restore display config when re-docking HOT 1
- allow storing profiles in separate files HOT 5
- Scale factor applied to output is different from the provided in the config file HOT 1
- Monitor disconnections not detected HOT 2
- invalid arguments for [email protected]_head HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kanshi.