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

[BUG]: Bar cannot display UWP Icons (PR with fix already exists) #1226

Open
davor-skontra opened this issue Jan 11, 2025 · 4 comments
Open
Labels
bug Something isn't working

Comments

@davor-skontra
Copy link

Summary

UWP -> Universal Windows Platform

I created a PR in LGUG2>/window-icons repo that merges upstream changes with a fix.

Thought I'd also create this bug report so the PR doesn't go unnoticed.

Version Information

Any version since bar was introduced.

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.32/schema.bar.json",
  "monitor": {
    "index": 0,
    "work_area_offset": {
      "left": 0,
      "top": 35,
      "right": 0,
      "bottom": 35
    }
  },
  "position": {
    "end": {
      "x": 2560,
      "y": 35,
    }
  },
  "font_family": "JetBrains Mono",
  "theme": {
    "palette": "Base16",
    "name": "TokyoNightStorm",
    "accent": "Base0D"
  },
  "left_widgets": [
    {
      "Komorebi": {
        "workspaces": {
          "enable": true,
          "hide_empty_workspaces": true
        },
        "layout": {
          "enable": true
        },
        "focused_window": {
          "enable": true,
          "show_icon": true
        }
      }
    }
  ],
  "right_widgets": [
    {
      "Media": {
        "enable": true
      }
    },
    {
      "Storage": {
        "enable": true
      }
    },
    {
      "Memory": {
        "enable": true
      }
    },
    {
      "Date": {
        "enable": true,
        "format": "DayDateMonthYear"
      }
    },
    {
      "Time": {
        "enable": true,
        "format": "TwentyFourHour"
      }
    },
    {
      "Battery": {
        "enable": true
      }
    }
  ]
}

Hotkey Configuration

#Requires AutoHotkey v2.0.2
#SingleInstance Force

Komorebic(cmd) {
RunWait(format("komorebic.exe {}", cmd), , "Hide")
}

!q::Komorebic("close")
!m::Komorebic("minimize")

; Focus windows
!h::Komorebic("focus left")
!j::Komorebic("focus down")
!k::Komorebic("focus up")
!l::Komorebic("focus right")

!+[::Komorebic("cycle-focus previous")
!+]::Komorebic("cycle-focus next")

; Move windows
!+h::Komorebic("move left")
!+j::Komorebic("move down")
!+k::Komorebic("move up")
!+l::Komorebic("move right")

; Stack windows
#Left::Komorebic("stack left")
#Down::Komorebic("stack down")
#Up::Komorebic("stack up")
#Right::Komorebic("stack right")
!#Down::Komorebic("unstack")
#,::Komorebic("cycle-stack previous")
#.::Komorebic("cycle-stack next")

; Resize
#^Right::Komorebic("resize-axis horizontal increase")
#^Left::Komorebic("resize-axis horizontal decrease")
#^Up::Komorebic("resize-axis vertical increase")
#^Down::Komorebic("resize-axis vertical decrease")

; Manipulate windows
!t::Komorebic("toggle-float")
!f::Komorebic("toggle-monocle")

; Window manager options
!+r::Komorebic("retile")
!p::Komorebic("toggle-pause")

; Layouts
!x::Komorebic("flip-layout horizontal")
!y::Komorebic("flip-layout vertical")

; Workspaces
#1::Komorebic("focus-workspace 0")
#2::Komorebic("focus-workspace 1")
#3::Komorebic("focus-workspace 2")
#4::Komorebic("focus-workspace 3")
#5::Komorebic("focus-workspace 4")
#6::Komorebic("focus-workspace 5")
#7::Komorebic("focus-workspace 6")
#8::Komorebic("focus-workspace 7")

; Move windows across workspaces
#+1::Komorebic("move-to-workspace 0")
#+2::Komorebic("move-to-workspace 1")
#+3::Komorebic("move-to-workspace 2")
#+4::Komorebic("move-to-workspace 3")
#+5::Komorebic("move-to-workspace 4")
#+6::Komorebic("move-to-workspace 5")
#+7::Komorebic("move-to-workspace 6")
#+8::Komorebic("move-to-workspace 7")

; Run shortcuts
#t::Run("wezterm -e", , "Hide")

Output of komorebic check

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\THEkr

Looking for configuration files in C:\Users\THEkr

Found komorebi.json; this file can be passed to the start command with the --config flag

Found C:\Users\THEkr.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag

@davor-skontra davor-skontra added the bug Something isn't working label Jan 11, 2025
@davor-skontra davor-skontra changed the title [BUG]: Bar cannot display UWP Icons (PR with already available) [BUG]: Bar cannot display UWP Icons (PR with fix already exists) Jan 11, 2025
@LGUG2Z
Copy link
Owner

LGUG2Z commented Jan 11, 2025

Thanks for opening this PR! I actually didn't get notified of the underlying PR to the windows-icons repo, I'll take a look soon 🤞

@LGUG2Z
Copy link
Owner

LGUG2Z commented Jan 12, 2025

I played with this a little today and the issue with UWP apps is that they are all running as ApplicationFrameworkHost.exe, and when you pass the process_id of these apps to the library to go and look up their icons, they can't be uniquely identified 🤔

Not sure how to proceed with this, maybe @amnweb has some ideas from yasb that we can bring here.

@amnweb
Copy link

amnweb commented Jan 12, 2025

UWP apps might need a moment to start under ApplicationFrameHost, maybe that's the problem?
An example of how I solved this

https://github.com/amnweb/yasb/blob/cd336fa718c39d30ac4eb1a8e29fd920fae5e38f/src/core/widgets/yasb/active_window.py#L195

@davor-skontra
Copy link
Author

Thanks for that Amnweb! I'll try the same approach!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants