Skip to content

Rococcoon/bubblePowerMenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Power Menu for Sway

This is a terminal-based power menu built with the Bubble Tea Go package. It provides a simple interface to sleep, lock, power off, and reboot your system directly from a terminal.

Features:

  • Lock: Locks the screen using swaylock.
  • Power Off: Shuts down the system.
  • Reboot: Reboots the system.

Requirements:

  • Go: Make sure you have Go installed to build the project.
  • Sway: This menu is designed to work in the Sway window manager.
  • Swaylock: For locking the screen.
  • systemctl: Used for power off, reboot, and suspend operations.

Installation

  1. Clone the repository (if applicable) or create the Go program:

    git clone https://github.com/yourusername/power-menu.git
    cd power-menu
  2. Build the project:

    go build -o power-menu
  3. Move the binary to a directory in your $PATH:

    sudo mv power-menu /usr/local/bin/

Usage

Once the program is compiled and moved to your $PATH, you can launch it using a terminal emulator like st, alacritty, or kitty.

Keybinding in Sway

To launch the power menu from your Sway configuration:

  1. Open your Sway configuration file:

    nano ~/.config/sway/config
  2. Add the following keybinding to run the power menu with Mod+P:

    bindsym $mod+p exec alacritty -e power-menu

    Replace alacritty with the terminal of your choice, such as st, kitty, etc.

  3. Reload the Sway configuration:

    swaymsg reload

Now, when you press Mod+P, your power menu will appear in a terminal.

Commands:

  • Lock: Locks the screen using swaylock with your specified wallpaper.
  • Power Off: Shuts down the system.
  • Reboot: Reboots the system.

Customization

  • You can customize the lock screen wallpaper by modifying the swaylock command in the power-menu code:
    cmd = exec.Command("swaylock", "-f", "-i", "/path/to/your/wallpaper.png")
    Replace /path/to/your/wallpaper.png with your desired wallpaper.

License

MIT License - See LICENSE for more details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages