jfly Github contribution chart
jfly Github Stats
jfly Most Used Languages

Activity

29 Sep 2022

Issue Comment

Jfly

Window getting stuck in "window state: Iconic" when started alongside xmonad

Problem Description

I have a gui application (xclock) configured with systemd to start up as part of graphical-session.target. xmonad is configured to move this application to a specific desktop (using a manageHook with a doShift). In this setup, xclock ends up in a weird situation where it's "stuck" on my screen and stays on top of everything until I switch to the desktop xclock is on, at which point everything immediately starts behaving normally.

I captured the output of xprop on this xclock application both before and after the "fix", and I saw that the only difference between the 2 applications was the window state: when broken, the window state was "Iconic", and when working, it is "Normal":

$ diff -u /tmp/broken /tmp/working
--- /tmp/broken	2022-09-25 22:12:17.074157763 -0700
+++ /tmp/working	2022-09-25 22:12:21.694270593 -0700
@@ -1,7 +1,7 @@
 $ xprop
 _NET_WM_DESKTOP(CARDINAL) = 14
 WM_STATE(WM_STATE):
-		window state: Iconic
+		window state: Normal
        icon window: 0x0
 WM_HINTS(WM_HINTS):
        Client accepts input or input focus: True 

If I remove the doShift, the problem goes away. I've tried with other applications, and can reproduce the issue, so I don't think it's application specific.

Wild guess: maybe this old TODO about scanning for WM_STATE == Iconic is relevant?

Steps to Reproduce

I am able to reproduce this with the simplified config file below + the xclock user service also below.

Unfortunately, I am not able to reproduce this in Xephyr, so perhaps there is something relevant about how I actually start xmonad (right now it's started by lightdm via some nixos generated config files that I haven't taken the time to fully understand yet).

Configuration File

xmonad.hs:

import XMonad
import XMonad.Hooks.ManageDocks

main = xmonad defaultConfig {
    manageHook = composeAll [
        className =? "XClock" --> doShift "2"
    ]
} 

/etc/systemd/user/xclock.service:

[Unit]
PartOf=graphical-session.target

[Service]
ExecStart=/nix/store/8g8ic2d61dirnrpwrl4498l9hlwk8m6n-xclock-1.0.9/bin/xclock 

Checklist

  • [x] I've read CONTRIBUTING.md

  • I tested my configuration

    • [x] With xmonad version 0.17.0
    • [x] With xmonad-contrib version 0.17.0

Forked On 29 Sep 2022 at 01:47:41

Jfly

Here are the logs with XMonad.Hooks.ManageDebug. I started up on workspace 1 with polybar and xclock. I then switched to workspace 2, and opened xterm. Hope this helps!

2022-09-28-xmonad-issue-422.log

Commented On 29 Sep 2022 at 01:47:41
Issue Comment

Jfly

Window getting stuck in "window state: Iconic" when started alongside xmonad

Problem Description

I have a gui application (xclock) configured with systemd to start up as part of graphical-session.target. xmonad is configured to move this application to a specific desktop (using a manageHook with a doShift). In this setup, xclock ends up in a weird situation where it's "stuck" on my screen and stays on top of everything until I switch to the desktop xclock is on, at which point everything immediately starts behaving normally.

I captured the output of xprop on this xclock application both before and after the "fix", and I saw that the only difference between the 2 applications was the window state: when broken, the window state was "Iconic", and when working, it is "Normal":

$ diff -u /tmp/broken /tmp/working
--- /tmp/broken	2022-09-25 22:12:17.074157763 -0700
+++ /tmp/working	2022-09-25 22:12:21.694270593 -0700
@@ -1,7 +1,7 @@
 $ xprop
 _NET_WM_DESKTOP(CARDINAL) = 14
 WM_STATE(WM_STATE):
-		window state: Iconic
+		window state: Normal
        icon window: 0x0
 WM_HINTS(WM_HINTS):
        Client accepts input or input focus: True 

If I remove the doShift, the problem goes away. I've tried with other applications, and can reproduce the issue, so I don't think it's application specific.

Wild guess: maybe this old TODO about scanning for WM_STATE == Iconic is relevant?

Steps to Reproduce

I am able to reproduce this with the simplified config file below + the xclock user service also below.

Unfortunately, I am not able to reproduce this in Xephyr, so perhaps there is something relevant about how I actually start xmonad (right now it's started by lightdm via some nixos generated config files that I haven't taken the time to fully understand yet).

Configuration File

xmonad.hs:

import XMonad
import XMonad.Hooks.ManageDocks

main = xmonad defaultConfig {
    manageHook = composeAll [
        className =? "XClock" --> doShift "2"
    ]
} 

/etc/systemd/user/xclock.service:

[Unit]
PartOf=graphical-session.target

[Service]
ExecStart=/nix/store/8g8ic2d61dirnrpwrl4498l9hlwk8m6n-xclock-1.0.9/bin/xclock 

Checklist

  • [x] I've read CONTRIBUTING.md

  • I tested my configuration

    • [x] With xmonad version 0.17.0
    • [x] With xmonad-contrib version 0.17.0

Forked On 28 Sep 2022 at 06:17:28

Jfly

Do you have any other windows open before you trigger this by switching to workspace 2?

I do not have any windows open before I trigger this. I'm also worried I didn't explain myself clearly: the issue occurs immediately on x11/xmonad startup, there isn't really anything I do to trigger it. Switching to workspace 2 is what fixes it.

This is really hard to explain in words, so I've made a screen recording. This recording starts just after x11/xmonad starts up. You can see that there's an xclock window sort of floating at the top right on top of polybar, and when I start a terminal, the terminal appears on top of it, but does not fix the issue with xclock. Finally, when I switch to workspace 2, you can see the problem goes away (xterm becomes a regular old tiling window).

https://user-images.githubusercontent.com/277474/192701788-899d2acf-56b2-4fb1-9494-4ec777b0821a.mp4

Commented On 28 Sep 2022 at 06:17:28

Jfly

asdf: Remove placeholders

We're past August 31st, 2022!

AFAICT, these placeholders never worked quite right, and have caused an insane amount of confusion over on the asdf issue tracker. See https://github.com/asdf-vm/asdf/issues/1103#issuecomment-1093094933 for a writeup explaining how using these placeholders results in shims that break the next time you do an asdf upgrade.

You may note that the TODO made it look like we should remove the bin.write_exec_script libexec/"bin/asdf" as well. I left that in because without it, we do not end up with an asdf binary in our path at all. I don't know enough about Homebrew to know if this is actually the right way to get a binary on the PATH or not.

Before

jeremy@ homebrew-core % ls "$(brew --prefix asdf)/asdf.sh"
/opt/homebrew/opt/asdf/asdf.sh
jeremy@ homebrew-core % ls "$(brew --prefix asdf)/libexec/asdf.sh"
/opt/homebrew/opt/asdf/libexec/asdf.sh 

After

jeremy@ homebrew-core % ls "$(brew --prefix asdf)/asdf.sh"
ls: /opt/homebrew/opt/asdf/asdf.sh: No such file or directory
jeremy@ homebrew-core % ls "$(brew --prefix asdf)/libexec/asdf.sh"
/opt/homebrew/opt/asdf/libexec/asdf.sh 
  • [x] Have you followed the guidelines for contributing?
  • [x] Have you ensured that your commits follow the commit style guide?
  • [x] Have you checked that there aren't other open pull requests for the same formula update/change?
  • [x] Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • [x] Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • [x] Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

Pushed On 28 Sep 2022 at 04:20:45

Jfly

asdf: Remove placeholders

We're past August 31st, 2022!

AFAICT, these placeholders never worked quite right, and have caused an insane amount of confusion over on the asdf issue tracker. See https://github.com/asdf-vm/asdf/issues/1103#issuecomment-1093094933 for a writeup explaining how using these placeholders results in shims that break the next time you do an asdf upgrade.

  • [x] Have you followed the guidelines for contributing?
  • [x] Have you ensured that your commits follow the commit style guide?
  • [x] Have you checked that there aren't other open pull requests for the same formula update/change?
  • [ ] Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • [ ] Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • [ ] Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

Pushed On 28 Sep 2022 at 03:27:05

Jfly

asdf: Remove placeholders

We're past August 31st, 2022!

AFAICT, these placeholders never worked quite right, and have caused an insane amount of confusion over on the asdf issue tracker. See https://github.com/asdf-vm/asdf/issues/1103#issuecomment-1093094933 for a writeup explaining how using these placeholders results in shims that break the next time you do an asdf upgrade.

Pushed On 28 Sep 2022 at 03:24:26
Create Branch
Jfly In jfly/homebrew-core Create Branchremove-placeholders

Jfly

🍻 Default formulae for the missing package manager for macOS (or Linux)

On 28 Sep 2022 at 03:23:03

Jfly

🍻 Default formulae for the missing package manager for macOS (or Linux)

Forked On 28 Sep 2022 at 03:18:55

Jfly

Actually get mcg working out of the box

Pushed On 26 Sep 2022 at 08:23:18

Jfly

Wait to startup mcg until xmonad has gotten a little further

This is a quick'n'dirty workaround for https://github.com/xmonad/xmonad/issues/422. Hopefully a better answer shows up there someday.

Pushed On 26 Sep 2022 at 08:23:18

Jfly

Fix broken parsec

Grrr this is frustrating

Pushed On 25 Sep 2022 at 10:23:51

Jfly

Add ffmpeg as a dependency

This must be new? See https://support.parsec.app/hc/en-us/articles/7788951905037 for details.

Pushed On 25 Sep 2022 at 09:08:43

Jfly

Upgrade to the latest parsecd.so file

Pushed On 25 Sep 2022 at 08:51:39

Jfly

Add a command to easily see all notes

Pushed On 25 Sep 2022 at 08:25:18

Jfly

Moving notes out of version control and into syncthing

Pushed On 25 Sep 2022 at 06:35:14

Jfly

Use gnome seahorse's askpass program

I could go full-board and replace ssh-agent with seahorse, but I find this setup easier to wrap my mind around, since I don't really understand what seahorse is/does. Maybe someday...

Pushed On 25 Sep 2022 at 08:32:49

Jfly

Increase gpg-agent timeout

The defaults (10 minutes + 2 hours) are too restrictive for my taste. It basically means I have to enter my passphrase every time I write a commit message.

12 hours feels pretty reasonable to me: I expect I'll only have to enter my passphrase once a day.

Pushed On 25 Sep 2022 at 08:11:29

Jfly

Make old-school nix repl and nix-shell "just work"

I find myself running these commands regularly, it would be nice to have them just work without having to carefully craft a NIX_PATH for them each time.

I'm not sure what the flake-y future looks like to know if this will have to change someday, but we can burn that bridge when we get to it =)

Pushed On 25 Sep 2022 at 06:19:51

Jfly

Add some wifi connections

Pushed On 25 Sep 2022 at 12:00:34

Jfly

Don't assume the h4 dev setup scripts have been run

Pushed On 25 Sep 2022 at 12:00:34

Jfly

Add jfly, remove nonexistent scratch directory

Pushed On 24 Sep 2022 at 09:55:18

Jfly

Add a flake.lock

I think this will reduce the amount of relocking and drive that every individual project has to go through.

Pushed On 24 Sep 2022 at 09:45:43

Jfly

Specializations!

This is pretty neat: at boot I can pick a separate option for running via the integrated gpu vs nvidia. IMO, it's still pretty annoying to have to reboot, but at least I don't have to run any commands/write any code.

This didn't quite work at first without running a command like sudo system76-power graphics integrated. I dug into why, and the important thing that command did was to manage the /etc/modprobe.d/system76-power.conf file, which would determine which kernel modules get loaded a boot. I figured out how to declare that in an idiomatic nixos way instead, and then I just nuked the file. I suspect that if I accidentally run a system76-power graphics ... command in the future, it'll potentially break things, so DO NOT DO THAT, JEREMY!

Pushed On 24 Sep 2022 at 09:45:43

Jfly

Upgrade to the latest nixos-unstable

This pulls in a fix for https://github.com/NixOS/nixpkgs/issues/188998

Pushed On 20 Sep 2022 at 12:13:49

Jfly

More fixing

Pushed On 20 Sep 2022 at 11:48:15

Jfly

Use config.snow.user.name instead of config.deployment.targetUser

They're the same thing (at least they are today), but deployment user is an implementation detail that shouldn't be leaking out to here.

Pushed On 20 Sep 2022 at 11:35:05

Jfly

Support for usb portable installations!

THIS IS SO COOL. And wow was that tricky to get working. On the plus side, I understand colmena and nixos a bit better now :)

Pushed On 20 Sep 2022 at 11:35:05

Jfly

More secrets!

Pushed On 19 Sep 2022 at 01:02:56

Jfly

syncthingin'

Pushed On 18 Sep 2022 at 09:21:13

Jfly

Ooh this declarative syncthing configuration is awesome

Pushed On 18 Sep 2022 at 09:08:08

Jfly

Ooh, clark needs git so it can host git repos

I'm not sure why he didn't need this before...

Pushed On 18 Sep 2022 at 05:50:56

Jfly

Update README.md

Pushed On 18 Sep 2022 at 06:40:26
Create Branch
Jfly In jfly/icons Create Branchperf-investigation

Jfly

Description not entered by the user.

On 18 Sep 2022 at 04:57:19
Create Branch
Jfly In jfly/icons Create Branchport-to-use-js-potrace

Jfly

Description not entered by the user.

On 18 Sep 2022 at 04:57:08