Skip to content

Repository files navigation

fsmon

Tests Bun macOS

FileSystem MONitor: monitor one directory/folder for the arrival of ica files, Citrix-specific files.

Maybe rename to ICAfixer?

Why?

The client where I'm stationed at the moment is allowing remote work via Citrix. Unfortunately their Citrix configuration file (.ica) has the full screen modus activated, which is not how I like it. So, this little program watches a (download) directory of choice and replaces the full screen line with a line that disables full screen. Then, the modified .ica file is opened, as my browser (Safari or Orion) does not do that automatically.

Requirements

  • a UNIX-like OS, such as Linux or macOS
  • Bun, version 1.1.34 or later
  • Citrix Workspace installed, version 24.02.10.6 or later

ProTip: use RunMe Notebooks! Turns any MarkDown file into a Notebook with code & markdown blocks; the code blocks can be executed and chained!! There is a VSCode extension AND a CLI 😎

Configuration

Make a .env file in this projects' root directory and put the line

ICA_DIR=/some/where/over/the/rainbow

This variable must also be set in the environment of GitHub Actions. In a production environment the variable can be set via an export in the shell startup script, such as .bashrc or .zshrc.

Run all tests:

bun test

Now start the monitor with (with watch for changes)

bun dev

or (not watching for changes)

bun start

build cli executable

Building a standalone executable can be achieved by running

bun build

then execute the result:

./fsmon

Add an & after that command to run in the background. Make sure all errors are handled as the program will exit on error!

./fsmon &

When the executable is sufficiently stable, the fsmon executable can be moved to a direcotry in the path.

About

FileSystem Monitor with Bun

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages