Skip to content

A systray applet to toggle facetimehd camera for macbooks running Linux

License

Notifications You must be signed in to change notification settings

Chamal1120/facetimehd-toggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facetimehd Toggle

-- A little something I made to make me and other linux on mac users happy --

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.

  1. First you need the facetimehd kernel module driver to be installed:

    Debian: Follow the instructions here.

    Arch:

    yay -S facetimehd-dkms # arch linux syntax
  2. Disable it from loading at startup:

    sudo vim /etc/modprobe.d/blacklist-facetimehd.conf # this will open the file with vim

    then add following line to it.

    blacklist facetimehd
  3. Rebuild the initramfs and reboot the system:

    Debian:

    update-initramfs -u

    Arch:

    mkinitcpio -P # arch linux syntax
    reboot
  4. Install dependencies

    Debian:

    sudo apt install cargo libglib2.0-dev libpango1.0-dev libatk1.0-dev libgdk-pixbuf-2.0-dev libgtk-3-dev

    Arch:

    sudo pacman -S rust cargo gtk3
  5. 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/
    
  6. You can now run the applet by using the following command: /usr/bin/facetimehd_toggle

Make the systray auto start on boot

Using systemd

  1. 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
  1. Enable and start the service:
systemctl --user enable facetimehd-toggle.service
systemctl --user start facetimehd-toggle.service
  1. Check status:
systemctl --user status facetimehd-toggle.service

Hyprland user?

  1. Make sure you have hyprpolkit or another polkit agent setup.

  2. 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.

About

A systray applet to toggle facetimehd camera for macbooks running Linux

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages