Facetimehd Toggle
-- A little something I made to make me and other linux on mac users happy --
</div>What is this?
Just a simple systray applet to toggle facetimehd camera in MacBooks running Linux as needed using modprobe.
Why this exists?
Because no one does it. Keeping the module loaded prevents few macs from going to sleep including mine and it is painful to enable and disable using terminal when I'm in a hurry to a meeting. I hope this will be helpful for someone out there.
Plus, this also increases the privacy
How to setup?
Same commands for both Debian and Arch-based distros, unless separately listed.
-
First you need the facetimehd kernel module driver to be installed:
Debian: Follow the instructions here.
Arch:
yay -S facetimehd-dkms # arch linux syntax -
Disable it from loading at startup:
sudo vim /etc/modprobe.d/blacklist-facetimehd.conf # this will open the file with vimthen add following line to it.
blacklist facetimehd -
Rebuild the
initramfsand reboot the system:Debian:
update-initramfs -uArch:
mkinitcpio -P # arch linux syntax reboot -
Install dependencies
Debian:
sudo apt install cargo libglib2.0-dev libpango1.0-dev libatk1.0-dev libgdk-pixbuf-2.0-dev libgtk-3-devArch:
sudo pacman -S rust cargo gtk3 -
Download the binary from the releases and move it to /usr/bin or build it using the following steps:
git clone https://github.com/Chamal1120/facetimehd-toggle.git cd facetimehd-toggle cargo build --release sudo cp target/release/facetimehd_toggle /usr/bin/ -
You can now run the applet by using the following command:
/usr/bin/facetimehd_toggle
Make the systray auto start on boot
Using systemd
- Create systemd unit:
mkdir -p ~/.config/systemd/user
vim ~/.config/systemd/user/facetimehd-toggle.service
and add following,
[Unit]
Description=FaceTimeHD Toggle Tray
After=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/facetimehd_toggle
Restart=on-failure
[Install]
WantedBy=default.target
- Enable and start the service:
systemctl --user enable facetimehd-toggle.service
systemctl --user start facetimehd-toggle.service
- Check status:
systemctl --user status facetimehd-toggle.service
Hyprland user?
-
Make sure you have hyprpolkit or another polkit agent setup.
-
Then just put below line into your hyprland config and you're done.
exec-once = env DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS <path/to/your/program>
AUR Package is coming soon...
License
This project is Licensed under MIT license.