Homeinit: Purged old files.
gtkrc: removed include + comments. homeinit: minor fix. Shell: new netspeed function + various fixes.master
parent
e0197091e3
commit
07dc71be88
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
[ -d /usr/share/awesome/themes/default ] && cp -rn "/usr/share/awesome/themes/default/" "${HOME}/.config/awesome/themes/custom"
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p "$XDG_DATA_HOME/luakit"
|
||||
wget 'https://easylist-downloads.adblockplus.org/easylist.txt' -O "$XDG_DATA_HOME/luakit/easylist.txt"
|
|
@ -1,5 +1,4 @@
|
|||
# DO NOT EDIT! This file will be overwritten by LXAppearance.
|
||||
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
||||
## Deps: clearlooks, nuoveXT2, vanilla-dmz-aa
|
||||
|
||||
gtk-theme-name="Clearlooks"
|
||||
gtk-icon-theme-name="nuoveXT2"
|
||||
|
@ -17,4 +16,3 @@ gtk-xft-hinting=1
|
|||
gtk-xft-hintstyle="hintfull"
|
||||
gtk-xft-rgba="rgb"
|
||||
gtk-color-scheme="tooltip_fg_color:#000000\nbase_color:#ffffff\nselected_fg_color:#ffffff\ntext_color:#1A1A1A\nbg_color:#EDECEB\ntooltip_bg_color:#F5F5B5\nselected_bg_color:#000033336666\nfg_color:#000000\n"
|
||||
include "/home/peter/.gtkrc-2.0.mine"
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
## 2012-04-28
|
||||
################################################################################
|
||||
|
||||
## TODO: when sure, delete previous scripts.
|
||||
|
||||
## Fetch from Git repo:
|
||||
# cd
|
||||
# git init
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
_pacman_set_vars()
|
||||
{
|
||||
local pacman_var_list="$(pacman -Qi tzdata | cut -f1 -d':')"
|
||||
if [ "$pacman_var_list" = "" ];then
|
||||
if [ -z "$pacman_var_list" ];then
|
||||
echo "Could not get pacman's variables."
|
||||
return 2
|
||||
fi
|
||||
|
|
|
@ -103,6 +103,31 @@ if [ -e "/usr/bin/nmap" ]; then
|
|||
}
|
||||
fi
|
||||
|
||||
netspeed ()
|
||||
{
|
||||
local INTERFACE="eth0"
|
||||
if [ -n "$1" ]; then
|
||||
INTERFACE="$1"
|
||||
fi
|
||||
|
||||
if [ ! -d "/sys/class/net/${INTERFACE}" ]; then
|
||||
echo "Error: no such interface (${INTERFACE})"
|
||||
return
|
||||
fi
|
||||
|
||||
local RX_BEFORE=$(cat /sys/class/net/${INTERFACE}/statistics/rx_bytes)
|
||||
local TX_BEFORE=$(cat /sys/class/net/${INTERFACE}/statistics/tx_bytes)
|
||||
sleep 1
|
||||
local RX_AFTER=$(cat /sys/class/net/${INTERFACE}/statistics/rx_bytes)
|
||||
local TX_AFTER=$(cat /sys/class/net/${INTERFACE}/statistics/tx_bytes)
|
||||
|
||||
local RX_RESULT=$(((${RX_AFTER:-0}-${RX_BEFORE:-0})/1024))
|
||||
local TX_RESULT=$(((${TX_AFTER:-0}-${TX_BEFORE:-0})/1024))
|
||||
|
||||
echo "RX $RX_RESULT KiB/s"
|
||||
echo "TX $TX_RESULT KiB/s"
|
||||
}
|
||||
|
||||
## Vim-only: search the vim reference manual for a keyword.
|
||||
## Usage: :h <keyword>
|
||||
if [ -e "/usr/bin/vim" ]; then
|
||||
|
@ -201,7 +226,7 @@ blind-append()
|
|||
read -s DUMMY
|
||||
echo ""
|
||||
|
||||
if [ ! -e "$FILE" ] || [ "$STRING" = "" ]; then
|
||||
if [ ! -e "$FILE" ] || [ -z "$STRING" ]; then
|
||||
echo "$DUMMY" >> "$FILE"
|
||||
echo "Secret appended to ${FILE} at the end."
|
||||
return
|
||||
|
@ -298,7 +323,7 @@ if [ -f "/usr/bin/highlight" ] ; then
|
|||
echo "******************** $i ********************"
|
||||
highlight -S c -O xterm256 <(echo $SAMPLE) -s "$i"
|
||||
read -s DUMMY
|
||||
if [ ! "$DUMMY" = "" ];then
|
||||
if [ -n "$DUMMY" ]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -51,10 +51,10 @@ export TIME_STYLE=+"|%Y-%m-%d %H:%M:%S|"
|
|||
|
||||
## Default text editor
|
||||
EDITOR=nano
|
||||
if [ "" != "$(command -v vim)" ]; then
|
||||
if [ -n "$(command -v vim)" ]; then
|
||||
EDITOR=vim
|
||||
fi
|
||||
if [ "" != "$(command -v emacs)" ]; then
|
||||
if [ -n "$(command -v emacs)" ]; then
|
||||
#EDITOR=emacs
|
||||
EDITOR='emacsclient -a "" -t'
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue