]> glassweightruler.freedombox.rocks Git - xdg-ninja.git/commitdiff
Add a bunch of apps (#352)
authorPavel Zolotarevskiy <code@fxgn.dev>
Sat, 3 Feb 2024 13:35:50 +0000 (16:35 +0300)
committerGitHub <noreply@github.com>
Sat, 3 Feb 2024 13:35:50 +0000 (14:35 +0100)
* add tuist (#272)

* add cocoapods (#270)

* add swiftpm (#269)

* add missing newline to tuist.json

* add ash (#283)

* add help for expo

* set correct android env vars (#32, #342)

* add scriptkit (#297)

* update xdg-utils message (#300)

* fix ipython error in pythonrc (#289)

* zsh directories need to be created manually (#341)

* add instructions for dotnet (#349)

* simplify emacs instructions (#315)

* ash: directory must be created manually

* add instructions for tldrc (#295)

* add a warning for xinitrc and Xauthority (#274)

15 files changed:
programs/android.json
programs/ash.json [new file with mode: 0644]
programs/cocoapods.json [new file with mode: 0644]
programs/dotnet.json
programs/emacs.json
programs/expo.json
programs/python.json
programs/scriptkit.json [new file with mode: 0644]
programs/swift-package-manager.json [new file with mode: 0644]
programs/tldr.json
programs/tuist.json [new file with mode: 0644]
programs/xdg-utils.json
programs/xinit.json
programs/xorg-xauth.json
programs/zsh.json

index 4d3273e9536e602597d28a5a01e3a9eba5886708..e48874af9727ccebc13a68499044043effe4dd68 100644 (file)
@@ -1,9 +1,14 @@
 {
     "files": [
         {
 {
     "files": [
         {
-            "help": "Export the following environment variable:\n\n```bash\nexport ANDROID_HOME=\"$XDG_DATA_HOME\"/android\n```\n\nAdditionally, if you use adb, use the following alias:\n\n```bash\nalias adb='HOME=\"$XDG_DATA_HOME\"/android adb'\n```\n\n",
+            "help": "Export the following environment variable:\n\n```bash\nexport ANDROID_USER_HOME=\"$XDG_DATA_HOME\"/android\n```\n\nAdditionally, if you use adb, use the following alias:\n\n```bash\nalias adb='HOME=\"$XDG_DATA_HOME\"/android adb'\n```\n\n",
             "movable": true,
             "path": "$HOME/.android"
             "movable": true,
             "path": "$HOME/.android"
+        },
+        {
+            "path": "$HOME/Android",
+            "movable": true,
+            "help": "Export the following environment variables:\n\n```bash\nexport ANDROID_HOME=\"$XDG_DATA_HOME\"/android/sdk\n```\n"
         }
     ],
     "name": "android"
         }
     ],
     "name": "android"
diff --git a/programs/ash.json b/programs/ash.json
new file mode 100644 (file)
index 0000000..f8669b2
--- /dev/null
@@ -0,0 +1,10 @@
+{
+    "name": "ash",
+    "files": [
+        {
+            "path": "$HOME/.ash_history",
+            "movable": true,
+            "help": "Export the following environment variables:\n\n```bash\nexport HISTFILE=\"$XDG_STATE_HOME\"/ash/history\n```\n\nYou must manually create the _$XDG_STATE_HOME/ash directory if it doesn't exist yet.\n"
+        }
+    ]
+}
diff --git a/programs/cocoapods.json b/programs/cocoapods.json
new file mode 100644 (file)
index 0000000..c970376
--- /dev/null
@@ -0,0 +1,10 @@
+{
+    "name": "CocoaPods",
+    "files": [
+        {
+            "path": "$HOME/.cocoapods",
+            "movable": true,
+            "help": "Export the following environment variables:\n\n```bash\nexport CP_HOME_DIR=\"$XDG_DATA_HOME\"/cocoapods\n```\n"
+        }
+    ]
+}
index 9737cb2b28db20e12e127cfd4c7e5d975a961ea6..61f04c30bf68396b45043be7d8c7af1829510111 100644 (file)
@@ -2,8 +2,8 @@
     "files": [
         {
             "path": "$HOME/.dotnet",
     "files": [
         {
             "path": "$HOME/.dotnet",
-            "movable": false,
-            "help": "Currently unsupported.\n\n_Relevant issue:_ https://github.com/dotnet/sdk/issues/8678\n"
+            "movable": true,
+            "help": "Export the following environment variables:\n\n```bash\nexport DOTNET_CLI_HOME=\"$XDG_DATA_HOME\"/dotnet\n```\n"
         },
         {
             "path": "$HOME/.net",
         },
         {
             "path": "$HOME/.net",
@@ -12,4 +12,4 @@
         }
     ],
     "name": "dotnet"
         }
     ],
     "name": "dotnet"
-}
\ No newline at end of file
+}
index 566e6656016e4f6f2ce781e0d78b5c02e4fc9f0f..6bdb6d489bd571d0c1ac63df737b637cd1cf38b4 100644 (file)
@@ -1,17 +1,12 @@
 {
     "files": [
         {
 {
     "files": [
         {
-            "help": "Supported since _27.1_.\n\nYou can move the file to _$XDG_CONFIG_HOME/emacs/init.el_.\n",
+            "help": "Supported since _27.1_.\n\nYou can move the directory to _$XDG_CONFIG_HOME/emacs_.\n",
             "movable": true,
             "movable": true,
-            "path": "$HOME/.emacs.d/init.el"
-        },
-        {
-            "help": "Currently unsupported.\n\n_Relevant issue:_ \"Legacy paths have precedence over XDG paths. Emacs will never create XDG_CONFIG_HOME/emacs/.\" according to XDG.\n\n",
-            "movable": false,
             "path": "$HOME/.emacs.d"
         },
         {
             "path": "$HOME/.emacs.d"
         },
         {
-            "help": "Looks to be supported natively. However, according to XDG \"Legacy paths have precedence over XDG paths. Emacs will never create _$XDG_CONFIG_HOME/emacs/_\".\nMove at your own risk.\n\nYou can move the file to _$XDG_CONFIG_HOME/emacs_.\n",
+            "help": "Supported since _27.1_.\n\nYou can move the file to _$XDG_CONFIG_HOME/emacs/init.el_.\n",
             "movable": true,
             "path": "$HOME/.emacs"
         }
             "movable": true,
             "path": "$HOME/.emacs"
         }
index 3f0e70b0357e5f780802614c3ad2e819cf6ab281..a50490a4b58977b07f9c83cb8028ca91cf042cf0 100644 (file)
@@ -3,8 +3,8 @@
         {
             "path": "$HOME/.expo",
             "movable": false,
         {
             "path": "$HOME/.expo",
             "movable": false,
-            "help": ""
+            "help": "Currently unsupported.\n\n_Relevant issue:_ https://github.com/expo/expo/discussions/18448\n"
         }
     ],
     "name": "expo"
         }
     ],
     "name": "expo"
-}
\ No newline at end of file
+}
index c9884bcc8c860b0f856b66412cd73fc0328c22fe..3aa547e7a0deeafb340a1b5b98d52899279830cc 100644 (file)
@@ -3,7 +3,7 @@
         {
             "path": "$HOME/.python_history",
             "movable": true,
         {
             "path": "$HOME/.python_history",
             "movable": true,
-            "help": "Export the following environment variables:\n\n```bash\nexport PYTHONSTARTUP=\"/etc/python/pythonrc\"\n```\n\nNow create the file _/etc/python/pythonrc_, and put the following code into it:\n\n```python\nimport os\nimport atexit\nimport readline\nfrom pathlib import Path\n\nif readline.get_current_history_length() == 0:\n\n    state_home = os.environ.get(\"XDG_STATE_HOME\")\n    if state_home is None:\n        state_home = Path.home() / \".local\" / \"state\"\n    else:\n        state_home = Path(state_home)\n\n    history_path = state_home / \"python_history\"\n    if history_path.is_dir():\n        raise OSError(f\"'{history_path}' cannot be a directory\")\n\n    history = str(history_path)\n\n    try:\n        readline.read_history_file(history)\n    except OSError: # Non existent\n        pass\n\n    def write_history():\n        try:\n            readline.write_history_file(history)\n        except OSError:\n            pass\n\n    atexit.register(write_history)\n```\n\n_Note: This won't work if python is invoked with -i flag._\n\n_Credit:_ https://unix.stackexchange.com/questions/630642/change-location-of-python-history"
+            "help": "Export the following environment variables:\n\n```bash\nexport PYTHONSTARTUP=\"$HOME\"/python/pythonrc\n```\n\nNow create the file _~/python/pythonrc_, and put the following code into it:\n\n```python\ndef is_vanilla() -> bool:\n    import sys\n    return not hasattr(__builtins__, '__IPYTHON__') and 'bpython' not in sys.argv[0]\n\n\ndef setup_history():\n    import os\n    import atexit\n    import readline\n    from pathlib import Path\n\n    if state_home := os.environ.get('XDG_STATE_HOME'):\n        state_home = Path(state_home)\n    else:\n        state_home = Path.home() / '.local' / 'state'\n\n    history: Path = state_home / 'python_history'\n\n    readline.read_history_file(str(history))\n    atexit.register(readline.write_history_file, str(history))\n\n\nif is_vanilla():\n    setup_history()\n```\n\nFinally, create an empty file at _$XDG_STATE_HOME/python_history_\n\n_Note: This won't work if python is invoked with -i flag._\n\n_Credit:_ https://github.com/b3nj5m1n/xdg-ninja/issues/289#issuecomment-1666024202"
         }
     ],
     "name": "python"
         }
     ],
     "name": "python"
diff --git a/programs/scriptkit.json b/programs/scriptkit.json
new file mode 100644 (file)
index 0000000..5a07547
--- /dev/null
@@ -0,0 +1,20 @@
+{
+    "name": "scriptkit",
+    "files": [
+        {
+            "path": "$HOME/.kit",
+            "movable": true,
+            "help": "Export the following environment variables:\n\n```bash\nexport KIT=\"$XDG_DATA_HOME\"/scriptkit/kit\n```\n"
+        },
+        {
+            "path": "$HOME/.kenv",
+            "movable": true,
+            "help": "Export the following environment variables:\n\n```bash\nexport KIT_DOTENV_PATH=\"$XDG_DATA_HOME\"/scriptkit/env\n```\n"
+        },
+        {
+            "path": "$HOME/knode",
+            "movable": true,
+            "help": "Export the following environment variables:\n\n```bash\nexport KNODE=\"$XDG_DATA_HOME\"/scriptkit/node\n```\n"
+        }
+    ]
+}
diff --git a/programs/swift-package-manager.json b/programs/swift-package-manager.json
new file mode 100644 (file)
index 0000000..d93447a
--- /dev/null
@@ -0,0 +1,10 @@
+{
+    "name": "Swift Package Manager",
+    "files": [
+        {
+            "path": "$HOME/.swiftpm",
+            "movable": false,
+            "help": "Currently unsupported.\n\n_Relevant issue:_ https://github.com/apple/swift-package-manager/issues/6204\n"
+        }
+    ]
+}
index 3f7a3f65e893ab2512cfd56921af025cd3307dde..da071199caeab72d1ca10a0aa027a99c9f717d0a 100644 (file)
@@ -1,10 +1,15 @@
 {
     "name": "tldr",
     "files": [
 {
     "name": "tldr",
     "files": [
+        {
+            "path": "$HOME/.tldr",
+            "movable": true,
+            "help": "Tldr has multiple official clients, so the instructions depend on your installation method.\n\nIf you're using the C client, export the following environment variable:\n\n```bash\nexport TLDR_CACHE_DIR=\"$XDG_CACHE_HOME\"/tldr\n```\n\nThe Python client and tlrc (Rust client) use the correct XDG directory out of the box.\n\n**There is currently no way to use an XDG directory in the Node.js client.**\n"
+        },
         {
             "path": "$HOME/.tldrc",
             "movable": true,
         {
             "path": "$HOME/.tldrc",
             "movable": true,
-            "help": "Currently tldr-pages do not have any specification for clients on where to cache tldr-pages. See the relevant [issue](https://github.com/tldr-pages/tldr/issues/876) and [specification](https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md)\n\nOfficial tldr-nodejs-client, tldr-python-client or tldr-c-client do not support XDG Base Directories.\n\n**Use [Tealdeer](https://github.com/dbrgn/tealdeer), a rust client for tldr that supports XDG Base Directories instead.**\n"
+            "help": "Tldr has multiple official clients, so the instructions depend on your installation method.\n\nIf you're using the C client, export the following environment variable:\n\n```bash\nexport TLDR_CACHE_DIR=\"$XDG_CACHE_HOME\"/tldr\n```\n\nThe Python client and tlrc (Rust client) use the correct XDG directory out of the box.\n\n**There is currently no way to use an XDG directory in the Node.js client.**\n"
         }
     ]
 }
         }
     ]
 }
diff --git a/programs/tuist.json b/programs/tuist.json
new file mode 100644 (file)
index 0000000..a9275a2
--- /dev/null
@@ -0,0 +1,10 @@
+{
+    "name": "tuist",
+    "files": [
+        {
+            "path": "$HOME/.tuist",
+            "movable": false,
+            "help": "Currently unsupported.\n\nSupport for XDG Specification is planned in Tuist v4:\nhttps://github.com/tuist/tuist/pull/5791#discussion_r1451466334\n"
+        }
+    ]
+}
index ae162c70b32f46e384abc7d863aafaf8a876f83f..914fd5d205e8b23e18b9415c2c681b7c30c1536b 100644 (file)
@@ -3,9 +3,8 @@
     "files": [
         {
             "path": "$HOME/.gnome",
     "files": [
         {
             "path": "$HOME/.gnome",
-            "movable": false,
-            "help": "For some reason the script xdg-desktop-menu hard-codes gnome_user_dir=\"$HOME/.gnome/apps\". This is used by chromium among others. Bug discussion has moved to gitlab and PR with fix exists, however it is not merged yet.\n\n_Relevant Issues:_ https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/81\n\n_Merge Request:_ https://gitlab.freedesktop.org/xdg/xdg-utils/-/merge_requests/22\n"
-
+            "movable": true,
+            "help": "This directory is created by old versions of `xdg-utils` and is no longer needed since GNOME 2.10. It can simply be deleted."
         }
     ]
 }
         }
     ]
 }
index fd0cf68189325a9f8cec4c65915ad921face7bf5..076607614753cb91e3f18567d5f972f78a3800e4 100644 (file)
@@ -6,7 +6,7 @@
             "path": "$HOME/.xserverrc"
         },
         {
             "path": "$HOME/.xserverrc"
         },
         {
-            "help": "Export the following environment variable:\n\n```bash\nexport XINITRC=\"$XDG_CONFIG_HOME\"/X11/xinitrc\n```\n",
+            "help": "Export the following environment variable:\n\n```bash\nexport XINITRC=\"$XDG_CONFIG_HOME\"/X11/xinitrc\n```\n\n**WARNING: Moving this file can potentially lead to not being able to start your X11 session or some programs (eg. Wine) not working as intended.**\n",
             "movable": true,
             "path": "$HOME/.xinitrc"
         }
             "movable": true,
             "path": "$HOME/.xinitrc"
         }
index 6d0856ae467a6ad7c4996ac019156f036dfccb2d..584bc4816d0c5c41bc83a7a8e08044f782cf249c 100644 (file)
@@ -3,7 +3,7 @@
         {
             "path": "$HOME/.Xauthority",
             "movable": true,
         {
             "path": "$HOME/.Xauthority",
             "movable": true,
-            "help": "Export the following environment variables:\n\n```bash\nexport XAUTHORITY=\"$XDG_RUNTIME_DIR\"/Xauthority\n```\n\n- **LightDM does not allow you to do this.** See [here](https://askubuntu.com/a/961459) for workaround.\n- SLiM has _~/.Xauthority_ hardcoded\n\n- SDDM uses its own config to set XAUTHORITY variable. **Do not set it manually.**\nExample `/etc/sddm.conf.d/xorg_settings.conf`:\n```ini\n[X11]\nUserAuthFile=.local/share/sddm/Xauthority\n```\n_Note: this might not work as expected, so be careful._\n"
+            "help": "Export the following environment variables:\n\n```bash\nexport XAUTHORITY=\"$XDG_RUNTIME_DIR\"/Xauthority\n```\n\n- **LightDM does not allow you to do this.** See [here](https://askubuntu.com/a/961459) for workaround.\n- SLiM has _~/.Xauthority_ hardcoded\n\n- SDDM uses its own config to set XAUTHORITY variable. **Do not set it manually.**\nExample `/etc/sddm.conf.d/xorg_settings.conf`:\n```ini\n[X11]\nUserAuthFile=.local/share/sddm/Xauthority\n```\n**WARNING: Moving this file can potentially lead to not being able to start your X11 session or some programs (eg. Wine) not working as intended.**\n"
         }
     ],
     "name": "xorg-xauth"
         }
     ],
     "name": "xorg-xauth"
index b908485a19739f6f3d474bacfe621c2952015b4f..24d2fd73e7f364cf6abb958e800c1fe5b315b219 100644 (file)
@@ -1,27 +1,27 @@
 {
     "files": [
         {
 {
     "files": [
         {
-            "help": "Set this in your zshrc:\n\n```bash\nzstyle ':completion:*' cache-path \"$XDG_CACHE_HOME\"/zsh/zcompcache\n```\n",
+            "help": "Set this in your zshrc:\n\n```bash\nzstyle ':completion:*' cache-path \"$XDG_CACHE_HOME\"/zsh/zcompcache\n```\n\nYou must manually create the _$XDG_CACHE_HOME/zsh_ directory if it doesn't exist yet.\n",
             "movable": true,
             "path": "$HOME/.zcompcache"
         },
         {
             "movable": true,
             "path": "$HOME/.zcompcache"
         },
         {
-            "help": "Set this in your zshrc:\n\n```bash\ncompinit -d \"$XDG_CACHE_HOME\"/zsh/zcompdump-\"$ZSH_VERSION\"\n```\n",
+            "help": "Set this in your zshrc:\n\n```bash\ncompinit -d \"$XDG_CACHE_HOME\"/zsh/zcompdump-\"$ZSH_VERSION\"\n```\n\nYou must manually create the _$XDG_CACHE_HOME/zsh_ directory if it doesn't exist yet.\n",
             "movable": true,
             "path": "$HOME/.zcompdump*"
         },
         {
             "movable": true,
             "path": "$HOME/.zcompdump*"
         },
         {
-            "help": "Set this in your zshrc:\n\n```bash\nexport HISTFILE=\"$XDG_STATE_HOME\"/zsh/history\n```\n",
+            "help": "Set this in your zshrc:\n\n```bash\nexport HISTFILE=\"$XDG_STATE_HOME\"/zsh/history\n```\n\nYou must manually create the _$XDG_STATE_HOME/zsh_ directory if it doesn't exist yet.\n",
             "movable": true,
             "path": "$HOME/.zhistory"
         },
         {
             "movable": true,
             "path": "$HOME/.zhistory"
         },
         {
-            "help": "Set this in your zshrc:\n\n```bash\nexport HISTFILE=\"$XDG_STATE_HOME\"/zsh/history\n```\n",
+            "help": "Set this in your zshrc:\n\n```bash\nexport HISTFILE=\"$XDG_STATE_HOME\"/zsh/history\n```\n\nYou must manually create the _$XDG_STATE_HOME/zsh_ directory if it doesn't exist yet.\n",
             "movable": true,
             "path": "$HOME/.histfile"
         },
         {
             "movable": true,
             "path": "$HOME/.histfile"
         },
         {
-            "help": "Set this in your zshrc:\n\n```bash\nexport HISTFILE=\"$XDG_STATE_HOME\"/zsh/history\n```\n",
+            "help": "Set this in your zshrc:\n\n```bash\nexport HISTFILE=\"$XDG_STATE_HOME\"/zsh/history\n```\n\nYou must manually create the _$XDG_STATE_HOME/zsh_ directory if it doesn't exist yet.\n",
             "movable": true,
             "path": "$HOME/.zsh_history"
         },
             "movable": true,
             "path": "$HOME/.zsh_history"
         },