1
0
Fork 0

browser-home-profile/README.md: Synced to new generic web-browser home-profile

pull/890/head
tokiclover 10 years ago
parent a68de59600
commit 5ce054262a

@ -1,14 +1,13 @@
Firefox-Home-Profile (FHP) Browser-Home-Profile (BHP)
====== ======
Maintains firefox home profile '$HOME/.{,cache/}mozilla/firefox/abcd1234.default' on Unix Maintains web-browser home profile `$HOME/.{,cache/}PROFILE` on Unix
systems in a tmpfs (or zram backed filesystem) to get a very responsive browser, systems in a tmpfs (or zram backed filesystem) to get a very responsive browser,
with a tarball back up saved in '$HOME/.{,cache/}mozilla/firefox'. with an optional tarball back up.
Using a compressor like lz4 or lzo(p) make compression/decompression seamless, Using a compressor like lz4 or lzo(p) make compression/decompression seamless,
so no need to remove the autoload of the function. Although, it can be commented so no need to remove the autoload of the function. Additionally, the tarball
out to have a empty profile to start with, a 'fhp' command at the prompt will back up can be decompressed after set up by setting up an option.
decompress the tarball instantenously with lz4/lzo(p).
Settings Settings
-------- --------
@ -16,35 +15,34 @@ Settings
This module can guess a profile to maintain by looking at the previous directory, This module can guess a profile to maintain by looking at the previous directory,
by looking at the previous directory, however a user can set the following: by looking at the previous directory, however a user can set the following:
zstyle ':prezto:module:FHP' profile 'abcd1234' zstyle ':prezto:module:BHP' browser 'BROWSER'
zstyle ':prezto:module:FHP' compressor 'lzop -1' zstyle ':prezto:module:BHP' profile 'abcd1234'
zstyle ':prezto:module:FHP' zsh-hook 'yes' zstyle ':prezto:module:BHP' compressor 'lzop -1'
zstyle ':prezto:module:BHP' zsh-hook 'yes'
The second setting select a compressor to be used instead of default is 'lz4 -1'. Selecting a compressor to be used instead of the default ('lz4 -1') can be set.
Second setting would select a specific profile, e.g. firefox specific one if many
The last setting add fhp function to zshexit hook, so the profile will be saved profiles are available. Last one would add a function to zshexit hook,
or archived to be more precise before the shell exit. so the profile will be saved or archived to be more precise before the shell exit.
Optimizations Optimizations
------- -------
Just make sure to have at least '/tmp' or your system TMPDIR in a tmpfs for the Just make sure to have at least `/tmp` or your system TMPDIR in a tmpfs for the
least to get any benefice of this script with something like: least to get any benefice with something like the following in fstab(5):
/etc/fstab: tmp /tmp tmpfs mode=1777,size=256M,noatime 0 0 tmp /tmp tmpfs mode=1777,size=256M,noatime 0 0
This will ensure very low latency when browsing the intertubes and removing the This will ensure very low latency when browsing the intertubes and removing the
profile in the fly *really* remove any trace of your browsing history because profile in the fly *really* remove any trace of your browsing history because
everything is in memory, but firing up a 'fhp' command will nullify this effect. everything is in memory, but firing up a `bhp` command will nullify this effect.
### Auto-saving/Auto-start profile ### Auto-saving/Auto-start profile
Of course, one can save a profile at regular time interval using a cron job or Of course, one can save a profile at regular time interval using a cron job or
something similar. atd when need be. Lastly, a profile can be auto-started by setting:
A profile can be auto-started by setting:
zstyle ':prezto:module:FHP' decompress 'yes' zstyle ':prezto:module:BHP' decompress 'yes'
Customizations Customizations
------- -------
@ -55,7 +53,7 @@ users. The following can be done in that case in *zpreztorc*.
zpmodules=(environment editor prompt helper utility precompile) zpmodules=(environment editor prompt helper utility precompile)
if [[ ${TTY/tty} == $TTY ]] && [[ $EUID != 0 ]] { if [[ ${TTY/tty} == $TTY ]] && [[ $EUID != 0 ]] {
zpmodules=($zpmodules firefox-home-profile) zpmodules=($zpmodules browser-home-profile)
} }
zstyle ':prezto:load' pmodule $zpmodules zstyle ':prezto:load' pmodule $zpmodules
unset zpmodules unset zpmodules

Loading…
Cancel
Save