Merge lp:~bdfhjk/clicompanion/setupscript-2 into lp:clicompanion
- setupscript-2
- Merge into trunk
Status: | Merged |
---|---|
Merge reported by: | Marek Bardoński |
Merged at revision: | not available |
Proposed branch: | lp:~bdfhjk/clicompanion/setupscript-2 |
Merge into: | lp:clicompanion |
Diff against target: |
621 lines (+379/-176) 6 files modified
MANIFEST (+2/-1) data/clicompanion2.config (+0/-151) data/clicompanion2.config.debian (+150/-0) data/clicompanion2.config.ubuntu (+150/-0) plugins/LocalCommandList.py (+50/-1) setup.py (+27/-23) |
To merge this branch: | bzr merge lp:~bdfhjk/clicompanion/setupscript-2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Kałuża (community) | Approve | ||
David Caro | Needs Fixing | ||
Paweł | Pending | ||
Review via email: mp+104129@code.launchpad.net |
Commit message
Description of the change
- 112. By Marek Bardoński
-
Fixed according to David Caro review
- 113. By Marek Bardoński
-
merge with master
Daniel Kałuża (daniel-kaluza-dk) wrote : | # |
Hi Marek,
When it comes to me the code looks good.
As David mentioned there can be added just 2 lines to get rid off must of reloading app and extra information popup, but I think its rather optional.
- 114. By Marek Bardoński
-
Added self.emit('reload') to the cheatsheet revert pipeline
Marek Bardoński (bdfhjk) wrote : | # |
Thanks David and Daniel!
Duane Hinnen (duanedesign) wrote : | # |
Glad to see you all still keeping this alive. Several things have kept me
away lately.
You all have done great work on this. I never imagined it would look this
good from the first prototypes I made.
You all rock.
Hope to be active in community again soon. Can't wait to see you all in
iirc.
Dune hinnen
On Mar 30, 2016 4:48 AM, "Marek Bardoński" <email address hidden> wrote:
> Thanks David and Daniel!
> --
> https:/
> You are subscribed to branch lp:clicompanion.
>
Preview Diff
1 | === modified file 'MANIFEST' |
2 | --- MANIFEST 2012-01-30 00:00:40 +0000 |
3 | +++ MANIFEST 2016-03-30 09:47:08 +0000 |
4 | @@ -10,7 +10,8 @@ |
5 | clicompanionlib/utils.py |
6 | clicompanionlib/view.py |
7 | data/clicompanion.desktop |
8 | -data/clicompanion2.config |
9 | +data/clicompanion2.config.debian |
10 | +data/clicompanion2.config.ubuntu |
11 | data/clicompanion.16.png |
12 | data/clicompanion.64.png |
13 | plugins/clfu.py |
14 | |
15 | === removed file 'data/clicompanion2.config' |
16 | --- data/clicompanion2.config 2012-04-03 10:00:35 +0000 |
17 | +++ data/clicompanion2.config 1970-01-01 00:00:00 +0000 |
18 | @@ -1,151 +0,0 @@ |
19 | -dpkg -l ? package Find version of a package |
20 | -df -h File system disk space usage |
21 | -free -m Show RAM usage |
22 | -ps aux | grep ? search string Search active processes for search string |
23 | -iwconfig Display wireless network information |
24 | -ifconfig -a Displays the status of the currently active interfaces |
25 | -lsb_release -a What version of Ubuntu do I have? |
26 | -uname -a What kernel am I running |
27 | -sudo apt-get update && sudo apt-get upgrade Refresh update info and update all packages |
28 | -sudo apt-get clean Clear out all packages in /var/cache/apt/archives |
29 | -sudo apt-get autoclean Clear out obsolete packages(packages with a newer release) |
30 | -apt-cache search ? package Find information on a package (not installed) |
31 | -sudo lshw List hardware |
32 | -lspci List all PCI devices |
33 | -aplay -l List all soundcards and digital audio devices |
34 | -cat ? path Read File & Print to Standard Output |
35 | -ls ? path List Folders Contents |
36 | -ls -lSr ? path Show files by size, biggest last |
37 | -mv ? ? sourcePath, destinationPath Move (Rename) Files |
38 | -cp ? ? sourcePath, destinationPath Copy File from sourcePath to destinationPath |
39 | -sudo lspci attached PCI devices |
40 | -chmod ? ? permissions, file Change access permissions, change mode |
41 | -chown ? ? owner group, file Change the owner and/or group of each given file |
42 | -dmesg Print kernel & driver messages |
43 | -history Command History |
44 | -history | grep -i ? command search history for a command |
45 | -locate ? file Find files (updatedb to update DB) |
46 | -sudo updatedb update the database for locate |
47 | -which ? command Show full path name of command |
48 | -find -maxdepth 1 -type f | xargs grep -F ? string Search all regular files for 'string' in this dir |
49 | -gpg -c ? file Encypt a file |
50 | -gpg ? file.gpg Decrypt a file |
51 | -tar -cvf ? ? Destination.tar Source Compress(tar) Source into Destination |
52 | -tar -cvzf ? ? Destination.tar.gz Source Compress(tar.gz) Source into Destination |
53 | -tar -cjvf ? ? Destination.tar.bz2 Source Compress(tar.bz2) Source into Destination |
54 | -tar xvf ? file decompress/extract .tar |
55 | -tar xvzf ? file decompress/extract tar.gz |
56 | -tar xjvf ? file decompress/extract a tar.bz2 |
57 | -sudo dpkg --configure -a help fix broken packages |
58 | -sudo apt-get -f install help fix broken packages |
59 | -top display Linux tasks |
60 | -netstat Print network connections and interface statistics |
61 | -sudo fdisk -l ? disk(usually /dev/sda) List partition tables for specified devices |
62 | -sudo ufw enable Enable netfilter firewall |
63 | -sudo ufw allow ? port Open a port in netfilter firewall |
64 | -sudo ufw deny ? port Close a port in netfilter firewall |
65 | -sudo ufw disable Disable netfilter firewall |
66 | -cat ? ? | sort | uniq > ? file1, file2, file3 combine, sort and remove duplicates from 2 files |
67 | -dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n List all installed packages by size |
68 | -apropos ? command or package search the manual page names and descriptions |
69 | -ip addr Display info about active network interfaces |
70 | -ip route Display currently active routing table |
71 | -dpkg -L ? Package name List all files installed by a given package |
72 | -dpkg -S $(which ?) command name List which package installed given command |
73 | -dpkg -S ? path (example /etc/wgetrc) List which package installed given file or directory |
74 | -dpkg-deb -I ? .deb package file Display information about given .deb file |
75 | -dpkg-deb -c ? .deb package file List contents of given .deb file |
76 | -dpkg-source -x ? .dsc source package file Extract source package to current directory |
77 | -sudo dpkg-reconfigure ? Package name Reconfigures given installed package |
78 | -sudo dpkg -i ? .deb package file Installs given .deb package |
79 | -find . -type d List all directories under current directory |
80 | -find . -size +? File size (example 10M) List all files under current directory over given size |
81 | -find . -mtime 0 List all files under current directory modified in last 24 hours |
82 | -find . -mtime +? Number of days List all files under current directory modified more than given number of days ago |
83 | -find . -newer ? filename List all files under current directory newer than given file |
84 | -find . ! -newer ? filename List all files under current directory older than given file |
85 | -find . ! -user $USER List all files under current directory not owned by current user |
86 | -find . -user ? Username List all files under current directory owned by given user |
87 | -find . -perm -2 ! -type l List all world-writeable files and directories under current directory |
88 | -mount List all mounted filesysystems |
89 | -mount -t ? Filesystem type (example ext4) List all mounted filesystems of given type |
90 | -sudo umount ? Device or mount point Un-mount the filesystem from the given device or mount point |
91 | -sudo mount -av Mount all automatically mounted filesystems (listed in /etc/fstab) |
92 | -sudo mount ? ? device, mount point Mount given device at given mount point |
93 | -sudo fdisk -l /dev/sda List partition table of first hard drive /dev/sda |
94 | -sudo fdisk -l ? Device name (example /dev/sdb) List partition table of given device |
95 | -du -sh . Display total size of all files and directories under current directory |
96 | -du -skxc * .[^.]* |sort -n|tail -20 List disk usage in Kbytes of largest 20 files or subdirectories under current dir in current filesystem |
97 | -du -skxc * .[^.]* |sort -n List disk usage in Kbytes of all files and directories under current directory in current filesystem |
98 | -du -smxc * .[^.]* |sort -n|tail -20 List disk usage in Mbytes of largest 20 files or subdirectories under current dir in current filesystem |
99 | -du -smxc * .[^.]* |sort -n List disk usage in Mbytes of all files and directories under current directory in current filesystem |
100 | -wget ? File URL (example http://example.com/somefile.html) Download single given file using http, ftp or https |
101 | -wget -m ? Site URL (example http://example.com) Recursively download entire given site |
102 | -ls -ltr List files, most recently modified last |
103 | -ls -lAd .[^.]* List all files and directories starting with a dot (all hidden files and directories) |
104 | -sudo lsof -c ? command name List files opened by processes beginning with given command name |
105 | -sudo lsof +D ? directory List open files under given directory |
106 | -sudo lsof -i List open (Internet) network sockets |
107 | -sudo lsof -N List open NFS files |
108 | -sudo lsof -U List open Unix domain files (Unix sockets) |
109 | -tar axf ? Compressed tar archive (example somefile.tar.bz2) Extract given compressed tar archive to current directory |
110 | -tar atf ? Compressed tar archive (example somefile.tar.gz) Test given compressed tar archive integrity |
111 | -tar jcf ? ? Compressed tar archive filename (example myfiles.tar.bz2),File or directory spec Create .tar.bz2 compressed archive of given filespec |
112 | -zip -r ? ? Zip file name (example myfiles.zip),file or directory spec Create .zip compressed archive of given filespec |
113 | -unzip ? Zip file name Extract given compressed zip archive into current directory |
114 | -gzip -9 ? Filename Compress given file using gzip, adding a .gz suffix to its name |
115 | -bzip2 -9 ? Filename Compress given file using bzip2b, adding a .bz2 suffix to its name |
116 | -gunzip ? Filename (example myfile.gz) Decompress given gzipped file, removing .gz suffix |
117 | -bunzip2 ? Filename (example somefile.bz2) Decompress given bzip2'ed file, removing .bz2 suffix |
118 | -gunzip -t ? Filename (example myfile.gz) Test compression of given gzipped file |
119 | -bunzip2 -t ? Filename (example myfile.bz2) Test compression of given bzip2'ed file |
120 | -cd $OLDPWD Change directory to previously used directory |
121 | -pushd ? directory Change to given directory, remembering current directory on stack |
122 | -popd Change to topmost directory on stack created by pushd |
123 | -pwd List current directory |
124 | -cd Change to home directory |
125 | -sudo apt-get update Update database of available packages |
126 | -sudo apt-get install ? Package Install given package and its dependencies |
127 | -sudo apt-get remove ? Package Remove given package |
128 | -sudo apt-get autoremove Remove all packages installed as dependencies which are no longer needed |
129 | -apt-get source ? Package Download and install given source package into current directory |
130 | -date Display local date and time in local display format |
131 | -date -R Display local date and time in RFC2822 format |
132 | -date -u Display UTC time in local display format |
133 | -date -u +%s Display UTC time in number of seconds past the epoch |
134 | -ntpq -p List NTP time sources and their offsets |
135 | -smbstatus List current status of local SAMBA server |
136 | -smbclient -L \\\\? -N Hostname List shares and related information about SMB server on given host |
137 | -testparm -s Test and display current SAMBA configuration |
138 | -sudo service ? stop Service name Stop given service |
139 | -sudo service ? start Service name Start given service |
140 | -sudo service ? restart Service name Restart given service |
141 | -sudo service ? status Service name Show status of given service |
142 | -jobs List current jobs |
143 | -fg ? jobspec (example %1) Run given job the foreground |
144 | -bg ? jobspec (example %1) Run given job the background |
145 | -suspend Suspend the currently running shell |
146 | -md5sum ? filename or wildcard Display MD5 checksum of given file(s) |
147 | -sha1sum ? filename or wildcard Display SHA-1 checksum of given file(s) |
148 | -gpg --list-keys --list-options show-photos ? key id Display specified GnuPG key, with photo if present |
149 | -gpg --list-keys Display GnuPG keys |
150 | -gpg --clearsign ? filename Create a clearsigned copy of given filename with a .asc suffix |
151 | -gpg -ea -r ? ? Key ID, filename Create encrypted armoured copy of given file with a .asc suffix, for decryption by user with given GnuPG key id |
152 | -gpg -d ? filename Decrypt and display given file |
153 | -gpg -c ? filename Encrypt given file using symetric cipher and prompt for passphrase, result in filename.gpg |
154 | -gpg --keyserver keyserver.ubuntu.com --recv-keys ? Key ID Import public key with given key ID from Ubuntu keyserver |
155 | -top Interactively display running processes (q to quit) |
156 | -top -n1 Display a snapshot of currently running processes |
157 | -htop Display configurable interactive process viewer (q to quit) |
158 | -vmstat 5 Display information about virtual memory (process, swap, disk activity, etc.) every 5 seconds (Ctrl-C to quit) |
159 | -iostat 5 Display information about io activity every 5 seconds (Ctrl-C to quit) |
160 | -sudo jnettop -i eth0 Display information about network traffic (q to quit) |
161 | -uptime Display how long system has been running and current load averages |
162 | -sudo apt-get install packaging-dev Installs all the usual basic Debian/Ubuntu development and packaging tools |
163 | -rmadison -u ubuntu ? package name Display versions of given source package in all releases of Ubuntu |
164 | -rmadison -u debian ? package name Display versions of given source package in all releases of Debian |
165 | -rmadison -u ubuntu -s precise ? package name Display version of given source package in Precise version of Ubuntu |
166 | -rmadison -u debian -s unstable ? package name Display version of given source package in Debian unstable |
167 | -sudoedit ? filename Edit filename with root priviledges |
168 | -sudo visudo Edit sudo configuration file |
169 | - |
170 | |
171 | === added file 'data/clicompanion2.config.debian' |
172 | --- data/clicompanion2.config.debian 1970-01-01 00:00:00 +0000 |
173 | +++ data/clicompanion2.config.debian 2016-03-30 09:47:08 +0000 |
174 | @@ -0,0 +1,150 @@ |
175 | +dpkg -l ? package Find version of a package |
176 | +df -h File system disk space usage |
177 | +free -m Show RAM usage |
178 | +ps aux | grep ? search string Search active processes for search string |
179 | +iwconfig Display wireless network information |
180 | +ifconfig -a Displays the status of the currently active interfaces |
181 | +lsb_release -a What version of Ubuntu do I have? |
182 | +uname -a What kernel am I running |
183 | +gksu apt-get update && gksu apt-get upgrade Refresh update info and update all packages |
184 | +gksu apt-get clean Clear out all packages in /var/cache/apt/archives |
185 | +gksu apt-get autoclean Clear out obsolete packages(packages with a newer release) |
186 | +apt-cache search ? package Find information on a package (not installed) |
187 | +gksu lshw List hardware |
188 | +lspci List all PCI devices |
189 | +aplay -l List all soundcards and digital audio devices |
190 | +cat ? path Read File & Print to Standard Output |
191 | +ls ? path List Folders Contents |
192 | +ls -lSr ? path Show files by size, biggest last |
193 | +mv ? ? sourcePath, destinationPath Move (Rename) Files |
194 | +cp ? ? sourcePath, destinationPath Copy File from sourcePath to destinationPath |
195 | +gksu lspci attached PCI devices |
196 | +chmod ? ? permissions, file Change access permissions, change mode |
197 | +chown ? ? owner group, file Change the owner and/or group of each given file |
198 | +dmesg Print kernel & driver messages |
199 | +history Command History |
200 | +history | grep -i ? command search history for a command |
201 | +locate ? file Find files (updatedb to update DB) |
202 | +gksu updatedb update the database for locate |
203 | +which ? command Show full path name of command |
204 | +find -maxdepth 1 -type f | xargs grep -F ? string Search all regular files for 'string' in this dir |
205 | +gpg -c ? file Encypt a file |
206 | +gpg ? file.gpg Decrypt a file |
207 | +tar -cvf ? ? Destination.tar Source Compress(tar) Source into Destination |
208 | +tar -cvzf ? ? Destination.tar.gz Source Compress(tar.gz) Source into Destination |
209 | +tar -cjvf ? ? Destination.tar.bz2 Source Compress(tar.bz2) Source into Destination |
210 | +tar xvf ? file decompress/extract .tar |
211 | +tar xvzf ? file decompress/extract tar.gz |
212 | +tar xjvf ? file decompress/extract a tar.bz2 |
213 | +gksu dpkg --configure -a help fix broken packages |
214 | +gksu apt-get -f install help fix broken packages |
215 | +top display Linux tasks |
216 | +netstat Print network connections and interface statistics |
217 | +gksu fdisk -l ? disk(usually /dev/sda) List partition tables for specified devices |
218 | +gksu ufw enable Enable netfilter firewall |
219 | +gksu ufw allow ? port Open a port in netfilter firewall |
220 | +gksu ufw deny ? port Close a port in netfilter firewall |
221 | +gksu ufw disable Disable netfilter firewall |
222 | +cat ? ? | sort | uniq > ? file1, file2, file3 combine, sort and remove duplicates from 2 files |
223 | +dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n List all installed packages by size |
224 | +apropos ? command or package search the manual page names and descriptions |
225 | +ip addr Display info about active network interfaces |
226 | +ip route Display currently active routing table |
227 | +dpkg -L ? Package name List all files installed by a given package |
228 | +dpkg -S $(which ?) command name List which package installed given command |
229 | +dpkg -S ? path (example /etc/wgetrc) List which package installed given file or directory |
230 | +dpkg-deb -I ? .deb package file Display information about given .deb file |
231 | +dpkg-deb -c ? .deb package file List contents of given .deb file |
232 | +dpkg-source -x ? .dsc source package file Extract source package to current directory |
233 | +gksu dpkg-reconfigure ? Package name Reconfigures given installed package |
234 | +gksu dpkg -i ? .deb package file Installs given .deb package |
235 | +find . -type d List all directories under current directory |
236 | +find . -size +? File size (example 10M) List all files under current directory over given size |
237 | +find . -mtime 0 List all files under current directory modified in last 24 hours |
238 | +find . -mtime +? Number of days List all files under current directory modified more than given number of days ago |
239 | +find . -newer ? filename List all files under current directory newer than given file |
240 | +find . ! -newer ? filename List all files under current directory older than given file |
241 | +find . ! -user $USER List all files under current directory not owned by current user |
242 | +find . -user ? Username List all files under current directory owned by given user |
243 | +find . -perm -2 ! -type l List all world-writeable files and directories under current directory |
244 | +mount List all mounted filesysystems |
245 | +mount -t ? Filesystem type (example ext4) List all mounted filesystems of given type |
246 | +gksu umount ? Device or mount point Un-mount the filesystem from the given device or mount point |
247 | +gksu mount -av Mount all automatically mounted filesystems (listed in /etc/fstab) |
248 | +gksu mount ? ? device, mount point Mount given device at given mount point |
249 | +gksu fdisk -l /dev/sda List partition table of first hard drive /dev/sda |
250 | +gksu fdisk -l ? Device name (example /dev/sdb) List partition table of given device |
251 | +du -sh . Display total size of all files and directories under current directory |
252 | +du -skxc * .[^.]* |sort -n|tail -20 List disk usage in Kbytes of largest 20 files or subdirectories under current dir in current filesystem |
253 | +du -skxc * .[^.]* |sort -n List disk usage in Kbytes of all files and directories under current directory in current filesystem |
254 | +du -smxc * .[^.]* |sort -n|tail -20 List disk usage in Mbytes of largest 20 files or subdirectories under current dir in current filesystem |
255 | +du -smxc * .[^.]* |sort -n List disk usage in Mbytes of all files and directories under current directory in current filesystem |
256 | +wget ? File URL (example http://example.com/somefile.html) Download single given file using http, ftp or https |
257 | +wget -m ? Site URL (example http://example.com) Recursively download entire given site |
258 | +ls -ltr List files, most recently modified last |
259 | +ls -lAd .[^.]* List all files and directories starting with a dot (all hidden files and directories) |
260 | +gksu lsof -c ? command name List files opened by processes beginning with given command name |
261 | +gksu lsof +D ? directory List open files under given directory |
262 | +gksu lsof -i List open (Internet) network sockets |
263 | +gksu lsof -N List open NFS files |
264 | +gksu lsof -U List open Unix domain files (Unix sockets) |
265 | +tar axf ? Compressed tar archive (example somefile.tar.bz2) Extract given compressed tar archive to current directory |
266 | +tar atf ? Compressed tar archive (example somefile.tar.gz) Test given compressed tar archive integrity |
267 | +tar jcf ? ? Compressed tar archive filename (example myfiles.tar.bz2),File or directory spec Create .tar.bz2 compressed archive of given filespec |
268 | +zip -r ? ? Zip file name (example myfiles.zip),file or directory spec Create .zip compressed archive of given filespec |
269 | +unzip ? Zip file name Extract given compressed zip archive into current directory |
270 | +gzip -9 ? Filename Compress given file using gzip, adding a .gz suffix to its name |
271 | +bzip2 -9 ? Filename Compress given file using bzip2b, adding a .bz2 suffix to its name |
272 | +gunzip ? Filename (example myfile.gz) Decompress given gzipped file, removing .gz suffix |
273 | +bunzip2 ? Filename (example somefile.bz2) Decompress given bzip2'ed file, removing .bz2 suffix |
274 | +gunzip -t ? Filename (example myfile.gz) Test compression of given gzipped file |
275 | +bunzip2 -t ? Filename (example myfile.bz2) Test compression of given bzip2'ed file |
276 | +cd $OLDPWD Change directory to previously used directory |
277 | +pushd ? directory Change to given directory, remembering current directory on stack |
278 | +popd Change to topmost directory on stack created by pushd |
279 | +pwd List current directory |
280 | +cd Change to home directory |
281 | +gksu apt-get update Update database of available packages |
282 | +gksu apt-get install ? Package Install given package and its dependencies |
283 | +gksu apt-get remove ? Package Remove given package |
284 | +gksu apt-get auto-remove Remove all packages installed as dependencies which are no longer needed |
285 | +apt-get source ? Package Download and install given source package into current directory |
286 | +date Display local date and time in local display format |
287 | +date -R Display local date and time in RFC2822 format |
288 | +date -u Display UTC time in local display format |
289 | +date -u +%s Display UTC time in number of seconds past the epoch |
290 | +ntpq -p List NTP time sources and their offsets |
291 | +smbstatus List current status of local SAMBA server |
292 | +smbclient -L \\\\? -N Hostname List shares and related information about SMB server on given host |
293 | +testparm -s Test and display current SAMBA configuration |
294 | +gksu service ? stop Service name Stop given service |
295 | +gksu service ? start Service name Start given service |
296 | +gksu service ? restart Service name Restart given service |
297 | +gksu service ? status Service name Show status of given service |
298 | +jobs List current jobs |
299 | +fg ? jobspec (example %1) Run given job the foreground |
300 | +bg ? jobspec (example %1) Run given job the background |
301 | +suspend Suspend the currently running shell |
302 | +md5sum ? filename or wildcard Display MD5 checksum of given file(s) |
303 | +sha1sum ? filename or wildcard Display SHA-1 checksum of given file(s) |
304 | +gpg --list-keys --list-options show-photos ? key id Display specified GnuPG key, with photo if present |
305 | +gpg --list-keys Display GnuPG keys |
306 | +gpg --clearsign ? filename Create a clearsigned copy of given filename with a .asc suffix |
307 | +gpg -ea -r ? ? Key ID, filename Create encrypted armoured copy of given file with a .asc suffix, for decryption by user with given GnuPG key id |
308 | +gpg -d ? filename Decrypt and display given file |
309 | +gpg -c ? filename Encrypt given file using symetric cipher and prompt for passphrase, result in filename.gpg |
310 | +gpg --keyserver keyserver.ubuntu.com --recv-keys ? Key ID Import public key with given key ID from Ubuntu keyserver |
311 | +top Interactively display running processes (q to quit) |
312 | +top -n1 Display a snapshot of currently running processes |
313 | +htop Display configurable interactive process viewer (q to quit) |
314 | +vmstat 5 Display information about virtual memory (process, swap, disk activity, etc.) every 5 seconds (Ctrl-C to quit) |
315 | +iostat 5 Display information about io activity every 5 seconds (Ctrl-C to quit) |
316 | +gksu jnettop -i eth0 Display information about network traffic (q to quit) |
317 | +uptime Display how long system has been running and current load averages |
318 | +gksu apt-get install packaging-dev Installs all the usual basic Debian/Ubuntu development and packaging tools |
319 | +rmadison -u ubuntu ? package name Display versions of given source package in all releases of Ubuntu |
320 | +rmadison -u debian ? package name Display versions of given source package in all releases of Debian |
321 | +rmadison -u ubuntu -s precise ? package name Display version of given source package in Precise version of Ubuntu |
322 | +rmadison -u debian -s unstable ? package name Display version of given source package in Debian unstable |
323 | +sudoedit ? filename Edit filename with root priviledges |
324 | +sudo visudo Edit sudo configuration file |
325 | |
326 | === added file 'data/clicompanion2.config.ubuntu' |
327 | --- data/clicompanion2.config.ubuntu 1970-01-01 00:00:00 +0000 |
328 | +++ data/clicompanion2.config.ubuntu 2016-03-30 09:47:08 +0000 |
329 | @@ -0,0 +1,150 @@ |
330 | +dpkg -l ? package Find version of a package |
331 | +df -h File system disk space usage |
332 | +free -m Show RAM usage |
333 | +ps aux | grep ? search string Search active processes for search string |
334 | +iwconfig Display wireless network information |
335 | +ifconfig -a Displays the status of the currently active interfaces |
336 | +lsb_release -a What version of Ubuntu do I have? |
337 | +uname -a What kernel am I running |
338 | +sudo apt-get update && sudo apt-get upgrade Refresh update info and update all packages |
339 | +sudo apt-get clean Clear out all packages in /var/cache/apt/archives |
340 | +sudo apt-get autoclean Clear out obsolete packages(packages with a newer release) |
341 | +apt-cache search ? package Find information on a package (not installed) |
342 | +sudo lshw List hardware |
343 | +lspci List all PCI devices |
344 | +aplay -l List all soundcards and digital audio devices |
345 | +cat ? path Read File & Print to Standard Output |
346 | +ls ? path List Folders Contents |
347 | +ls -lSr ? path Show files by size, biggest last |
348 | +mv ? ? sourcePath, destinationPath Move (Rename) Files |
349 | +cp ? ? sourcePath, destinationPath Copy File from sourcePath to destinationPath |
350 | +sudo lspci attached PCI devices |
351 | +chmod ? ? permissions, file Change access permissions, change mode |
352 | +chown ? ? owner group, file Change the owner and/or group of each given file |
353 | +dmesg Print kernel & driver messages |
354 | +history Command History |
355 | +history | grep -i ? command search history for a command |
356 | +locate ? file Find files (updatedb to update DB) |
357 | +sudo updatedb update the database for locate |
358 | +which ? command Show full path name of command |
359 | +find -maxdepth 1 -type f | xargs grep -F ? string Search all regular files for 'string' in this dir |
360 | +gpg -c ? file Encypt a file |
361 | +gpg ? file.gpg Decrypt a file |
362 | +tar -cvf ? ? Destination.tar Source Compress(tar) Source into Destination |
363 | +tar -cvzf ? ? Destination.tar.gz Source Compress(tar.gz) Source into Destination |
364 | +tar -cjvf ? ? Destination.tar.bz2 Source Compress(tar.bz2) Source into Destination |
365 | +tar xvf ? file decompress/extract .tar |
366 | +tar xvzf ? file decompress/extract tar.gz |
367 | +tar xjvf ? file decompress/extract a tar.bz2 |
368 | +sudo dpkg --configure -a help fix broken packages |
369 | +sudo apt-get -f install help fix broken packages |
370 | +top display Linux tasks |
371 | +netstat Print network connections and interface statistics |
372 | +sudo fdisk -l ? disk(usually /dev/sda) List partition tables for specified devices |
373 | +sudo ufw enable Enable netfilter firewall |
374 | +sudo ufw allow ? port Open a port in netfilter firewall |
375 | +sudo ufw deny ? port Close a port in netfilter firewall |
376 | +sudo ufw disable Disable netfilter firewall |
377 | +cat ? ? | sort | uniq > ? file1, file2, file3 combine, sort and remove duplicates from 2 files |
378 | +dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n List all installed packages by size |
379 | +apropos ? command or package search the manual page names and descriptions |
380 | +ip addr Display info about active network interfaces |
381 | +ip route Display currently active routing table |
382 | +dpkg -L ? Package name List all files installed by a given package |
383 | +dpkg -S $(which ?) command name List which package installed given command |
384 | +dpkg -S ? path (example /etc/wgetrc) List which package installed given file or directory |
385 | +dpkg-deb -I ? .deb package file Display information about given .deb file |
386 | +dpkg-deb -c ? .deb package file List contents of given .deb file |
387 | +dpkg-source -x ? .dsc source package file Extract source package to current directory |
388 | +sudo dpkg-reconfigure ? Package name Reconfigures given installed package |
389 | +sudo dpkg -i ? .deb package file Installs given .deb package |
390 | +find . -type d List all directories under current directory |
391 | +find . -size +? File size (example 10M) List all files under current directory over given size |
392 | +find . -mtime 0 List all files under current directory modified in last 24 hours |
393 | +find . -mtime +? Number of days List all files under current directory modified more than given number of days ago |
394 | +find . -newer ? filename List all files under current directory newer than given file |
395 | +find . ! -newer ? filename List all files under current directory older than given file |
396 | +find . ! -user $USER List all files under current directory not owned by current user |
397 | +find . -user ? Username List all files under current directory owned by given user |
398 | +find . -perm -2 ! -type l List all world-writeable files and directories under current directory |
399 | +mount List all mounted filesysystems |
400 | +mount -t ? Filesystem type (example ext4) List all mounted filesystems of given type |
401 | +sudo umount ? Device or mount point Un-mount the filesystem from the given device or mount point |
402 | +sudo mount -av Mount all automatically mounted filesystems (listed in /etc/fstab) |
403 | +sudo mount ? ? device, mount point Mount given device at given mount point |
404 | +sudo fdisk -l /dev/sda List partition table of first hard drive /dev/sda |
405 | +sudo fdisk -l ? Device name (example /dev/sdb) List partition table of given device |
406 | +du -sh . Display total size of all files and directories under current directory |
407 | +du -skxc * .[^.]* |sort -n|tail -20 List disk usage in Kbytes of largest 20 files or subdirectories under current dir in current filesystem |
408 | +du -skxc * .[^.]* |sort -n List disk usage in Kbytes of all files and directories under current directory in current filesystem |
409 | +du -smxc * .[^.]* |sort -n|tail -20 List disk usage in Mbytes of largest 20 files or subdirectories under current dir in current filesystem |
410 | +du -smxc * .[^.]* |sort -n List disk usage in Mbytes of all files and directories under current directory in current filesystem |
411 | +wget ? File URL (example http://example.com/somefile.html) Download single given file using http, ftp or https |
412 | +wget -m ? Site URL (example http://example.com) Recursively download entire given site |
413 | +ls -ltr List files, most recently modified last |
414 | +ls -lAd .[^.]* List all files and directories starting with a dot (all hidden files and directories) |
415 | +sudo lsof -c ? command name List files opened by processes beginning with given command name |
416 | +sudo lsof +D ? directory List open files under given directory |
417 | +sudo lsof -i List open (Internet) network sockets |
418 | +sudo lsof -N List open NFS files |
419 | +sudo lsof -U List open Unix domain files (Unix sockets) |
420 | +tar axf ? Compressed tar archive (example somefile.tar.bz2) Extract given compressed tar archive to current directory |
421 | +tar atf ? Compressed tar archive (example somefile.tar.gz) Test given compressed tar archive integrity |
422 | +tar jcf ? ? Compressed tar archive filename (example myfiles.tar.bz2),File or directory spec Create .tar.bz2 compressed archive of given filespec |
423 | +zip -r ? ? Zip file name (example myfiles.zip),file or directory spec Create .zip compressed archive of given filespec |
424 | +unzip ? Zip file name Extract given compressed zip archive into current directory |
425 | +gzip -9 ? Filename Compress given file using gzip, adding a .gz suffix to its name |
426 | +bzip2 -9 ? Filename Compress given file using bzip2b, adding a .bz2 suffix to its name |
427 | +gunzip ? Filename (example myfile.gz) Decompress given gzipped file, removing .gz suffix |
428 | +bunzip2 ? Filename (example somefile.bz2) Decompress given bzip2'ed file, removing .bz2 suffix |
429 | +gunzip -t ? Filename (example myfile.gz) Test compression of given gzipped file |
430 | +bunzip2 -t ? Filename (example myfile.bz2) Test compression of given bzip2'ed file |
431 | +cd $OLDPWD Change directory to previously used directory |
432 | +pushd ? directory Change to given directory, remembering current directory on stack |
433 | +popd Change to topmost directory on stack created by pushd |
434 | +pwd List current directory |
435 | +cd Change to home directory |
436 | +sudo apt-get update Update database of available packages |
437 | +sudo apt-get install ? Package Install given package and its dependencies |
438 | +sudo apt-get remove ? Package Remove given package |
439 | +sudo apt-get auto-remove Remove all packages installed as dependencies which are no longer needed |
440 | +apt-get source ? Package Download and install given source package into current directory |
441 | +date Display local date and time in local display format |
442 | +date -R Display local date and time in RFC2822 format |
443 | +date -u Display UTC time in local display format |
444 | +date -u +%s Display UTC time in number of seconds past the epoch |
445 | +ntpq -p List NTP time sources and their offsets |
446 | +smbstatus List current status of local SAMBA server |
447 | +smbclient -L \\\\? -N Hostname List shares and related information about SMB server on given host |
448 | +testparm -s Test and display current SAMBA configuration |
449 | +sudo service ? stop Service name Stop given service |
450 | +sudo service ? start Service name Start given service |
451 | +sudo service ? restart Service name Restart given service |
452 | +sudo service ? status Service name Show status of given service |
453 | +jobs List current jobs |
454 | +fg ? jobspec (example %1) Run given job the foreground |
455 | +bg ? jobspec (example %1) Run given job the background |
456 | +suspend Suspend the currently running shell |
457 | +md5sum ? filename or wildcard Display MD5 checksum of given file(s) |
458 | +sha1sum ? filename or wildcard Display SHA-1 checksum of given file(s) |
459 | +gpg --list-keys --list-options show-photos ? key id Display specified GnuPG key, with photo if present |
460 | +gpg --list-keys Display GnuPG keys |
461 | +gpg --clearsign ? filename Create a clearsigned copy of given filename with a .asc suffix |
462 | +gpg -ea -r ? ? Key ID, filename Create encrypted armoured copy of given file with a .asc suffix, for decryption by user with given GnuPG key id |
463 | +gpg -d ? filename Decrypt and display given file |
464 | +gpg -c ? filename Encrypt given file using symetric cipher and prompt for passphrase, result in filename.gpg |
465 | +gpg --keyserver keyserver.ubuntu.com --recv-keys ? Key ID Import public key with given key ID from Ubuntu keyserver |
466 | +top Interactively display running processes (q to quit) |
467 | +top -n1 Display a snapshot of currently running processes |
468 | +htop Display configurable interactive process viewer (q to quit) |
469 | +vmstat 5 Display information about virtual memory (process, swap, disk activity, etc.) every 5 seconds (Ctrl-C to quit) |
470 | +iostat 5 Display information about io activity every 5 seconds (Ctrl-C to quit) |
471 | +sudo jnettop -i eth0 Display information about network traffic (q to quit) |
472 | +uptime Display how long system has been running and current load averages |
473 | +sudo apt-get install packaging-dev Installs all the usual basic Debian/Ubuntu development and packaging tools |
474 | +rmadison -u ubuntu ? package name Display versions of given source package in all releases of Ubuntu |
475 | +rmadison -u debian ? package name Display versions of given source package in all releases of Debian |
476 | +rmadison -u ubuntu -s precise ? package name Display version of given source package in Precise version of Ubuntu |
477 | +rmadison -u debian -s unstable ? package name Display version of given source package in Debian unstable |
478 | +sudoedit ? filename Edit filename with root priviledges |
479 | +sudo visudo Edit sudo configuration file |
480 | |
481 | === modified file 'plugins/LocalCommandList.py' |
482 | --- plugins/LocalCommandList.py 2016-02-24 11:47:21 +0000 |
483 | +++ plugins/LocalCommandList.py 2016-03-30 09:47:08 +0000 |
484 | @@ -25,6 +25,8 @@ |
485 | pygtk.require('2.0') |
486 | import gobject |
487 | import collections |
488 | +import platform |
489 | +import shutil |
490 | |
491 | try: |
492 | import gtk |
493 | @@ -392,7 +394,17 @@ |
494 | self.file_btn.connect('clicked', self.select_file) |
495 | hbox.pack_end(self.file_btn, False, False, 8) |
496 | self.pack_start(hbox, False, False, 8) |
497 | - |
498 | + hbox2 = gtk.HBox() |
499 | + hbox3 = gtk.HBox() |
500 | + self.file_btn2 = gtk.Button("Revert cheatsheet to clean Ubuntu version") |
501 | + self.file_btn3 = gtk.Button("Revert cheatsheet to clean Debian version") |
502 | + self.file_btn2.connect('clicked', self.revert_cheatsheet_to_ubuntu_version) |
503 | + self.file_btn3.connect('clicked', self.revert_cheatsheet_to_debian_version) |
504 | + hbox2.pack_start(self.file_btn2) |
505 | + hbox3.pack_start(self.file_btn3) |
506 | + self.pack_start(hbox2, False, False, 8) |
507 | + self.pack_start(hbox3, False, False, 8) |
508 | + |
509 | def select_file(self, btn): |
510 | chooser = CHFileSelector() |
511 | resp = chooser.run() |
512 | @@ -407,7 +419,44 @@ |
513 | self.remove(child) |
514 | self.draw_all() |
515 | self.show_all() |
516 | + |
517 | + def revert_cheatsheet_to_ubuntu_version(self, btn): |
518 | + distribution = platform.linux_distribution() |
519 | + if distribution[0] == 'debian': |
520 | + self.show_warning() |
521 | + shutil.copy2('/etc/clicompanion.d/clicompanion2.config.ubuntu', os.path.expanduser('~') + '/.clicompanion2') |
522 | + self.emit('reload') |
523 | + self.show_information() |
524 | + |
525 | + def revert_cheatsheet_to_debian_version(self, btn): |
526 | + distribution = platform.linux_distribution() |
527 | + if distribution[0] == 'Ubuntu': |
528 | + self.show_warning() |
529 | + shutil.copy2('/etc/clicompanion.d/clicompanion2.config.debian', os.path.expanduser('~') + '/.clicompanion2') |
530 | + self.emit('reload') |
531 | + self.show_information() |
532 | |
533 | + def show_warning(self): |
534 | + dlg = gtk.MessageDialog( |
535 | + None, |
536 | + gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, |
537 | + gtk.MESSAGE_ERROR, |
538 | + gtk.BUTTONS_CLOSE, |
539 | + message_format=_('Warning!')) |
540 | + dlg.format_secondary_text(_('You are changing cheatsheet to version for another distribution')) |
541 | + dlg.run() |
542 | + dlg.destroy() |
543 | + |
544 | + def show_information(self): |
545 | + dlg = gtk.MessageDialog( |
546 | + None, |
547 | + gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, |
548 | + gtk.MESSAGE_INFO, |
549 | + gtk.BUTTONS_CLOSE, |
550 | + message_format=_('Information')) |
551 | + dlg.format_secondary_text(_('Cheatsheet was changed.')) |
552 | + dlg.run() |
553 | + dlg.destroy() |
554 | |
555 | class CHFileSelector(gtk.FileChooserDialog): |
556 | ''' |
557 | |
558 | === modified file 'setup.py' |
559 | --- setup.py 2013-01-27 10:14:10 +0000 |
560 | +++ setup.py 2016-03-30 09:47:08 +0000 |
561 | @@ -20,6 +20,8 @@ |
562 | import sys |
563 | import glob |
564 | from distutils.core import setup |
565 | +import platform |
566 | +import shutil |
567 | try: |
568 | from DistUtilsExtra.command import * |
569 | except ImportError: |
570 | @@ -28,26 +30,28 @@ |
571 | ) |
572 | sys.exit(1) |
573 | |
574 | - |
575 | - |
576 | - |
577 | -setup( |
578 | - name='clicompanion', |
579 | - version='1.1', |
580 | - description='Run Terminal commands from a GUI. Store commands for later use.', |
581 | - author='Duane Hinnen', |
582 | - author_email='duanedesign@gmail.com', |
583 | - scripts=['clicompanion'], |
584 | - packages=['clicompanionlib', 'plugins'], |
585 | - data_files=[ |
586 | - ('/etc/clicompanion.d/', ['data/clicompanion2.config']), |
587 | - ('/usr/share/pixmaps', ['data/clicompanion.16.png']), |
588 | - ('/usr/share/applications', ['data/clicompanion.desktop']), |
589 | - ('/usr/share/clicompanion/locale/', glob.glob('locale/*/LC_MESSAGES/*.mo')), |
590 | - ], |
591 | - |
592 | - cmdclass = { |
593 | - 'build' : build_extra.build_extra, |
594 | - 'build_i18n' : build_i18n.build_i18n, |
595 | - }, |
596 | - ) |
597 | +distribution = platform.linux_distribution() |
598 | +if distribution[0] == 'Ubuntu': |
599 | + shutil.copy2('data/clicompanion2.config.ubuntu', 'data/clicompanion2.config') |
600 | +elif distribution[0] == 'debian': |
601 | + shutil.copy2('data/clicompanion2.config.debian', 'data/clicompanion2.config') |
602 | + |
603 | +setup( name='clicompanion', |
604 | + version='1.1', |
605 | + description='Run Terminal commands from a GUI. Store commands for later use.', |
606 | + author='Duane Hinnen', |
607 | + author_email='duanedesign@gmail.com', |
608 | + scripts=['clicompanion'], |
609 | + packages=['clicompanionlib', 'plugins'], |
610 | + data_files=[('/etc/clicompanion.d/', ['data/clicompanion2.config']), |
611 | + ('/etc/clicompanion.d/', ['data/clicompanion2.config.debian']), |
612 | + ('/etc/clicompanion.d/', ['data/clicompanion2.config.ubuntu']), |
613 | + ('/usr/share/pixmaps', ['data/clicompanion.16.png']), |
614 | + ('/usr/share/applications', ['data/clicompanion.desktop']), |
615 | + ('/usr/share/clicompanion/locale/', glob.glob('locale/*/LC_MESSAGES/*.mo')), |
616 | + ], |
617 | + |
618 | + cmdclass={ 'build' : build_extra.build_extra, |
619 | + 'build_i18n' : build_i18n.build_i18n, |
620 | + }, |
621 | + ) |
Hi Marek,
Sorry for the delay. www.python. org/dev/ peps/pep- 0008/) guidelines as close as possible?
This new version looks fine, but could you please try to follow the pep8 (http://
Just using spaces instead of tabs and deleting all the spaces at the end of a line will be enough.
Also you can use the self.emit('reload') sentence to force a reload of the commands list and avoid having to restart the whole program, check how it's done when loading another cheatsheet file if you want more details.
Thanks for contributing! And don't get discouraged, ask for help if you need it!
David