When I upgraded my Ubuntu 14.04 to use kernel 4.0 (and now kernel 4.1) it apparently got a new feature: it would wake up from suspend in the middle of the day…
… or any other document format for that matter.
I thought it might be nice to have some sort of split window view in that allows you to edit a Pandoc file on the left and see the generated I-D on the right (in vim, with no extra daemons and not relying on inotify).
Turns out you can do that, though it is not optimal, but it works. The jury is still out if this works well enough to actually make it useful.
GNOME3 in the default install is unusable, not as bad as Unity, but bad. Luckily with some minor tweaking it can be made to work quite nicely.
These are some assorted notes on how I got stuff working the way I like.
From a fresh Ubuntu install, install GNOME3:
sudo apt-get install gnome-desktop-environment Then:
Normal focus mode:
gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy' gsettings set org.gnome.desktop.wm.preferences auto-raise false Extensions:
I was wondering how to make my touchpad settings permanent in Ubuntu. I could find a few pointers on the net, like:
http://tombuntu.com/index.php/2011/11/06/persistent-touchpad-configuration-in-ubuntu-11-10/
http://ubuntuforums.org/archive/index.php/t-1538147.html
But sometimes it makes sense to look at your own system’s documentation:
% cd /usr/share/X11/xorg.conf.d % head 50-synaptics.conf # Example xorg.conf.d snippet that assigns the touchpad driver # to all touchpads. See xorg.conf.d(5) for more information on # InputClass. # DO NOT EDIT THIS FILE, your distribution will likely overwrite # it when updating.
We all know this comic:
And now in zsh!
With the following snippet all commands that are started with an uppercase word will be prefixed with sudo and then executed.
So MAKE me a sandwich, becomes sudo make me a sandwich.
accept-line() { local B B=(${=BUFFER}) if [[ "$B[1]" != [A-Z]* ]]; then zle .accept-line return fi if [[ $B[1] != "" && $B[1] == $B[1]:u ]]; then BUFFER="sudo $B[1]:l $B[2,-1]" fi zle .
I like Vim, so I try to use it at many places. Like in my shell (set -o vi), and when writing and coding.
After some Googling I found that Vim can also be used as a MANPAGER. But there is one nagging issue. To quit viewing the manual page you have to type ‘:q’, which is one keystroke more then when using less as your MANPAGER… Needless to say: this is unacceptable.
I’m a huge fan of syntax highlighting in my editor Vim. One thing I started to
miss was that user defined type miss out on the highlighting, because Vim does
not know about them. Wouldn’t it be cool to have some sort of automatic support that
detect your types and adds them to the correct highlighting group? I call this “dynamic syntax highlighting”.
As a proof-of-concept I took the tagbar plugin, and modified it a little to take advantage of the language detection (specifically the types).
When editing zone files with vim I always get annoyed by the fact that the syntax highlighting did not understand newer types ‘n stuff. I never did anything about until now.
Download this vim syntax file and drop it in ~/.vim/syntax. It adds newer (DNSSEC) types and base64 highlighting. Base64 only works when there are no embedded spaces (patch welcome to fix that btw!)
I wanted to look at the increase in ntp traffic now that I’ve joined the pool.ntp.org ranks. Unfortunately munin didn’t have a watch-port-x-and-draw-something-plugin. So I wrote my own based upon the ip_ plugin.
The plugin monitors both v6, v4, tcp and udp and plots them together, as send and received. Just symlink the port number to the plugin:
ip_port_123 -> ip_port_ For it to work, you do need some iptables rules, so yes, this plugin only works in Linux.
For some reason I was experiencing wifi disconnects with the ath9k wifi driver under Linux (Ubuntu 12.04). After reading numerous blogs and bug reports (disable ipv6, use hwcrypto=0, etc.), I suspected it was the power management that was somehow disabling the driver, in turn leading to a disconnect. This will probably be fixed in newer kernels (Ubuntu 12.04 ships 3.2.x).
For now I took a shortcut and disabled the power management on the wlan0 interface.
I’ve tweaked my vim color scheme quite a bit and tried to keep the colors of gvim (which I use less often) in sync.
This keeping in sync hasn’t worked out, so I wrote this little script to convert the vim colors to the gvim ones:
Download the makegvim script, and use it like:
$ ./makegvim < ~/.vim/colors/<yourfile> > /tmp/x $ mv /tmp/x ~/.vim/colors/<yourfile> And now the colors of gvim should be identical to those of vim.