mirror of
https://github.com/balkian/balkian.github.com.git
synced 2025-08-23 20:22:20 +00:00
add surface go
This commit is contained in:
@@ -12,7 +12,7 @@ tags:
|
||||
|
||||
Add this to your /etc/lightdm/lightdm.conf file:
|
||||
|
||||
```
|
||||
```cfg
|
||||
[LightDM]
|
||||
logind-check-graphical=true
|
||||
```
|
||||
@@ -25,7 +25,8 @@ In addition to editing a single line (which you can also do with `C-x C-e`), it
|
||||
You use it like this:
|
||||
|
||||
List previous commands
|
||||
```
|
||||
|
||||
```shell
|
||||
$ fc -l
|
||||
10259 nvim deploy.sh
|
||||
10260* cd ..
|
||||
@@ -35,7 +36,7 @@ $ fc -l
|
||||
|
||||
List commands with date (in zsh)
|
||||
|
||||
```
|
||||
```shell
|
||||
$ fc -ld
|
||||
10260* 19:38 cd ..
|
||||
10261* 19:38 nvim content/cheatsheet/linux.md
|
||||
@@ -45,7 +46,7 @@ $ fc -ld
|
||||
|
||||
You can add the date too:
|
||||
|
||||
```
|
||||
```shell
|
||||
$ fc -fld
|
||||
10262 1/10/2019 19:40 cd
|
||||
10263 1/10/2019 19:40 fc -l
|
||||
@@ -54,17 +55,37 @@ $ fc -fld
|
||||
|
||||
You can edit a range of commands
|
||||
|
||||
```
|
||||
```shell
|
||||
$ fc 10262 10264
|
||||
```
|
||||
|
||||
|
||||
The range can be relative to the current position, so the previous command is equivalent to:
|
||||
|
||||
```
|
||||
```shell
|
||||
$ fc -3 -1
|
||||
```
|
||||
|
||||
If you save and exit, all commands are executed as a script, and it will be added to your history.
|
||||
|
||||
Source: https://shapeshed.com/unix-fc/
|
||||
|
||||
# Prevent logoff from killing tmux sessions
|
||||
|
||||
Lately I've noticed that logging out of i3, intentionally or when i3 fails, would also kill any tmux or emacs sessions.
|
||||
This is extremely annoying.
|
||||
|
||||
This is caused by a new default in logind (systemd's login) to kill user process on logoff.
|
||||
You can revert this setting in your logind.conf (`/etc/systemd/logind.conf`):
|
||||
|
||||
```cfg
|
||||
KillUserProcesses=no
|
||||
```
|
||||
|
||||
Or only for a specific process (e.g., tmux):
|
||||
|
||||
```shell
|
||||
systemd-run --scope --user tmux
|
||||
```
|
||||
|
||||
Source: https://unix.stackexchange.com/questions/490267/prevent-logoff-from-killing-tmux-session
|
||||
|
@@ -17,5 +17,3 @@ From tqdm's github repository:
|
||||
|
||||
|
||||

|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user