Code Monkey home page Code Monkey logo

sysz's Introduction

A fzf terminal UI for systemctl

Demo

asciicast

Features

VERSION: 1.2.3

  • See and filter both system and user units simultaneously
  • Supports all units types
  • Units ordered by service, timer, socket, and the rest
  • Runs sudo automatically and only if necessary
  • History (Ctrl-p and Ctrl-n)
  • Support short versions of systemctl commands to reduce typing
  • Runs status after other commands (start, stop, restart, etc)
  • Select multiple units and commands using TAB key
  • Only prompts commands based on current state (e.g. show "start" and "restart" only if the unit is inactive)
  • Can filter units based on their state using the --state option

Requirements

  • fzf >= 0.22.0
  • bash > 4.3 (released 2009)
  • awk

Installation

Arch Linux

paru -S sysz

Using bin

bin install https://github.com/joehillen/sysz

Direct Download

wget -O ~/.bin/sysz https://github.com/joehillen/sysz/releases/latest/download/sysz
chmod +x ~/.bin/sysz

From Source

git clone https://github.com/joehillen/sysz.git
cd sysz
sudo make install # /usr/local/bin/sysz

Usage

A utility for using systemctl interactively via fzf.

Usage: sysz [OPTS...] [CMD] [-- ARGS...]

Select multiple units and commands using TAB.

sudo is invoked automatically, if necessary.

If only one unit is chosen, available commands will be presented
based on the state of the unit (e.g. start is only shows if active).

Use CTRL-v to run `systemctl cat <unit>` in the preview window.

OPTS:
  -u, --user               Only show --user units
  --sys, --system          Only show --system units
  -s STATE, --state STATE  Only show units in STATE (repeatable)
  -V, --verbose            Print the systemctl command
  -v, --version            Print the version
  -h, --help               Print this message

  If no options are given, both system and user units are shown.

CMD:
  start                  systemctl start <unit>
  stop                   systemctl stop <unit>
  r, restart             systemctl restart <unit>
  s, stat, status        systemctl status <unit>
  ed, edit               systemctl edit <unit>
  reload                 systemctl reload <unit>
  en, enable             systemctl enable <unit>
  d, dis, disable        systemctl disable <unit>

  If no command is given, one or more can be chosen interactively.

ARGS are passed to the systemctl command for each selected unit.

History:
  sysz is stored in $XDG_CACHE_HOME/sysz/history
  This can be changed with the environment variable: SYSZ_HISTORY

  Use CTRL-p and CTRL-n to navigate through history.

Examples:
  sysz -u                      User units
  sysz -sys -s active          Active system units
  sysz --user --state failed   Failed user units

Examples with commands:
  sysz start                  Start a unit
  sysz --sys s                Get the status of system units
  sysz --user edit            Edit user units
  sysz s -- -n100             Show status with 100 log lines
  sysz -sys -s active stop    Stop an active system unit
  sysz -u --state failed r    Restart failed user units

Acknowledgements

Inspired by fuzzy-sys by NullSense

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.