Metadata-Version: 2.4
Name: yandexdisk
Version: 0.1.1
Summary: System tray control center for the Yandex Disk console client on Linux
Author: Bayram Kotan
License-Expression: MIT
Project-URL: Homepage, https://github.com/bayramkotan/yandexdisk
Project-URL: Issues, https://github.com/bayramkotan/yandexdisk/issues
Keywords: yandex,yandex-disk,cloud,sync,tray,linux,pyside6
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Archiving :: Mirroring
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PySide6-Essentials>=6.6
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Dynamic: license-file

# yandexdisk

A system tray control center for the official Yandex Disk console client (`yandex-disk`) on Linux.

The console client syncs well but has no interface. yandexdisk puts every daemon command and every
setting behind a tray icon and one window: start and stop sync, watch progress, open recently synced
files, share public links, edit excluded folders and the proxy, sign in, and find out why sync stopped.

> yandexdisk is an independent project. It is not made or endorsed by Yandex.

## Install

1. Install the Yandex Disk console client.

   | Distribution | Command |
   |---|---|
   | Arch, CachyOS, Manjaro | `paru -S yandex-disk` |
   | Debian, Ubuntu, Mint | `wget https://repo.yandex.ru/yandex-disk/yandex-disk_latest_amd64.deb && sudo apt install ./yandex-disk_latest_amd64.deb` |
   | Fedora, openSUSE | `sudo dnf install https://repo.yandex.ru/yandex-disk/yandex-disk-latest.x86_64.rpm` |

2. Install yandexdisk.

   ```bash
   pip install yandexdisk
   # on distributions that protect the system Python (Arch, CachyOS, Debian 12+):
   pip install --break-system-packages yandexdisk
   # or through npm (installs the Python package on first run):
   npm install -g yandexdisk-js
   ```

3. Start it.

   ```bash
   yandexdisk            # or the short name: yd
   ```

   To have it in the application menu and start it at login:

   ```bash
   yandexdisk install-desktop
   yandexdisk autostart on
   ```

GNOME needs the *AppIndicator and KStatusNotifierItem Support* extension to show tray icons.
KDE Plasma, XFCE, Cinnamon, MATE, Budgie and most tiling bar setups work out of the box.

## The tray menu

| Item | What it does |
|---|---|
| Status, storage, transfer lines | Live state of the daemon, space used and current transfer |
| Error line | Shown only when the daemon reports an error; opens Diagnostics |
| Start sync / Stop sync | Starts or stops the daemon |
| Sync now | Asks the daemon to sync immediately |
| Restart daemon | Stop, then start, to pick up new settings |
| Open Yandex Disk folder / Open on the web | Local folder or disk.yandex.com |
| Recently synced | Last synced items; each opens, shows in folder, copies a public link or the path |
| Public links | Share a file or folder, copy recent links, manage links |
| Fix stuck files (N) | Shown when files can't upload; opens Stuck files |
| Check for problems | Runs Diagnostics |
| Commands and log | Every daemon command plus the full log |
| Settings | Jumps straight to any settings page |
| Do not disturb | Holds all notifications |
| Quit | Quit and keep syncing, or quit and stop sync |

Left click opens the control center, middle click syncs now. Both are configurable.

## The control center

A menu bar (File, Sync, Service, Tools, Settings, Help) holds every command with a keyboard shortcut,
and **Ctrl+K** opens a search box that finds any command or setting by a few letters — type
"linger", "shortcut" or "clear log" and press Enter.

| Shortcut | Command |
|---|---|
| Ctrl+K | Search actions and settings |
| F5 | Sync now |
| Ctrl+Shift+P | Start or stop sync |
| Ctrl+R | Fix stuck files |
| Ctrl+D | Check for problems |
| Ctrl+L / Ctrl+E | Commands and log / run a daemon command |
| Ctrl+Shift+Del | Clear the log |
| Ctrl+1 … Ctrl+8 | Settings pages |
| Ctrl+O / Ctrl+Shift+O | Open the folder / open the web disk |
| Ctrl+W / Ctrl+Q | Close the window / quit |

- **Overview** — storage ring with live sync progress, numbers for used, free, trash and file size
  limit, start/stop, sync now, and the latest synced items.
- **Activity** — every synced item the daemon reported, kept locally, with search and filters.
- **Stuck files** — files the Yandex server keeps refusing (HTTP 5xx on a delta upload, "server failure"),
  found in the daemon's own log, with one-click repair: the files are parked outside the folder until the
  old copies leave the server, uploaded fresh under temporary names the daemon has never seen, then given
  their own names back. Every step is confirmed from the daemon's log, the daemon is restarted when it
  sits in its two-minute retry delay, each file shows where it is, a repair can be cancelled at any
  moment, and past repairs are listed. Nothing is deleted locally. Each file has its own Repair button,
  "Repair all, one by one" handles one file at a time, and the selected file shows its whole conversation
  with the server: what the daemon sent, which HTTP answer came back, retries and give-ups.
- **Public links** — share files and folders, copy, open or remove links.
- **General** — start at login, run sync as a system service, desktop shortcuts (Yandex Disk folder,
  control center, service page), automatic repair of stuck files, start or stop sync with the app, tray
  click actions, check intervals, custom path to the daemon program.
- **Background service** — runs the daemon as the systemd user service `yandexdisk-daemon.service`
  (every daemon option is passed on the command line, the command is test-run before the service is
  enabled, and if the service keeps failing it is switched off and sync starts the normal way): starts
  with the system, restarts on failure, optional start at boot before login (linger), start/stop/restart,
  service log, and "one Yandex Disk at a time": shows other daemons and tray apps such as
  yandex-disk-indicator, quits them or stops them starting at login, and hands everything to the service.
- **Account** — your Yandex profile (photo, name, login, e-mail, plan) through a separate read-only
  connection, sync sign-in for the daemon (device code flow driven from the window), sign out, storage.
- **Folders and sync mode** — sync folder, two-way or download-only modes, config and token files.
- **Excluded folders** — pick or type folders the daemon must skip.
- **Network** — system proxy, no proxy, or manual HTTP/HTTPS/SOCKS4/SOCKS5 proxy with login.
- **Notifications** — sync finished, new files, errors, start/stop, link copied, do not disturb.
- **Appearance** — light, dark or system theme; colored or monochrome tray icon.
- **Files the daemon can't read** (on Stuck files) — `DIGEST … read error` lines from the daemon's log,
  each file test-read here too, with "make the daemon read it again", fix permission, exclude its folder.
- **Daemon log** — the daemon's own core.log, live: every request to the server and the answer it got,
  refusals in red, filter by file name, only problems, follow and pause.
- **Diagnostics** — checks the daemon, config, token, folder, exclusions, duplicate daemons, network,
  inotify watch limit and free space, with a copyable fix for each problem.
- **Commands and log** — buttons for every daemon command, a free command line, and a filterable log.

Settings that belong to the daemon are written to its own `~/.config/yandex-disk/config.cfg`
(a `.bak` copy is kept). App settings live in `~/.config/yandexdisk/settings.json`; activity, links
and the log live in `~/.local/state/yandexdisk/`.

## Command line

```text
yandexdisk                    start the tray app
yandexdisk --hidden           start in the tray without the window
yandexdisk --page network     open the control center on a page
yandexdisk status [--json]    daemon status
yandexdisk start | stop | restart | sync
yandexdisk publish PATH       share and print the public link
yandexdisk unpublish PATH
yandexdisk repair             list files the server keeps refusing
yandexdisk repair --all       repair all of them (or name the files; --no-restart keeps the daemon running)
yandexdisk repair --one-by-one --all   repair the files one after another
yandexdisk repair --log PATH  what the daemon sent and got back for one file
yandexdisk repair --restore   put back files parked by an interrupted repair
yandexdisk service install    run the daemon as a systemd user service (status, start, stop,
                              restart, disable, remove, logs, linger on|off)
yandexdisk shortcuts create   desktop shortcuts: folder, app, service (or remove)
yandexdisk login              sign in from the terminal
yandexdisk doctor             diagnostics report
yandexdisk open | web         open the folder or the web disk
yandexdisk settings [PAGE]    open a settings page in the running app
yandexdisk quit [--stop]      quit the running tray app
yandexdisk autostart on|off|status
yandexdisk install-desktop
yandexdisk update             upgrade from PyPI
yandexdisk --version          also -v, -V, --Version
```

`yd` works everywhere `yandexdisk` does.

## Updates

The app checks PyPI once a day (can be switched off on About). When a new version is out it says so
in a notification and in the tray menu; **Update now** installs it with pip in the background, showing
pip's output, and **Restart now** starts the new version.

## License

MIT
