From e88941b007a2e99d993b0d820fa030b85dc73f50 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Tue, 2 Sep 2025 00:19:25 +0000 Subject: [PATCH] Update cheatsheets --- tldr/history | 2 +- tldr/linux/systemctl-restart | 18 ++++++++++++++++++ tldr/swaymsg | 30 ++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 tldr/linux/systemctl-restart create mode 100644 tldr/swaymsg diff --git a/tldr/history b/tldr/history index 63d68e17..ccc22985 100644 --- a/tldr/history +++ b/tldr/history @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Display the last 20 commands (in Zsh it displays all commands starting from the 20th): -`history {{20}}` +`history 20` - Display history with timestamps in different formats (only available in Zsh): diff --git a/tldr/linux/systemctl-restart b/tldr/linux/systemctl-restart new file mode 100644 index 00000000..35c5f09f --- /dev/null +++ b/tldr/linux/systemctl-restart @@ -0,0 +1,18 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl restart + +> Stop and then start one or more systemd units. +> Can be used in place of `systemctl start` on a stopped unit, but `start` is safer so that a running unit isn't accidentally restarted. +> More information: . + +- Restart a unit: + +`systemctl restart {{unit}}` + +- Restart more than one unit: + +`systemctl restart {{unit1 unit2 ...}}` diff --git a/tldr/swaymsg b/tldr/swaymsg new file mode 100644 index 00000000..eccc7dd6 --- /dev/null +++ b/tldr/swaymsg @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# swaymsg + +> Send messages to a running instance of Sway using IPC. +> See for available commands. +> More information: . + +- Run a Sway command: + +`swaymsg {{command}}` + +- Display a list of workspaces: + +`swaymsg {{[-t|--type]}} get_workspaces` + +- Display a list of input devices: + +`swaymsg {{[-t|--type]}} get_inputs` + +- Display a list of output devices: + +`swaymsg {{[-t|--type]}} get_outputs` + +- Display a layout tree of all open windows, containers, outputs, and workspaces: + +`swaymsg {{[-t|--type]}} get_tree`