Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plank position update fix and more #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

7aske
Copy link

@7aske 7aske commented Sep 18, 2019

Plank didnt seem to update after writing to dconf. My solution was to simple restart the plank process. I added plank to the list of required commands and made it so that it runs on start. Also figured that querying xrandr caused spikes and locking of the screen for about 3 frames which I think is unacceptable so xrandr is only queried at the start of the program. Assumption is that user will not be not be adding/removing/reconfiguring screens all the time. Added a makefile for easier installation/build.

… fixed screen locking when unnecessarily querying xrandr
@spotlesscoder
Copy link

Tested. Works :)

@spotlesscoder
Copy link

When the autoplank executable exits, plank goes away completely. (At least when I test autoplank by manually invoking it from command line and pressing Ctrl+C)
I think it should launch a plank instance that stays alive after exit when Ctrl+C signal is sent

@7aske
Copy link
Author

7aske commented Sep 20, 2019

Yup just reviewed the changes. There is a leftover exec.Command call

plank, _ := exec.LookPath("plank")
var attr = os.ProcAttr{Dir: ".", Env: os.Environ(), Files: []*os.File{nil, nil, nil, nil}}
process, err := os.StartProcess(plank, []string{}, &attr)
if err != nil {
	fmt.Printf(err.Error())
} else {
	err = process.Release()
	if err != nil {
		fmt.Printf(err.Error())
	}
}

exec.Command("plank")

Will look into it now.

@7aske
Copy link
Author

7aske commented Sep 20, 2019

As far I have figured process.Release() doesn't seem to do anything. Child process still dies with parent exits. I kind of don't wanna solve this by calling a external script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants