Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
- Fixed makefile targets
- Added format example to readme
- Updated version
- Added known users section
  • Loading branch information
myr committed Jul 7, 2024
1 parent 01446d3 commit 412148b
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.PHONY: install uninstall clean

PREFIX=${HOME}/.local

build:
sysmon: main.go go.sum go.mod
go build .

install: build
install: sysmon
mkdir -p ${PREFIX}/bin
install -m755 sysmon ${PREFIX}/bin/sysmon

uninstall:
rm -f ${PREFIX}/bin/sysmon

clean:
rm sysmon
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,27 @@ Emoji can also be used by pasting it directly on the format string, e.g.:
`$CPU% | $MEM% $SWAP% | $BRI% | $BAT%$CHAR | $TIME`


## Dependencies

- Go
- Make


## Installation

To have it installed in your GOPATH run `go install github.com/blmayer/sysmon@latest`, or
run `make install`, the default installation directory is `~/local/bin` and it can be changed
You can download and install the latest version directly using go with:

```
go install github.com/blmayer/sysmon@latest
```

Make sure your `GOPATH` is correctly set. Another option is to run

```
make install
```

The default installation directory is `~/local/bin` and it can be changed
setting the `PREFIX` variable, e.g.: `PREFIX=~/.bin make install`.


Expand All @@ -23,6 +40,18 @@ setting the `PREFIX` variable, e.g.: `PREFIX=~/.bin make install`.
Add `sysmon &` to your *.xinitrc* file, default configuration
is safe. The see all options that can be passed run `sysmon -h`.

If you are not using other status monitors you can try your configurations
running `sysmon` in a terminal.


### Changing the format

To change the output of sysmon use the `-F` flag, and pass the format string
as argument, use single quotes to prevent your shell messing up the string.
For example, just memory, CPU and date:

`sysmon -F 'MEM $MEM% | CPU $CPU% | $TIME'`


### Defaults

Expand Down Expand Up @@ -63,6 +92,11 @@ or the display name.
- [ ] Wayland support (maybe another project)


## Known users

- Erik Dubois from [Arco Linux](https://arcolinux.info): [video](https://youtu.be/8SeCAXymXgw)


## Meta

License: MIT
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/jezek/xgb/xproto"
)

const help = `sysmon v1.1.0 A SYStem MONitor for your system bar, designed for DWM.
const help = `sysmon v1.1.1 A SYStem MONitor for your system bar, designed for DWM.
Usage:
sysmon [OPTIONS]
Expand Down Expand Up @@ -47,7 +47,7 @@ Available options:
--format define output format, each module is defined
using $CPU, $MEM, $SWAP, $BAT, $NET, $BRI, $TIME,
$WTR or $CHAR. Default:
"NET I/O $NIN $NOUT | CPU $CPU% | MEM $MEM% | SWAP $SWAP% | $TIME"
'NET I/O $NIN $NOUT | CPU $CPU% | MEM $MEM% | SWAP $SWAP% | $TIME'
-T
--time-format set time format, default "2006-01-02 15:04:05", any
format can be passed using go's time format string
Expand All @@ -60,7 +60,7 @@ All default values
Uses 10 seconds of interval for swap
License:
MIT Copyright (c) 2022-23 Brian Mayer
MIT Copyright (c) 2022-24 Brian Mayer
Report bugs to: bleemayer@gmail.com
Or open an issue at https://github.com/blmayer/sysmon`
Expand Down

0 comments on commit 412148b

Please sign in to comment.