| Crates.io | xmobet |
| lib.rs | xmobet |
| version | 0.1.3 |
| created_at | 2023-02-12 14:14:31.013068+00 |
| updated_at | 2023-03-07 16:15:09.411246+00 |
| description | Slot machine for xmobar |
| homepage | |
| repository | https://github.com/impossibletea/xmobet |
| max_upload_size | |
| id | 783171 |
| size | 19,411 |
Slot machine simulator designed for use in menubars. Originally intended for
xmobar, hence the name.
cargo install xmobet
Or like everything else with git:
git clone https://github.com/impossibletea/xmobet.git
cd xmobet
cargo install --path .
Xmobar:
Config
{ template = "}<action=`killall -SIGCONT xmobet` button=1><action=`killall -SIGUSR1 xmobet` button=4><action=`killall -SIGUSR2 xmobet` button=5><action=`killall -SIGINT xmobet` button=3>%xmobet%</action></action></action></action>{"
, commands =
[ Run CommandReader "~/.cargo/bin/xmobet" "xmobet"
]
}
For other bars you'll have to figure it out yourself.
Since it is made for bars rather than stdin, it makes use of signals.
SIGCONT: Roll the slots, get money for combinations.
SIGUSR{1,2}: Increase or decrease bet.
SIGINT: Show current balance.
Default config on linux is ~/.config/xmobet/config.toml. Structure (with
default values) is as follows:
drums = 5
symbols = '7JQKA'
init_balance = 100
init_bet = 5
bet_inc = 1