aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-05-20 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-05-20 20:20:20 +0200
commit4a8a933b4bdff4c8b7dda02dbb9faeb7a121ea93 (patch)
tree29ed2c917ab4fc8b09a167de91ed652a3e9c6bde
parenteven better (diff)
downloadhardflip-master.tar.gz
hardflip-master.tar.bz2
hardflip-master.tar.xz
hardflip-master.tar.zst
hardflip-master.zip
-rw-r--r--Makefile19
-rw-r--r--README.md19
-rw-r--r--ROADMAP.md6
-rw-r--r--man/hf.180
-rw-r--r--screens/screen1.pngbin0 -> 1433987 bytes
-rw-r--r--src/c_defs.go4
-rw-r--r--src/c_utils.go2
7 files changed, 114 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 586dda7..1290b1d 100644
--- a/Makefile
+++ b/Makefile
@@ -20,26 +20,31 @@ TARGET := hf
SHELL := /bin/sh
SRC_DIR := ./src/
SRC_NAME := *.go
-CONF_DIR := ./src/
+MAN_DIR := ./man/
SRC := $(addprefix ${SRC_DIR}, ${SRC_NAME})
DEST := /usr
.DEFAULT_GOAL := ${TARGET}
run: ${SRC}
- go run ${SRC_DIR} -qwe
+ go run ${SRC_DIR}
${TARGET}: ${SRC}
go build -o ${TARGET} ${SRC_DIR}
install:
mkdir -p ${DEST}/bin
- cp -f ${TARGET} ${DEST}/bin
- # man shit
- # mkdir -p $(DESTDIR)/share/man/man1
- # cp -f man/lowbat.1 $(DESTDIR)/share/man/man1/lowbat.1
+ cp -f ${TARGET} ${DEST}/bin/hf
+ mkdir -p ${DEST}/share/man/man1
+ gzip ${MAN_DIR}/hf.1
+ cp -f man/hf.1.gz ${DEST}/share/man/man1/hf.1.gz
+ gzip -d ${MAN_DIR}/hf.1.gz
+
+uninstall:
+ rm -f ${DEST}/bin/hf
+ rm -f ${DEST}/share/man/man1/hf.1.gz
clean:
go clean
rm -f ${TARGET}
-.PHONY: hf run clean
+.PHONY: hf run clean install uninstall
diff --git a/README.md b/README.md
index e4c67be..1c9a3fa 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,8 @@
The best TUI tool to connect to your distant hosts. For Linux/BSD. Might work
on macOS.
+![](screens/screen1.png)
+
## Dependencies
Install those if you need them:
@@ -10,8 +12,9 @@ Install those if you need them:
+ `sshpass` if you are using passwords with SSH (honnestly use keys instead)
+ `xfreerdp` for RDP. Also called `freerdp2-x11` on some distros
+ `openstack` for OpenStack CLI
-+ `gpg` to crypt passwords. You can store them in plain text if you prefer but
-I wouldn't recommend that option
++ `gpg` to crypt passwords, similarily to
+[pass](https://www.passwordstore.org/). You can store them in plain text if you
+prefer but I wouldn't recommend that option
+ `go`
+ GNU `make`
@@ -44,6 +47,16 @@ DEST := /usr/local
will install bin and man in the `/usr/local/bin` `/usr/local/share/man/...` dirs
BSD style.
+## Uninstall
+
+To uninstall `hardflip`, run the following command:
+
+```sh
+sudo make uninstall
+```
+
+But why would you?
+
## Config
Configuration files will be stored in your `$XDG_CONFIG_HOME/hf` directory which
@@ -71,7 +84,7 @@ right of the window
new instance of your set terminal. It was intended to open the connection
in a new terminal in the background, allowing you to still be using the same
`hf` while connected to one or several of your hosts. Turns out I can't code
-that it doesn't work at all, just leave that unset
+that, it doesn't work at all, just leave that unset
+ `default_ssh_priv`: (`string`) default SSH private key path. It will be
entered by default when adding a new SSH host or jump, saving a ton of time.
Of course it can be changed when adding the host. Leave empty if you don't have
diff --git a/ROADMAP.md b/ROADMAP.md
index dc60218..ff2fab8 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -51,9 +51,9 @@
## v1.0 - wheelbite
-- [ ] README.md
-- [ ] man
-- [ ] cli options
+- [x] README.md
+- [x] man
+- [x] cli options
## v1.1 - 360 hard
diff --git a/man/hf.1 b/man/hf.1
new file mode 100644
index 0000000..8760e4f
--- /dev/null
+++ b/man/hf.1
@@ -0,0 +1,80 @@
+.\" Manpage for hf
+.\" Contact rbo@gmx.us to correct errors and typos.
+.TH hf 1 "20 May 2024" "hf 1.0" "hardflip Reference"
+.SH NAME
+hf \- super fast remote connection manager
+.SH SYNOPSYS
+.B hf
+[\fIOPTION\fR]
+.SH DESCRIPTION
+\fBhf\fR is a TUI program allowing you to keep track of your various
+SSH/RDP/OpenStack hosts.
+.
+Passwords are stored using \fBGnuPG\fR keys or plaintext (depending on your
+setup).
+.SH OPTIONS
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Prints the help
+.TP
+\fB\-v\fR, \fB\-\-version\fR
+Prints the program version
+.SH CONFIGURATION
+.BR hf
+stores its configuration files in the
+.I $XDG_CONFIG_HOME/hf/config.yml
+file. If this variable is unset, it will store it at
+.IR $HOME/.config/hf/config.yml .
+.
+This is the main options files. You can reload the options on-the-go with
+.BR Ctrl+r .
+Here are some options:
+.
+.TP
+.BR icons :
+.I bool
+shows or not icons
+.TP
+.BR loop :
+.I bool
+the program will run again after exiting the host you connected to
+.TP
+.BR gpg :
+.I string
+the gpg key ID you set at first boot. It is used to encrypt passwords. If set
+to **"plain"**, passwords will be stored in plaintext. I don't recommend this
+at all but you might not care
+.TP
+.BR percent :
+.I bool
+shows percent of hosts the cursor is on in the bottom right of the window
+.TP
+.BR terminal :
+.I string
+will spawn the command to connect to your host in a new instance of your set
+terminal. It was intended to open the connection in a new terminal in the
+background, allowing you to still be using the same
+.B hf
+while connected to one or several of your hosts. Turns out I can't code that, it
+doesn't work at all, just leave that unset
+.TP
+.BR default_ssh_priv :
+.I string
+default SSH private key path. It will be entered by default when adding a new
+SSH host or jump, saving a ton of time. Of course it can be changed when adding
+the host. Leave empty if you don't have a main key
+.SH BUGS
+Please note that
+.B hardflip
+was tested only on Linux and FreeBSD at the moment. This is probably full of
+bugs, so please report any bug to me,
+.IR "Joe <rbo@gmx.us>"
+or on GitHub at
+.IR https://github.com/JozanLeClerc/hardflip .
+.SH AUTHOR
+Joe <rbo@gmx.us>
+.SH SEE ALSO
+.IR ssh (1),
+.IR xfreerdpd (1),
+.IR gpg (1),
+.IR remmina (1)
diff --git a/screens/screen1.png b/screens/screen1.png
new file mode 100644
index 0000000..aacc9cf
--- /dev/null
+++ b/screens/screen1.png
Binary files differ
diff --git a/src/c_defs.go b/src/c_defs.go
index 3d60bfb..ea3de6f 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -56,8 +56,8 @@ const (
STYLE_FILE_NAME = "colors.yml"
CONF_DIR_NAME = "hf"
DATA_DIR_NAME = "hf"
- VERSION = "v0.8"
- VERSION_NAME = "pre-release"
+ VERSION = "v1.0"
+ VERSION_NAME = "wheelbite"
)
const (
diff --git a/src/c_utils.go b/src/c_utils.go
index 8c79ed3..3ea4ee8 100644
--- a/src/c_utils.go
+++ b/src/c_utils.go
@@ -246,7 +246,7 @@ func c_print_help() {
hf [options]
Options:
- -h, --help Prints this help menu
+ -h, --help Prints this help
-v, --version Prints the version number and name
Report bugs to <rbo@gmx.us>`)