GithubHelp home page GithubHelp logo

configuration applied twice about kanshi HOT 8 OPEN

emersion avatar emersion commented on June 15, 2024
configuration applied twice

from kanshi.

Comments (8)

tbm avatar tbm commented on June 15, 2024

I just had:

applying profile
applying profile output 'eDP-1' on connected head 'eDP-1'
applying profile
applying profile output 'eDP-1' on connected head 'eDP-1'
configuration applied
configuration applied

but sway's log only contains it once:

2019-12-20 12:35:35 - [main.c:300] Found config * for output eDP-1 (Unknown 0x5B2D 0x00000000)

from kanshi.

jameswalmsley avatar jameswalmsley commented on June 15, 2024

Did you resolve this?

What is your config file?
Which versions of wlroots / sway are you using?

from kanshi.

tbm avatar tbm commented on June 15, 2024

Config:

{
	output eDP-1 enable
}

{
	output eDP-1 disable
	output "Samsung Electric Company SyncMaster HVGQ901399" mode 1680x1050 position 0,0
}

sway 1.2 and wlroots 0.7.0

from kanshi.

jameswalmsley avatar jameswalmsley commented on June 15, 2024

I'll create a similar setup with my system and see what happens.

from kanshi.

zsugabubus avatar zsugabubus commented on June 15, 2024

It happens because after applying a profile, the display configuration will potentially change, and whenever the display configuration changes(*), kanshi tries finding a matching profile for the new configuration. But at the second run (hopefully) nothing will change and that's why there is two profile applies.

*: display plugged in/out, resolution, refresh rate...

from kanshi.

simoneruffini avatar simoneruffini commented on June 15, 2024

What do you mean with ''will potentially change'', I mean what types of change?

I have a similar issue but for me profiles are reapplied 3 times.

In addition to that, at startup, when kanshi starts, sway logs out this:

2020-10-21 20:51:31 - [swaybg-1.0/main.c:299] Found config * for output DP-3 (Dell Inc. DELL U2414H 4VKH665N5TRS)
2020-10-21 20:51:31 - [swaybg-1.0/main.c:299] Found config * for output eDP-1 (Sharp Corporation 0x148D 0x00000000)
00:00:04.790 [ERROR] [backend/drm/drm.c:364] Failed to page-flip output 'DP-3': a page-flip is already pending
2020-10-21 20:51:34 - [swaybg-1.0/main.c:167] Destroying output eDP-1 (Sharp Corporation 0x148D 0x00000000)

from kanshi.

lytedev avatar lytedev commented on June 15, 2024

In order to work around this issue, I moved my exec calls into a script that sets up a lockfile. Here's my example:

# kanshi config
profile desktop-H  {
  output ...
  output ...
  exec "setup-workspaces.sh"
}

And here's setup-workspaces.sh:

# kanshi will potentially run this more than once
LOCKFILE="/tmp/kanshi-setup-workspaces.lock"
if ! (set -o noclobber; echo > "$LOCKFILE"); then exit 1; fi
touch "$LOCKFILE"
# TODO: some way to ensure the lock file is cleaned up?
# maybe check if the file is older than a minute?

# do your stuff

rm -f "$LOCKFILE"

from kanshi.

Gochkin avatar Gochkin commented on June 15, 2024

Well I have noticed the same thing when running kanshi. For me any profile applied twice (at least this is what kanshi output suggests).

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.