File: fvwm-crystal.infoline

package info (click to toggle)
fvwm-crystal 3.3.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 19,748 kB
  • ctags: 793
  • sloc: sh: 2,815; cs: 880; python: 875; makefile: 212
file content (34 lines) | stat: -rwxr-xr-x 1,009 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# fvwm-crystal.infoline
# Script used to display various information about system
# in FVWM-Crystal desktop
# ---------------------------------------------------------------------------
# Author:	Maciej Delmanowski <harnir@linux.net.pl>
# License:	GPLv2
# ---------------------------------------------------------------------------

# Here are some sample commands you can combine
# We can use only 1 line with limited length

# Uptime
uptime=`uptime | sed -e 's/.*up\ //g' -e 's/,.*//g'`

# Hostname
hostname=`hostname`

# Kernel info
kernel=`uname -sr`

# Free memory (MB)
memory_free=`free -m | grep "\-\/+" | awk '{print $4}'`

# Free swap (MB)
swap_free=`free -m | grep "Swap\:" | awk '{print $4}'`

# ---------------------------------------------------------------------------
# What will be displayed in FVWM-Crystal?
# Format: "SetEnv FVWM_INFOLINE \"[displayed text]\""

echo "SetEnv FVWM_INFOLINE \"$hostname | $kernel | Free RAM $memory_free MB, swap $swap_free MB | Uptime: $uptime\""