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

运维 系统运维
创建 wmii 的初始化配置文件,比如在 /home//config 中创建 wmii-config.sh 文件。

1. 创建 wmii 的初始化配置文件

比如在 /home//config 中创建 wmii-config.sh 文件

内容如下:(我的实例中是创建10个窗口,每个窗口可以初始化不同的配置)

#!/bin/sh -f# Configure wmii# Configuration VariablesMODKEY=Mod1UP=kDOWN=jLEFT=hRIGHT=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 1echo "$WMII_FOCUSCOLORS" "1" | wmiir create "/lbar/1"wmiir xwrite /ctl view "1"x-terminal-emulator &

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

#you can add your configurationsleep 1#for tag 3echo "$WMII_FOCUSCOLORS" "3" | wmiir create "/lbar/3"wmiir xwrite /ctl view "3"x-terminal-emulator &sleep 1#for tag 4echo "$WMII_FOCUSCOLORS" "4" | wmiir create "/lbar/4"wmiir xwrite /ctl view "4"x-terminal-emulator &sleep 1#for tag 5cd /usr/src/borqs/linux/echo "$WMII_FOCUSCOLORS" "5" | wmiir create "/lbar/5"wmiir xwrite /ctl view "5"x-terminal-emulator &sleep 1#for tag 6cd /usr/src/borqs/deviceecho "$WMII_FOCUSCOLORS" "6" | wmiir create "/lbar/6"wmiir xwrite /ctl view "6"x-terminal-emulator &sleep 1#for tag 7cd /usr/src/borqs/deviceecho "$WMII_FOCUSCOLORS" "7" | wmiir create "/lbar/7"wmiir xwrite /ctl view "7"x-terminal-emulator &sleep 1#for tag 8cd /home/derekecho "$WMII_FOCUSCOLORS" "8" | wmiir create "/lbar/8"wmiir xwrite /ctl view "8"x-terminal-emulator &sleep 1#for tag 9cd /home/derekecho "$WMII_FOCUSCOLORS" "9" | wmiir create "/lbar/9"wmiir xwrite /ctl view "9"x-terminal-emulator &sleep 1#for tag 0cd /home/derekecho "$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

【编辑推荐】

  1. Linux应用:DHCP服务器的安装和故障排除
  2. Linux下使用网站主机作为加密代理服务器
  3. Mac和Linux将面临新的漏洞攻击
责任编辑:赵宁宁 来源: 中国IT实验室
相关推荐

2010-03-11 19:25:35

Python环境

2010-06-21 10:25:09

Linux APM

2010-03-25 14:42:33

2024-01-15 06:34:09

Gin镜像容器

2009-02-13 10:33:00

交换机初始化配置

2010-02-05 17:16:05

C++构造函数

2019-11-04 13:50:36

Java数组编程语言

2022-11-15 20:48:41

Linux

2011-06-17 15:29:44

C#对象初始化器集合初始化器

2023-07-13 09:13:18

Docker容器

2010-01-04 17:28:20

交换机端口

2011-03-31 16:46:10

LinuxMySQL

2023-11-12 23:08:17

C++初始化

2009-09-02 16:52:55

C#数组初始化

2022-03-30 08:19:12

JavaGroovy

2021-01-26 09:14:19

Linux内核模块

2022-03-21 09:50:50

JavaGroovy映射Map

2010-02-24 15:41:19

Linux Light

2013-03-25 10:38:24

ASP.NETHttpModule

2023-10-06 20:57:52

C++聚合成员
点赞
收藏

51CTO技术栈公众号