Hyprland Fish shell throws error after various commands complete

Hello,

I originally installed Garuda Linux KDE a couple years ago. Recently I installed Hyprland on the same system and used the login manager to start sessions with Hyprland instead of KDE Plasma. Everything worked as expected until a couple weeks ago I started getting this error:

Argument is not a number: 'kitty'
~/.config/fish/conf.d/done.fish (line 152): 
        and test $__done_initial_window_id -eq (hyprctl activewindow | awk 'NR==1 {print $2}')
            ^
in function '__done_is_process_window_focused'
	called on line 222 of file ~/.config/fish/conf.d/done.fish
in function '__done_ended' with arguments 'garuda-update'
in event handler: handler for generic event “fish_postexec”"

I figured the error was caused by a Hyprland update that changed the hyprctl output such that the fish ‘__done_inital_window_id’ function could no longer get the window ID. I tried to fix it myself by changing the awk command but I couldn’t figure it out.

Does anyone have any ideas, or might this be fixed in an update? Thanks!

Edit: Here is garuda-inxi

System:
  Kernel: 6.9.10-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=c3d6a053-0f9d-4107-9b5d-3dd29d943f43 rw rootflags=subvol=@
    usbcore.autosuspend=-1 quiet
    resume=UUID=c96087d6-76f8-4056-abc9-2c4ca85f7c1d loglevel=3
    amdgpu.ppfeaturemask=0xffffffff ibt=off
  Desktop: Hyprland v: 0.41.2 wm: kwin_wayland with: waybar vt: 4 dm: SDDM
    Distro: Garuda base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: X670E Steel Legend
    serial: <superuser required> uuid: <superuser required> UEFI: American
    Megatrends LLC. v: 1.21 date: 04/26/2023
CPU:
  Info: model: AMD Ryzen 7 7800X3D bits: 64 type: MT MCP arch: Zen 4 gen: 5
    level: v4 note: check built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25)
    model-id: 0x61 (97) stepping: 2 microcode: 0xA601203
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 8 MiB desc: 8x1024 KiB
    L3: 96 MiB desc: 1x96 MiB
  Speed (MHz): avg: 2341 high: 4842 min/max: 400/5050 scaling:
    driver: amd-pstate-epp governor: performance cores: 1: 4837 2: 4838 3: 400
    4: 4838 5: 400 6: 400 7: 4837 8: 400 9: 4839 10: 4842 11: 400 12: 400
    13: 4836 14: 400 15: 400 16: 400 bogomips: 134149
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] vendor: XFX
    driver: amdgpu v: kernel arch: RDNA-3 code: Navi-3x process: TSMC n5 (5nm)
    built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 16 ports:
    active: DP-1,DP-3,HDMI-A-1 empty: DP-2,Writeback-1 bus-ID: 03:00.0
    chip-ID: 1002:744c class-ID: 0300
  Device-2: AMD Raphael driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 16
    ports: active: none empty: DP-4, DP-5, DP-6, HDMI-A-2, Writeback-2
    bus-ID: 18:00.0 chip-ID: 1002:164e class-ID: 0300 temp: 43.0 C
  Device-3: Linux Foundation EEM Gadget driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-5:3
    chip-ID: 1d6b:0102 class-ID: 0102
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.1
    compositors: 1: Hyprland v: 0.41.2 2: kwin_wayland driver: X:
    loaded: modesetting alternate: fbdev,vesa dri: radeonsi gpu: amdgpu,amdgpu
    display-ID: 1
  Monitor-1: DP-1 res: 2560x1440 size: N/A modes: N/A
  Monitor-2: DP-3 res: 1920x1080 size: N/A modes: N/A
  Monitor-3: HDMI-A-1 res: 1920x1080 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: radeonsi device: 2 drv: swrast gbm: drv: kms_swrast
    surfaceless: drv: radeonsi wayland: drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.4-arch1.2
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 7900 XT (radeonsi
    navi31 LLVM 18.1.8 DRM 3.57 6.9.10-zen1-1-zen) device-ID: 1002:744c
    memory: 19.53 GiB unified: no
  API: Vulkan v: 1.3.279 layers: 12 device: 0 type: discrete-gpu name: AMD
    Radeon RX 7900 XT (RADV NAVI31) driver: mesa radv v: 24.1.4-arch1.2
    device-ID: 1002:744c surfaces: xcb,xlib,wayland device: 1
    type: integrated-gpu name: AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO)
    driver: mesa radv v: 24.1.4-arch1.2 device-ID: 1002:164e
    surfaces: xcb,xlib,wayland device: 2 type: cpu name: llvmpipe (LLVM
    18.1.8 256 bits) driver: mesa llvmpipe v: 24.1.4-arch1.2 (LLVM 18.1.8)
    device-ID: 10005:0000 surfaces: xcb,xlib,wayland
Audio:
  Device-1: AMD Navi 31 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab30
    class-ID: 0403
  Device-2: AMD Rembrandt Radeon High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 18:00.1
    chip-ID: 1002:1640 class-ID: 0403
  Device-3: AMD Family 17h/19h HD Audio vendor: ASRock driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 18:00.6
    chip-ID: 1022:15e3 class-ID: 0403
  Device-4: Linux Foundation EEM Gadget driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-5:3
    chip-ID: 1d6b:0102 class-ID: 0102
  Device-5: Corsair VOID ELITE Wireless Gaming Dongle
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 7-2:2 chip-ID: 1b1c:0a51 class-ID: 0300
  API: ALSA v: k6.9.10-zen1-1-zen status: kernel-api with: aoss
    type: oss-emulator tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.2.1 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: ASRock driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: d000 bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp7s0 state: down mac: <filter>
  Device-2: MEDIATEK MT7922 802.11ax PCI Express Wireless Network Adapter
    driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1
    bus-ID: 09:00.0 chip-ID: 14c3:0616 class-ID: 0280
  IF: wlp9s0 state: down mac: <filter>
  Device-3: Realtek RTL8125 2.5GbE vendor: ASRock driver: r8169 v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 port: c000 bus-ID: 0a:00.0
    chip-ID: 10ec:8125 class-ID: 0200
  IF: enp10s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-4: Microsoft Xbox 360 Wireless Adapter driver: xpad type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 5-2:2 chip-ID: 045e:0719
    class-ID: ff00 serial: <filter>
  Info: services: NetworkManager, smbd, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: MediaTek Wireless_Device driver: btusb v: 0.8 type: USB rev: 2.1
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-12:5 chip-ID: 0e8d:0616
    class-ID: e001 serial: <filter>
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11
    status: discoverable: no pairing: no
Drives:
  Local Storage: total: 4.55 TiB used: 2.32 TiB (51.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 PRO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 5B2QGXA7 temp: 46.9 C
    scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:4 vendor: Samsung
    model: SSD 970 EVO Plus 2TB size: 1.82 TiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: 4B2QEXM7 temp: 45.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DM008-2FR102
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 7200 serial: <filter> fw-rev: 0001 scheme: GPT
Partition:
  ID-1: / raw-size: 897.69 GiB size: 897.69 GiB (100.00%)
    used: 606.02 GiB (67.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 584 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 897.69 GiB size: 897.69 GiB (100.00%)
    used: 606.02 GiB (67.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 897.69 GiB size: 897.69 GiB (100.00%)
    used: 606.02 GiB (67.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 897.69 GiB size: 897.69 GiB (100.00%)
    used: 606.02 GiB (67.5%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 30.47 GiB used: 2.38 GiB (7.8%)
    priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 16
    dev: /dev/zram0
  ID-2: swap-2 type: partition size: 33.52 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 55.2 C mobo: 44.0 C
  Fan Speeds (rpm): N/A
  GPU: device: amdgpu temp: 66.0 C mem: 74.0 C fan: 553 watts: 76.00
    device: amdgpu temp: 43.0 C
Info:
  Memory: total: 32 GiB note: est. available: 30.47 GiB used: 8.71 GiB (28.6%)
  Processes: 423 Power: uptime: 6d 8h 4m states: freeze,mem,disk
    suspend: deep avail: s2idle wakeups: 0 hibernate: platform avail: shutdown,
    reboot, suspend, test_resume image: 12.18 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
    tool: systemctl
  Packages: pm: pacman pkgs: 2254 libs: 600 tools: paru Compilers:
    clang: 18.1.8 gcc: 14.1.1 Shell: garuda-inxi default: fish v: 3.7.1
    running-in: kitty inxi: 3.3.35
Garuda (2.6.26-1):
  System install date:     2023-11-24
  Last full system update: 2024-07-29 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       No/Undetected
  Failed units:       

I think you should always follow the rule post Garuda Inxi.

Well, I wouldn’t know the intricate details of the file. I know you can find a backup of the file in
this path/etc/skel/.config/fish/conf.d,
and maybe cp it to your fish directory.

If something still a miss, you could get a copy from garuda repo on gitlab > settings > hyprland section

Mb, post updated.

I checked the Gitlab and the done.fish file doesn’t seem to exist in the base hyprland install. I found a workaround modifying the return statement to 1 instead of $status in the hyprland section. This prevents the error and I don’t imagine it’d break anything when using a KDE session.

Still if anyone knows the proper way to fix this that’d be appreciated

It is in skel.

ls /etc/skel/.config/fish/conf.d/
.rw-r--r--  13k root  4 Feb 05:37  done.fish
.rw-r--r-- 1,1k root 22 Jul 11:32  mocha.fish

But there is a very high risk of problems if you mix two DEs.
I can’t post the file, I got “draft offline” message in discourse.

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