Git Product home page Git Product logo

Comments (2)

emersion avatar emersion commented on August 27, 2024

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.

mxmilkiib avatar mxmilkiib commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.