Adding an application to Wofi

Hi,

I've just switched from vanilla Arch with i3wm to Garuda with Sway.

I previously have used dmenu but not rofi/wofi.

I downloaded a pre-built binary of IntelliJ Ultimate from Jetbrains, which includes a .sh script to launch the application. I can get this to show in the "rocket menu" after creating a .desktop file and putting it in both ~/.local/share/applications/idea.desktop and /usr/share/applications/idea.desktop. However, it doesn't show up in the wofi menu.

idea.desktop:

Name=IntelliJ IDEA Ultimate Edition
GenericName=JDK Integrated Development Environment
Comment=Jetbrains IDE specialised for Java JDK development
Icon=/home/jcli/idea/bin/idea.png
Exec=/home/jcli/idea/bin/idea.sh %f
TryExec=/home/jcli/idea/bin/idea.sh %f
Terminal=false
Type=Application
Categories=Development;

Output of garuda-inxi:

System:
  Kernel: 5.16.4-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=54a70edf-b704-4f88-828e-93ad6add294c rw [email protected]
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=e27c74a4-65fa-4961-a24f-799fd0751abc loglevel=3
  Desktop: sway 1.7 vt: 1 dm: N/A Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 81YQ v: IdeaPad 5 15ARE05
    serial: <superuser required> Chassis: type: 10 v: IdeaPad 5 15ARE05
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0R32866WIN
    serial: <superuser required> UEFI: LENOVO v: E7CN40WW date: 01/29/2021
Battery:
  ID-1: BAT0 charge: 61.3 Wh (100.0%) condition: 61.3/70.0 Wh (87.5%)
    volts: 17.0 min: 15.0 model: SMP L19M4PF1 type: Li-poly serial: <filter>
    status: Full cycles: 178
CPU:
  Info: model: AMD Ryzen 5 4500U with Radeon Graphics bits: 64 type: MCP
    arch: Zen 2 family: 0x17 (23) model-id: 0x60 (96) stepping: 1
    microcode: 0x8600106
  Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB
    desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 8 MiB
    desc: 2x4 MiB
  Speed (MHz): avg: 1407 high: 1437 min/max: 1400/2375 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1437 2: 1397
    3: 1421 4: 1396 5: 1397 6: 1397 bogomips: 28447
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
    IBRS_FW, STIBP: disabled, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel
    bus-ID: 03:00.0 chip-ID: 1002:1636 class-ID: 0300
  Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-3:2 chip-ID: 13d3:56ff class-ID: 0e02
  Display: wayland server: N/A compositor: sway v: 1.7 driver:
    loaded: amdgpu note: n/a (using device driver) display-ID: 1
    resolution: <missing: xdpyinfo>
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 03:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor
    vendor: Lenovo driver: N/A
    alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x
    bus-ID: 03:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel bus-ID: 03:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.16.4-zen1-1-zen running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.44 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 01:00.0
    chip-ID: 8086:2723 class-ID: 0280
  IF: wlp1s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-3:2 chip-ID: 8087:0029 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 2 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 238.47 GiB used: 11.1 GiB (4.7%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: MZALQ256HAJD-000L2 size: 238.47 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: AL2QFXV7 temp: 27.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 229.37 GiB size: 229.37 GiB (100.00%)
    used: 11.1 GiB (4.8%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 229.37 GiB size: 229.37 GiB (100.00%)
    used: 11.1 GiB (4.8%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 229.37 GiB size: 229.37 GiB (100.00%)
    used: 11.1 GiB (4.8%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 229.37 GiB size: 229.37 GiB (100.00%)
    used: 11.1 GiB (4.8%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: swap-2 type: zram size: 7.2 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 47.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 257 Uptime: 14m wakeups: 1 Memory: 7.2 GiB
  used: 2.06 GiB (28.7%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1200 lib: 305 Shell: fish
  v: 3.3.1 default: Zsh v: 5.8 running-in: alacritty inxi: 3.3.12
Garuda (2.5.3-1):
  System install date:     2022-02-01
  Last full system update: 2022-02-01
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       Probably (Run as root to verify)
  Snapshots:               Snapper
  Failed units:

To have custom shortcuts, move them to .local/share/applications and then they should show up in the wofi menu.

From everything I see and have done previously that should work. Maybe something in the desktop entry isn't being read properly? Also did you try a restart of your session?

wofi --show=drun <-- can you try running that from a command line and see if there is any output that might hint at something?

2 Likes

Thanks for your response,

Move them to .local/share/applications

I double-checked. It is in there, and it belongs to me.

Desktop entry isn't being read properly

Perhaps, but if this was the case then it surely would not have been picked up by the nwg-drawer menu/"rocket menu"? Either way, I will play around with it and report results back here.

Kill the session

Yup. Both kill sway and a straight shutdown, no luck :sweat_smile:

run wofi --show=drun

Yeah searching combinations of 'idea' and 'intellij' doesn't bring up anything. It might just be the .desktop configuration. Maybe wofi doesn't like the %f placeholder? I'll fiddle with it.

Thanks for your help <3

1 Like

I can repeat your issue with wofi and then I checked nwg-drawer and I can see it in there.

exec nwg-drawer -c 7 -is 70 -spaceing 23 is in the waybar config and default sway config keybindings.

So can you see if it works for you by triggering the nwg-drawer with $mod+Shift+d ?

1 Like

Yep, it still appears in the nwg-drawer when triggered with $mod+shift+d.

1 Like

I'm guessing this is something specific to wofi but just noticed the project doesn't seem to be maintained anymore... ugh

1 Like

I got it to work. There's a few command line utils for working with desktop entires.

  1. Install the desktop-file-utils package:
    sudo pacman -S desktop-file-utils

  2. Validate that the .desktop file meets freedesktop's current spec:
    desktop-file-validate [path]

  3. Install .desktop file:
    desktop-file-install --dir=[destination path] [desktop file]

  4. Update local desktop entry DB
    update-desktop-database [destination path]

I've made a script to do this. You can find it below

3 Likes

Asking for clarification: how did you conclude it's not maintained?
All I see is that last commit is one month ago, which is not yesterday, but not last year either.
Was it perhaps announced as unmaintained somewhere that I missed?
Just asking, so I understand better (I never used sourcehut).

1 Like

At the very top of the page it states

Blockquote
This project is not being actively maintained. I currently do not have the time nor energy to continue working on it.

https://hg.sr.ht/~scoopta/wofi

:man_facepalming:
Third miss in rapid succession... duh... system hibernating in 3... 2... 1... :zzz:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.