[BUG]: Application widget - Cannot launch application when using flag in command. #622

Open
opened 2026-01-05 14:52:02 +01:00 by adam · 2 comments
Owner

Originally created by @genobear on GitHub (May 18, 2025).

Summary

Cannot launch application from widget whenn using flag in the command.

For Example:
This does not launch the app(the icon is still correctly detected).

  "Applications": {
    "enable": true,
    "display": "Icon",
    "items": [
      {
        "command": "C:/Program Files/Git/git-bash.exe --cd-to-home",
        "display": "Icon",
        "enable": true,
        "name": "Bash",
        "show_command_on_hover": true
      }
    ]
  }

This does work.

"command": "C:/Program Files/Git/git-bash.exe",

Is there a specific syntax to make this work?

I also tried the below, but this also broke the icon detection
"command": "\"C:/Program Files/Git/git-bash.exe\" --cd-to-home"

Version Information

Windows 11 24H2
OS Name:                       Microsoft Windows 11 Pro
OS Version:                    10.0.26100 N/A Build 26100
komorebic 0.1.37
tag:v0.1.37
commit_hash:00384ce3
build_time:2025-05-17 19:16:53 +00:00
build_env:rustc 1.87.0 (17067e9ac 2025-05-09),stable-x86_64-pc-windows-msvc

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.37/schema.bar.json",
  "monitor": 0,
  "font_family": "JetBrains Mono",
  "height": 30,
  "transparency_alpha": 0,
  "theme": {
    "palette": "Base16",
    "name": "OnedarkDark",
    "accent": "Base0D"
  },
  "left_widgets": [
    {
      "Keyboard": {
        "enable": true,
        "label_prefix": "Icon"
      }
    },
    {
      "Komorebi": {
        "workspaces": {
          "enable": true,
          "hide_empty_workspaces": true
        },
        "layout": {
          "enable": true,
          "display": "Icon"
        }
      }
    },
    {
      "Applications": {
        "enable": true,
        "display": "Icon",
        "items": [
          {
            "command": "C:/Program Files/Git/git-bash.exe --cd-to-home",
            "display": "Icon",
            "enable": true,
            "name": "Bash",
            "show_command_on_hover": true
          }
        ]
      }
    }
  ],
  "center_widgets": [
    {
      "Media": {
        "enable": true
      }
    },
    {
      "Komorebi": {
        "focused_window": {
          "enable": true,
          "show_icon": true
        }
      }
    }
  ],
  "right_widgets": [
    {
      "Update": {
        "enable": true
      }
    },
    {
      "Storage": {
        "enable": false
      }
    },
    {
      "Memory": {
        "enable": true,
        "auto_select_over": 80
      }
    },
    {
      "Cpu": {
        "enable": true,
        "auto_select_over": 80
      }
    },
    {
      "Network": {
        "enable": true,
        "show_total_data_transmitted": false,
        "show_network_activity": true
      }
    },
    {
      "Date": {
        "enable": true,
        "format": "DayDateMonthYear"
      }
    },
    {
      "Time": {
        "enable": true,
        "format": "TwentyFourHour"
      }
    },
    {
      "Battery": {
        "enable": false
      }
    }
  ]
}

Hotkey Configuration

.shell powershell

# Reload whkd configuration
# alt + o                 : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd
alt + o                 : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell
alt + shift + o         : komorebic reload-configuration

# App shortcuts - these require shell to be pwsh / powershell
# The apps will be focused if open, or launched if not open
# alt + f                 : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }
# alt + b                 : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome }

alt + q                 : komorebic close
alt + m                 : komorebic minimize

# Focus windows
alt + left                 : komorebic focus left
alt + down                 : komorebic focus down
alt + up                 : komorebic focus up
alt + right                 : komorebic focus right
alt + shift + oem_4     : komorebic cycle-focus previous # oem_4 is [
alt + shift + oem_6     : komorebic cycle-focus next # oem_6 is ]

# Move windows
alt + shift + left         : komorebic move left
alt + shift + down         : komorebic move down
alt + shift + up         : komorebic move up
alt + shift + right         : komorebic move right
alt + shift + return    : komorebic promote

# Stack windows
alt + h              : komorebic stack left
alt + j              : komorebic stack down
alt + k                : komorebic stack up
alt + l             : komorebic stack right
alt + oem_1             : komorebic unstack # oem_1 is ;
alt + oem_4             : komorebic cycle-stack previous # oem_4 is [
alt + oem_6             : komorebic cycle-stack next # oem_6 is ]

# Resize
alt + oem_plus          : komorebic resize-axis horizontal increase
alt + oem_minus         : komorebic resize-axis horizontal decrease
alt + shift + oem_plus  : komorebic resize-axis vertical increase
alt + shift + oem_minus : komorebic resize-axis vertical decrease

# Manipulate windows
alt + t                 : komorebic toggle-float
alt + shift + f         : komorebic toggle-monocle

# Window manager options
alt + shift + r         : komorebic retile
alt + p                 : komorebic toggle-pause

# Layouts
alt + x                 : komorebic flip-layout horizontal
alt + y                 : komorebic flip-layout vertical

# Workspaces
alt + 1                 : komorebic focus-workspace 0
alt + 2                 : komorebic focus-workspace 1
alt + 3                 : komorebic focus-workspace 2
alt + 4                 : komorebic focus-workspace 3
alt + 5                 : komorebic focus-workspace 4
alt + 6                 : komorebic focus-workspace 5
alt + 7                 : komorebic focus-workspace 6
alt + 8                 : komorebic focus-workspace 7

# Move windows across workspaces
alt + shift + 1         : komorebic move-to-workspace 0
alt + shift + 2         : komorebic move-to-workspace 1
alt + shift + 3         : komorebic move-to-workspace 2
alt + shift + 4         : komorebic move-to-workspace 3
alt + shift + 5         : komorebic move-to-workspace 4
alt + shift + 6         : komorebic move-to-workspace 5
alt + shift + 7         : komorebic move-to-workspace 6
alt + shift + 8         : komorebic move-to-workspace 7

Output of komorebic check

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

Looking for configuration files in C:\Users\Scott

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

Found C:\Users\Scott\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag
Originally created by @genobear on GitHub (May 18, 2025). ### Summary Cannot launch application from widget whenn using flag in the command. For Example: This does not launch the app(the icon is still correctly detected). ``` "Applications": { "enable": true, "display": "Icon", "items": [ { "command": "C:/Program Files/Git/git-bash.exe --cd-to-home", "display": "Icon", "enable": true, "name": "Bash", "show_command_on_hover": true } ] } ``` This does work. ` "command": "C:/Program Files/Git/git-bash.exe",` Is there a specific syntax to make this work? I also tried the below, but this also broke the icon detection `"command": "\"C:/Program Files/Git/git-bash.exe\" --cd-to-home"` ### Version Information ``` Windows 11 24H2 OS Name: Microsoft Windows 11 Pro OS Version: 10.0.26100 N/A Build 26100 komorebic 0.1.37 tag:v0.1.37 commit_hash:00384ce3 build_time:2025-05-17 19:16:53 +00:00 build_env:rustc 1.87.0 (17067e9ac 2025-05-09),stable-x86_64-pc-windows-msvc ``` ### Komorebi Configuration ```json { "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.37/schema.bar.json", "monitor": 0, "font_family": "JetBrains Mono", "height": 30, "transparency_alpha": 0, "theme": { "palette": "Base16", "name": "OnedarkDark", "accent": "Base0D" }, "left_widgets": [ { "Keyboard": { "enable": true, "label_prefix": "Icon" } }, { "Komorebi": { "workspaces": { "enable": true, "hide_empty_workspaces": true }, "layout": { "enable": true, "display": "Icon" } } }, { "Applications": { "enable": true, "display": "Icon", "items": [ { "command": "C:/Program Files/Git/git-bash.exe --cd-to-home", "display": "Icon", "enable": true, "name": "Bash", "show_command_on_hover": true } ] } } ], "center_widgets": [ { "Media": { "enable": true } }, { "Komorebi": { "focused_window": { "enable": true, "show_icon": true } } } ], "right_widgets": [ { "Update": { "enable": true } }, { "Storage": { "enable": false } }, { "Memory": { "enable": true, "auto_select_over": 80 } }, { "Cpu": { "enable": true, "auto_select_over": 80 } }, { "Network": { "enable": true, "show_total_data_transmitted": false, "show_network_activity": true } }, { "Date": { "enable": true, "format": "DayDateMonthYear" } }, { "Time": { "enable": true, "format": "TwentyFourHour" } }, { "Battery": { "enable": false } } ] } ``` ### Hotkey Configuration ``` .shell powershell # Reload whkd configuration # alt + o : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd alt + o : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell alt + shift + o : komorebic reload-configuration # App shortcuts - these require shell to be pwsh / powershell # The apps will be focused if open, or launched if not open # alt + f : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox } # alt + b : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome } alt + q : komorebic close alt + m : komorebic minimize # Focus windows alt + left : komorebic focus left alt + down : komorebic focus down alt + up : komorebic focus up alt + right : komorebic focus right alt + shift + oem_4 : komorebic cycle-focus previous # oem_4 is [ alt + shift + oem_6 : komorebic cycle-focus next # oem_6 is ] # Move windows alt + shift + left : komorebic move left alt + shift + down : komorebic move down alt + shift + up : komorebic move up alt + shift + right : komorebic move right alt + shift + return : komorebic promote # Stack windows alt + h : komorebic stack left alt + j : komorebic stack down alt + k : komorebic stack up alt + l : komorebic stack right alt + oem_1 : komorebic unstack # oem_1 is ; alt + oem_4 : komorebic cycle-stack previous # oem_4 is [ alt + oem_6 : komorebic cycle-stack next # oem_6 is ] # Resize alt + oem_plus : komorebic resize-axis horizontal increase alt + oem_minus : komorebic resize-axis horizontal decrease alt + shift + oem_plus : komorebic resize-axis vertical increase alt + shift + oem_minus : komorebic resize-axis vertical decrease # Manipulate windows alt + t : komorebic toggle-float alt + shift + f : komorebic toggle-monocle # Window manager options alt + shift + r : komorebic retile alt + p : komorebic toggle-pause # Layouts alt + x : komorebic flip-layout horizontal alt + y : komorebic flip-layout vertical # Workspaces alt + 1 : komorebic focus-workspace 0 alt + 2 : komorebic focus-workspace 1 alt + 3 : komorebic focus-workspace 2 alt + 4 : komorebic focus-workspace 3 alt + 5 : komorebic focus-workspace 4 alt + 6 : komorebic focus-workspace 5 alt + 7 : komorebic focus-workspace 6 alt + 8 : komorebic focus-workspace 7 # Move windows across workspaces alt + shift + 1 : komorebic move-to-workspace 0 alt + shift + 2 : komorebic move-to-workspace 1 alt + shift + 3 : komorebic move-to-workspace 2 alt + shift + 4 : komorebic move-to-workspace 3 alt + shift + 5 : komorebic move-to-workspace 4 alt + shift + 6 : komorebic move-to-workspace 5 alt + shift + 7 : komorebic move-to-workspace 6 alt + shift + 8 : komorebic move-to-workspace 7 ``` ### Output of komorebic check ``` No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Scott Looking for configuration files in C:\Users\Scott Found komorebi.json; this file can be passed to the start command with the --config flag Found C:\Users\Scott\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag ```
adam added the bug label 2026-01-05 14:52:02 +01:00
Author
Owner

@genobear commented on GitHub (May 18, 2025):

Possibly not a bug but a feature request. I was able to get around the problem by first creating a shortcut with the required flags then launching the shortcut via komorebi

@genobear commented on GitHub (May 18, 2025): Possibly not a bug but a feature request. I was able to get around the problem by first creating a shortcut with the required flags then launching the shortcut via komorebi
Author
Owner

@LGUG2Z commented on GitHub (May 18, 2025):

I was able to get around the problem by first creating a shortcut with the required flags then launching the shortcut

This is what I'm doing as well; I'll accept a patch to handle args and flags better if someone wants to work on it

@LGUG2Z commented on GitHub (May 18, 2025): > I was able to get around the problem by first creating a shortcut with the required flags then launching the shortcut This is what I'm doing as well; I'll accept a patch to handle args and flags better if someone wants to work on it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#622