Chinaunix首页 | 论坛 | 博客
  • 博客访问: 305514
  • 博文数量: 43
  • 博客积分: 2071
  • 博客等级: 大尉
  • 技术积分: 488
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-25 17:48
文章分类

全部博文(43)

文章存档

2014年(5)

2013年(4)

2011年(9)

2010年(8)

2009年(17)

我的朋友

分类: LINUX

2009-09-02 13:29:59

如何让 wmii 在开机后快速进行初始化设置

1. 创建 wmii 的初始化配置文件
比如在 /home//config 中创建 wmii-config.sh 文件
内容如下:(我的实例中是创建10个窗口,每个窗口可以初始化不同的配置)
#!/bin/sh -f
# Configure wmii

# Configuration Variables
MODKEY=Mod1
UP=k
DOWN=j
LEFT=h
RIGHT=l

# Colors tuples: " "
WMII_NORMCOLORS='#222222 #5FBF77 #2A7F3F'
WMII_FOCUSCOLORS='#ffffff #153F1F #2A7F3F'

WMII_BACKGROUND='#333333'
WMII_FONT='-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*'

set -- $(echo $WMII_NORMCOLORS $WMII_FOCUSCOLORS)
WMII_MENU="dmenu -b -fn $WMII_FONT -nf $1 -nb $2 -sf $4 -sb $5"
WMII_9MENU="wmii9menu -font $WMII_FONT -nf $1 -nb $2 -sf $4 -sb $5 -br $6"
WMII_TERM="x-terminal-emulator"

# added by amuhong
#for tag 1
echo "$WMII_FOCUSCOLORS" "1" | wmiir create "/lbar/1"
wmiir xwrite /ctl view "1"
x-terminal-emulator &
firefox &
sleep 1

#for tag 2
echo "$WMII_FOCUSCOLORS" "2" | wmiir create "/lbar/2"
wmiir xwrite /ctl view "2"
x-terminal-emulator &
#mountudisk
#you can add your configuration
sleep 1

#for tag 3
echo "$WMII_FOCUSCOLORS" "3" | wmiir create "/lbar/3"
wmiir xwrite /ctl view "3"
x-terminal-emulator &
sleep 1

#for tag 4
echo "$WMII_FOCUSCOLORS" "4" | wmiir create "/lbar/4"
wmiir xwrite /ctl view "4"
x-terminal-emulator &
sleep 1

#for tag 5
cd /usr/src/borqs/linux/
echo "$WMII_FOCUSCOLORS" "5" | wmiir create "/lbar/5"
wmiir xwrite /ctl view "5"
x-terminal-emulator &
sleep 1

#for tag 6
cd /usr/src/borqs/device
echo "$WMII_FOCUSCOLORS" "6" | wmiir create "/lbar/6"
wmiir xwrite /ctl view "6"
x-terminal-emulator &
sleep 1

#for tag 7
cd /usr/src/borqs/device
echo "$WMII_FOCUSCOLORS" "7" | wmiir create "/lbar/7"
wmiir xwrite /ctl view "7"
x-terminal-emulator &
sleep 1

#for tag 8
cd /home/derek
echo "$WMII_FOCUSCOLORS" "8" | wmiir create "/lbar/8"
wmiir xwrite /ctl view "8"
x-terminal-emulator &
sleep 1

#for tag 9
cd /home/derek
echo "$WMII_FOCUSCOLORS" "9" | wmiir create "/lbar/9"
wmiir xwrite /ctl view "9"
x-terminal-emulator &
sleep 1

#for tag 0
cd /home/derek
echo "$WMII_FOCUSCOLORS" "0" | wmiir create "/lbar/0"
wmiir xwrite /ctl view "0"
x-terminal-emulator &
sleep 1

2. 修改 /home//.bashrc
在该配置文件中加入如下信息
alias wmiiconf='sh /home//config/wmii-config.sh'
然后重启shell来使能上面的修改

3. 使用
开机后进入wmii界面,首先通过 alt+enter 打开第一个shell,然后输入命令
wmiiconf
就会快速产生10个shell对应到数字的0~9的十个tags

阅读(920) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~