Hi! Iโve written the following script:
#!/usr/bin/env nu
export-env {
$env.GUM_CHOOSE_SELECTED_FOREGROUND = '#64d633'
}
while true {
try {
let response = (gum choose --no-show-help
--header='What would you like to do?'
uninstall exit)
match $response {
uninstall => {
try {
let applications_to_uninstall = (flatpak list --app --columns=application |
gum choose --no-limit |
str join |
split row "\n")
flatpak uninstall ...$applications_to_uninstall -y
}
},
exit => {
exit
}
}
} catch {
exit
}
}
Which allows me to interactively select required flatpak applications to uninstall them. The issue is that while it executes properly when I simply enter itโs path in Konsole like: /home/emilygraceseville7cf/Documents/programming/mine/nu/application-manager.nu
it fails to run the same script with this invocation: flatpak run org.kde.konsole -e /home/emilygraceseville7cf/Documents/programming/mine/nu/application-manager.nu
with this output (the window newly opened script Konsole window closes instantly):
kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeLight.colors"
QLayout: Cannot add a null widget to QHBoxLayout/
Whatโs the deal with Konsole in this case? Why does it keep happening?
โญโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ name โ Ubuntu โ
โ os_version โ 24.04 โ
โ long_os_version โ Linux (Ubuntu 24.04) โ
โ kernel_version โ 6.8.0-57-generic โ
โ hostname โ emilygraceseville7cf-laptop โ
โ uptime โ 1day 31min 6sec โ
โ boot_time โ a day ago โ
โฐโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ