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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134 | --- LaptopLocation/Actions rto 2010-11-03 21:04:46.425356
+++ LaptopLocation/Actions rto 2009-02-01 20:47:00.229862
@@ -1,9 +1,10 @@
+
Actions
==
Actions can be taken given a particular location, the format is the same as all configuration files in laptop-location:
- #!ini
+ #!inf
[Home]
# Some actions to be performed
@@ -19,7 +20,7 @@
Append a line of text to a file, e.g.:
- #!ini
+ #!inf
append /etc/apt/apt.conf.d/90proxy Acquire::http::Proxy "http://wwwproxy.cs.aau.dk:3128";
@@ -31,7 +32,7 @@
Comments can both be stated as comment and as the ubiquitous #-mark:
- #!ini
+ #!inf
comment This is a comment
# This is also a comment
@@ -44,7 +45,7 @@
Copy a file from one location to another, e.g.:
- #!ini
+ #!inf
copy file_from file_to
@@ -60,13 +61,13 @@
To use the proxy action, use something like the following:
- #!ini
+ #!inf
proxy wwwproxy.cs.aau.dk:3128
To allow for locations without a proxy server, the action can also be called without parameters:
- #!ini
+ #!inf
proxy
@@ -76,7 +77,7 @@
Removes the file given as the only parameter:
- #!ini
+ #!inf
remove ~/stupid_useless_file
@@ -90,7 +91,7 @@
I use it to change the X11 configuration of my laptop, at home i have an secondary LCD display for my laptop that i would like to use with xinerama:
- #!ini
+ #!inf
# Create a symlink for the correct X11 configuration, at home i have a
# secondary LCD screen, and i would like to use that with Xinerama when home.
[Home]
@@ -106,7 +107,7 @@
Run any system command, run in another shell, or more specifically using the system call system:
- #!ini
+ #!inf
system echo "The current location is here!" > ~/.why_not_use_etc_laptop_locations
@@ -114,9 +115,8 @@
touch
--
-"Touch" a file, that is, update it's access time and modification time:
-
- #!ini
+"Touch" a file, that is, update it's access time and modification time:
+ #!inf
touch ~/some_file
@@ -132,13 +132,13 @@
The environment values are set in a script called ~/.laptop-location/${HOSTNAME}-sh so to get the environment variables set in your shell you could add something like the following to your, e.g. ~/.bashrc:
- #!ini
+ #!inf
source ~/.laptop-location/${HOSTNAME}-sh
The env construct looks like this:
- #!ini
+ #!inf
env HTTP_PROXY http://wwwproxy.cs.aau.dk:3128/
@@ -148,7 +148,7 @@
Sets a given gconf key to a given value, if the value is already set in gconf the value given will be converted to the same gconf value as the old gconf value.
- #!ini
+ #!inf
# At home i have direct connection to the internet
[Home]
gconf /system/http_proxy/use_http_proxy 0
|