mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -07:00
initial checkin of screen-profiles
This commit is contained in:
commit
6f114df63e
19 changed files with 337 additions and 0 deletions
2
README
Normal file
2
README
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
For more information about this package, please see:
|
||||||
|
* https://launchpad.net/screen-profiles
|
3
bin/cpu-freq
Executable file
3
bin/cpu-freq
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
grep -m 1 "^cpu MHz" /proc/cpuinfo | sed "s/^.*: //" | sed "s/\..*$/ MHz/"
|
5
bin/reboot-required
Executable file
5
bin/reboot-required
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -e /var/run/reboot-required ]; then
|
||||||
|
echo "(@)"
|
||||||
|
fi
|
3
bin/release
Executable file
3
bin/release
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
/usr/bin/lsb_release -d -s
|
3
bin/updates-available
Executable file
3
bin/updates-available
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
/usr/lib/update-notifier/apt-check 2>&1 | tail -n 1 | sed "s/;.*$/\!/"
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
screen-profiles (1.0) jaunty; urgency=low
|
||||||
|
|
||||||
|
* Initial upload
|
||||||
|
|
||||||
|
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 14 Dec 2008 13:12:12 -0600
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
6
|
20
debian/control
vendored
Normal file
20
debian/control
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
Source: screen-profiles
|
||||||
|
Section: misc
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Dustin Kirkland <kirkland@ubuntu.com>
|
||||||
|
Standards-Version: 3.8.0
|
||||||
|
Build-Depends: debhelper (>= 6.0)
|
||||||
|
Homepage: http://launchpad.net/screen-profiles
|
||||||
|
Vcs-Bzr: http://bazaar.launchpad.net/~kirkland/screen-profiles/main
|
||||||
|
|
||||||
|
Package: screen-profiles
|
||||||
|
Architecture: all
|
||||||
|
Depends: debconf (>= 0.5) | debconf-2.0, screen
|
||||||
|
Description: a set of useful profiles and a profile-switcher for GNU screen
|
||||||
|
screen-profiles includes a set of profiles for the GNU screen window manager.
|
||||||
|
These profiles are quite useful on server machines which are not running
|
||||||
|
a graphical desktop. The 'screen' command provides a number of advanced
|
||||||
|
features are not necessarily exposed in the default profile. These profiles
|
||||||
|
provide features such as status bars, clocks, notifiers (reboot-required,
|
||||||
|
updates-available), etc. The profile-switcher allows users to quickly switch
|
||||||
|
their .screenrc to any of the available profiles.
|
35
debian/copyright
vendored
Normal file
35
debian/copyright
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
This package was debianized by Dustin Kirkland <dustin.kirkland@gmail.com>
|
||||||
|
Sun, 14 Dec 2008 13:11:37 -0600
|
||||||
|
|
||||||
|
It was downloaded from: http://launchpad.net/screen-profiles
|
||||||
|
|
||||||
|
Upstream Authors: Dustin Kirkland <dustin.kirkland@gmail.com>
|
||||||
|
|
||||||
|
Copyright:
|
||||||
|
Copyright (C) 2002-2008 Dustin Kirkland <dustin.kirkland@gmail.com>
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
License:
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation version 3 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
On Debian systems, the complete text of the GNU General Public
|
||||||
|
License, version 3, can be found in /usr/share/common-licenses/GPL-3.
|
||||||
|
|
||||||
|
The icons are licensed under the Creative Commons Attribution 2.5 license,
|
||||||
|
<http://creativecommons.org/licenses/by/2.5/>. In accordance with CCA2.5,
|
||||||
|
the icons are available at <http://www.famfamfam.com/lab/icons/silk/>.
|
||||||
|
|
||||||
|
The Ubuntu packaging:
|
||||||
|
Copyright (C) 2008 by Dustin Kirkland <dustin.kirkland@gmail.com>
|
||||||
|
released under the GPL-3.
|
4
debian/dirs
vendored
Normal file
4
debian/dirs
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
usr/bin
|
||||||
|
usr/share/screen-profiles
|
||||||
|
usr/share/screen-profiles/bin
|
||||||
|
usr/share/screen-profiles/profiles
|
1
debian/docs
vendored
Normal file
1
debian/docs
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
README
|
9
debian/install
vendored
Normal file
9
debian/install
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
bin/cpu-freq usr/share/screen-profiles/bin
|
||||||
|
bin/reboot-required usr/share/screen-profiles/bin
|
||||||
|
bin/release usr/share/screen-profiles/bin
|
||||||
|
bin/updates-available usr/share/screen-profiles/bin
|
||||||
|
profiles/debian.screenrc usr/share/screen-profiles/profiles
|
||||||
|
profiles/fedora.screenrc usr/share/screen-profiles/profiles
|
||||||
|
profiles/redhat.screenrc usr/share/screen-profiles/profiles
|
||||||
|
profiles/ubuntu.screenrc usr/share/screen-profiles/profiles
|
||||||
|
select-screen-profile usr/bin
|
45
debian/rules
vendored
Executable file
45
debian/rules
vendored
Executable file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
# Sample debian/rules that uses debhelper.
|
||||||
|
# GNU copyright 1997 to 1999 by Joey Hess.
|
||||||
|
#
|
||||||
|
# debian/rules makefile for musica
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
# export DH_VERBOSE=1
|
||||||
|
|
||||||
|
PACKAGE=screen-profiles
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf debian/${PACKAGE} debian/files debian/${PACKAGE}.debhelper.log
|
||||||
|
|
||||||
|
install:build
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_clean -k
|
||||||
|
dh_installdirs -X.bzr
|
||||||
|
dh_install -X.bzr
|
||||||
|
|
||||||
|
# Everything else is handled by dh_install
|
||||||
|
|
||||||
|
# Build architecture-independent files here.
|
||||||
|
binary-indep: build install
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_installdocs -X.bzr
|
||||||
|
dh_installman select-screen-profile.1
|
||||||
|
dh_installchangelogs README
|
||||||
|
dh_installdebconf
|
||||||
|
dh_compress
|
||||||
|
dh_fixperms
|
||||||
|
dh_link /etc/screenrc usr/share/${PACKAGE}/profiles/default.screenrc
|
||||||
|
dh_installdeb
|
||||||
|
dh_gencontrol
|
||||||
|
dh_builddeb
|
||||||
|
|
||||||
|
binary: binary-indep
|
||||||
|
.PHONY: build clean binary-indep binary install
|
||||||
|
|
||||||
|
binary-arch:
|
34
profiles/debian.screenrc
Normal file
34
profiles/debian.screenrc
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
###############################################################################
|
||||||
|
# GNU Screen Profile for Debian
|
||||||
|
# This configuration profile is intended to roughly approximate a Debian
|
||||||
|
# Desktop within 'screen'.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2008 Dustin Kirkland <kirkland@canonical.com>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
startup_message off
|
||||||
|
msgwait 1
|
||||||
|
|
||||||
|
backtick 100 3600 3600 /usr/share/screen-profiles/bin/release
|
||||||
|
backtick 101 3600 3600 /usr/share/screen-profiles/bin/updates-available
|
||||||
|
backtick 102 10 10 /usr/share/screen-profiles/bin/reboot-required
|
||||||
|
backtick 103 5 5 /usr/share/screen-profiles/bin/cpu-freq
|
||||||
|
|
||||||
|
hardstatus alwayslastline
|
||||||
|
caption always '%{= Wk}%{= Wk}%?%-Lw%?%{= yk}%n %t%{= Wk} %?%+Lw%?%?%= %{= Wk}'
|
||||||
|
hardstatus string '%{= wk} %{+b Wr} @ %{+b wk} %100` %{= Wk}|%= |%{+B bW}%102`%{= Wk}|%{+b rW}%101`%{= Wk}|%{+b gW}%103`%{= Wk}|%{= wb}%Y-%m-%d %c:%s%{k}'
|
||||||
|
|
||||||
|
# Keybindings
|
32
profiles/fedora.screenrc
Normal file
32
profiles/fedora.screenrc
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
###############################################################################
|
||||||
|
# GNU Screen Profile for Debian
|
||||||
|
# This configuration profile is intended to roughly approximate a Fedora
|
||||||
|
# Desktop within 'screen'.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2008 Dustin Kirkland <kirkland@canonical.com>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
startup_message off
|
||||||
|
msgwait 1
|
||||||
|
|
||||||
|
backtick 100 3600 3600 /usr/share/screen-profiles/bin/release
|
||||||
|
backtick 103 5 5 /usr/share/screen-profiles/bin/cpu-freq
|
||||||
|
|
||||||
|
hardstatus alwayslastline
|
||||||
|
caption always '%{= Wk}%{= Wk}%?%-Lw%?%{= yk}%n %t%{= Wk} %?%+Lw%?%?%= %{= Wk}'
|
||||||
|
hardstatus string '%{= wk} %{+b Bw} f %{+b wk} %100` %{= Wk}|%= |%{+b gW}%103`%{= Wk}|%{= wb}%Y-%m-%d %c:%s%{k}'
|
||||||
|
|
||||||
|
# Keybindings
|
32
profiles/redhat.screenrc
Normal file
32
profiles/redhat.screenrc
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
###############################################################################
|
||||||
|
# GNU Screen Profile for Debian
|
||||||
|
# This configuration profile is intended to roughly approximate a Red Hat
|
||||||
|
# Desktop within 'screen'.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2008 Dustin Kirkland <kirkland@canonical.com>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
startup_message off
|
||||||
|
msgwait 1
|
||||||
|
|
||||||
|
backtick 100 3600 3600 /usr/share/screen-profiles/bin/release
|
||||||
|
backtick 103 5 5 /usr/share/screen-profiles/bin/cpu-freq
|
||||||
|
|
||||||
|
hardstatus alwayslastline
|
||||||
|
caption always '%{= Wk}%{= Wk}%?%-Lw%?%{= yk}%n %t%{= Wk} %?%+Lw%?%?%= %{= Wk}'
|
||||||
|
hardstatus string '%{= wk} %{+b RK} RH %{+b wk} %100` %{= Wk}|%= |%{+b gW}%103`%{= Wk}|%{= wb}%Y-%m-%d %c:%s%{k}'
|
||||||
|
|
||||||
|
# Keybindings
|
34
profiles/ubuntu.screenrc
Normal file
34
profiles/ubuntu.screenrc
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
###############################################################################
|
||||||
|
# GNU Screen Profile for the Ubuntu Server
|
||||||
|
# This configuration profile is intended to roughly approximate the Ubuntu
|
||||||
|
# Gnome Desktop within 'screen'.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2008 Dustin Kirkland <kirkland@canonical.com>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
startup_message off
|
||||||
|
msgwait 1
|
||||||
|
|
||||||
|
backtick 100 3600 3600 /usr/share/screen-profiles/bin/release
|
||||||
|
backtick 101 3600 3600 /usr/share/screen-profiles/bin/updates-available
|
||||||
|
backtick 102 10 10 /usr/share/screen-profiles/bin/reboot-required
|
||||||
|
backtick 103 5 5 /usr/share/screen-profiles/bin/cpu-freq
|
||||||
|
|
||||||
|
hardstatus alwayslastline
|
||||||
|
caption always '%{= Wk}%{= Wk}%?%-Lw%?%{= yk}%n %t%{= Wk} %?%+Lw%?%?%= %{= Wk}'
|
||||||
|
hardstatus string '%{= wk} %{+b r}\%{= y}o%{=b Y}/%{+b wk} %100` %{= Wk}|%= |%{+B bW}%102`%{= Wk}|%{+b rW}%101`%{= Wk}|%{+b gW}%103`%{= Wk}|%{= wb}%Y-%m-%d %c:%s%{k}'
|
||||||
|
|
||||||
|
# Keybindings
|
47
select-screen-profile
Executable file
47
select-screen-profile
Executable file
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PROFILE_DIR="/usr/share/screen-profiles/profiles"
|
||||||
|
|
||||||
|
if [ -e "$HOME/.screenrc" ]; then
|
||||||
|
if [ ! -L "$HOME/.screenrc" ]; then
|
||||||
|
echo `gettext 'Error:'` $HOME/.screenrc `gettext 'exists, but is not a symlink'`
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Select a screen profile: "
|
||||||
|
i=0
|
||||||
|
profiles=$(ls $PROFILE_DIR)
|
||||||
|
for x in $profiles; do
|
||||||
|
i=$(expr $i + 1)
|
||||||
|
desc=" "
|
||||||
|
if [ $x = "ubuntu.screenrc" ]; then
|
||||||
|
desc="<---- ` gettext 'recommended'`"
|
||||||
|
simple=$i
|
||||||
|
fi
|
||||||
|
echo " $i. $x\t\t$desc"
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
selected=x
|
||||||
|
while /bin/true; do
|
||||||
|
if [ -z "$selected" -a ! -z "$simple" ]; then
|
||||||
|
selected="$simple"
|
||||||
|
elif ! test $selected -gt 0 2>/dev/null; then
|
||||||
|
read -p "`gettext 'Choose'` 1-$i [$simple]: " -r selected
|
||||||
|
elif ! test $selected -le $i 2>/dev/null; then
|
||||||
|
read -p "`gettext 'Choose'` 1-$i [$simple]: " -r selected
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
i=0
|
||||||
|
for x in $profiles; do
|
||||||
|
i=`expr $i + 1`
|
||||||
|
if [ $i -eq $selected ]; then
|
||||||
|
rm -f "$HOME/.screenrc" && ln -s "$PROFILE_DIR/$x" "$HOME/.screenrc"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
22
select-screen-profile.1
Normal file
22
select-screen-profile.1
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
.TH select\-screen\-profile 1 "14 Dec 2008" screen-profiles "screen-profiles"
|
||||||
|
.SH NAME
|
||||||
|
select\-screen\-profile \- Screen Profile Selector
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
\fBselect\-screen\-profile\fP is an application lists the available screen profiles on a system and prompts the user to select one.
|
||||||
|
|
||||||
|
The selected profile will be symbolically linked into the current user's ~/.screenrc file, if that file does not yet exist, or is currently a symbolic link.
|
||||||
|
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.PD 0
|
||||||
|
.TP
|
||||||
|
\fBscreen\fP(1)
|
||||||
|
|
||||||
|
.TP
|
||||||
|
\fIhttp://launchpad.net/screen-profiles\fP
|
||||||
|
.PD
|
||||||
|
|
||||||
|
.SH AUTHOR
|
||||||
|
This manpage and the \fBselect\-screen\-profile\fP utility was written by Dustin Kirkland <kirkland@canonical.com> for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation.
|
||||||
|
|
||||||
|
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
|
Loading…
Add table
Add a link
Reference in a new issue