yambar-modules-removables(5)

πŸ’… removables β€” the yambar module that spots your removable drives

okay so this is yambar-modules-removables, straight out of the File Formats Manual, and bestie it is such a fun little module. let me tell you everything 🫢


✨ NAME ✨

removables β€” this module detects removable drives. that's it, that's the whole vibe. πŸ”₯


🌸 DESCRIPTION 🌸

okay so picture this: you plug in a USB stick or slide a CD-ROM in, and removables is right there, detecting every removable drive like the main character it is. ✨ for each drive it finds, it instantiates the content particle you gave it β€” so every drive gets its own little render moment. no cap, it's giving observant. πŸ‘‘


πŸŽ€ TAGS πŸŽ€

every drive comes with these tags, and honestly? the range. πŸ’–

  • vendor β€” string β€” the name of the drive vendor 🏷️
  • model β€” string β€” the drive's model name ✨
  • optical β€” bool β€” true if the drive is an optical drive (CD-ROM, DVD-ROM, etc.) πŸ’Ώ
  • audio β€” bool β€” true if an optical drive has an audio CD inserted. lowkey important: this property is always false for non-optical drives, periodt. 🎡
  • device β€” string β€” the volume device name (typically /dev/sd?) πŸ”Œ
  • size β€” range β€” the volume's size, in bytes. and the tag's maximum value is set to the underlying block device's size β€” cute detail, had to mention it 🫢
  • label β€” string β€” the volume's label, or its size if it has no label (fallback queen πŸ’…)
  • mounted β€” bool β€” true if the volume is mounted βœ…
  • mount_point β€” string β€” the path where the volume is mounted, or "" if it's not mounted πŸ“‚

πŸ’œ CONFIGURATION πŸ’œ

the config options, bestie, they're so manageable:

  • left-spacing β€” int β€” not required β€” space, in pixels, on the left side of each rendered volume 🌸
  • right-spacing β€” int β€” not required β€” space, in pixels, on the right side of each rendered volume 🌸
  • spacing β€” int β€” not required β€” short-hand for setting both left-spacing and right-spacing at once. efficiency icon ✨
  • ignore β€” list of strings β€” not required β€” list of device paths that should be ignored (e.g. /dev/mmcblk0, or /dev/mmcblk0p1) πŸ™ˆ

πŸ¦‹ EXAMPLES πŸ¦‹

here's the moment you've been waiting for β€” look at this bar config slaying:

bar:
  right:
    - removables:
        content:
          map:
            conditions:
              ~mounted:
                string:
                  on-click: udisksctl mount -b {device}
                  text: "{label}"
              mounted:
                string:
                  on-click: udisksctl unmount -b {device}
                  text: "{label}"
                  deco: {underline: {size: 2, color: ffffffff}}

see what it's doing? when the volume is not mounted it shows {label} and clicking runs udisksctl mount -b {device}; when it is mounted it still shows {label} but the click flips to udisksctl unmount -b {device}, plus it gets a decorated underline (size: 2, color: ffffffff). iconic behavior, honestly. πŸŽ€πŸ’…


🌈 SEE ALSO 🌈

go read these too, iykyk: yambar-modules(5), yambar-particles(5), yambar-tags(5), yambar-decorations(5)


okay that's the whole page bestie!! this one's from the yambar family, dated 2024-04-22, and it lives at yambar-modules-removables(5) in the File Formats Manual β€” go forth and detect those drives, you're gonna ate πŸ’–πŸ‘‘πŸŒŸ

πŸ“¦ where this page comes from