Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
/ signal-cli.bash Public archive

Two Bash scripts making signal-cli convenient for interactive use

Notifications You must be signed in to change notification settings

meribold/signal-cli.bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

signal-cli.bash

Two Bash scripts aiming to make signal-cli convenient for interactive use.

signal-daemon

Starts signal-cli in daemon mode and creates notifications for incoming messages using notify-send. I only tested it with the dunst(1) notification daemon.

Dunst message window screenshot

s

Sends messages and optionally a screenshot of a region or window. Screenshots are taken using maim(1) and slop(1). Requires that signal-cli is running in daemon mode (via signal-daemon or directly). Examples.

  • Send messages to one recipient or a group:

    s alvin "Curiouser and curiouser!"
    s family Heh
    fortune -s | s alvin
  • Send a message to multiple recipients:

    s alvin lukas "I summon entropy."
  • Query for a region or window, take a screenshot, and send it and an optional message:

    s -s alvin "This message is optional."

GIF demonstrating the -s option

Installation

  1. Put the two scripts somewhere in your $PATH. For example ~/bin/:

    curl -fLo ~/bin/signal-daemon --create-dirs \
        https://raw.githubusercontent.com/meribold/signal-cli.bash/master/signal-daemon
    curl -fLo ~/bin/s --create-dirs \
        https://raw.githubusercontent.com/meribold/signal-cli.bash/master/s
  2. Create a configuration file with your phone number and aliases for your contacts and groups at ~/.config/signal/init.bash. It should look something like this.

    # Path to the `signal-cli` executable, if the directory is not in "$PATH".
    # signal_cli="$HOME/signal-cli-0.5.6/bin/signal-cli"
    
    user='+990123456789'
    
    # Declare as associative arrays.
    declare -A contacts groups
    
    contacts['alvin']='+119876543210'
    contacts['tom']='+2201010101010'
    
    groups['family']='aiHo/b6oCiet+ah6makoh6=='
    groups['thundermonkey']='Zi0Eng2iHao8xiejaepahK=='

About

Two Bash scripts making signal-cli convenient for interactive use

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages