Thursday, May 20, 2021

Firefox "minimize memory"

 One of the things I do is have a lot of open tabs, and firefox happily fills up all the available memory.

If you go to "about:memory" and click on "minimize memory usage" it will free up some much needed memory.

After clicking on this my total memory usage went from 31GB to 21GB.

Wednesday, April 28, 2021

Switching audio and adding a notification

 Once you get the audio switching working, it's nice to have a little bit of feedback, so add a little message with notify-send.

so CTRL+ALT+9 does

sh -c "pactl set-card-profile 0 output:hdmi-stereo;notify-send 'switch to hdmi'"


and CTRL+ALT+0 does:

 sh -c "pactl set-card-profile 0 output:analog-stereo; notify-send 'switch to headphone'"

Thanks to this page:

Thursday, April 8, 2021

Switching the audio from HDMI to headphones

One of the things I do too frequently is to switch from my headphone output to the hdmi output. It's too hard to use the control panel, I want a keystroke to do it: 

After wrestling with pactl awhile I got it working.


If you run "pactl list cards" It will show you a list of profiles:

 "pactl set-card-profile 0 output:hdmi-stereo" 

"pactl set-card-profile 0 output:analog-stereo" 

would switch between the different outputs, so just add some Keyboard Shortcuts in the Settings.

Tuesday, April 6, 2021

Sometimes I have to kill gnome shell

Using Ubuntu 20.04, sometimes the screen will go black and I can't do anything. I can still see my mouse pointer and move it around, I can drop to a text console with CTRL+ALT+F4 and back with CTRL+ALT+F2 but it's not working right. I've found that if I get to a text console and login and then find the number of the gnome-shell process with "ps -ax | grep gnome-shell" then "kill -9 " it will close the gnome-shell and after a few seconds the system will relaunch it, bringing the system back to normal. It doesn't always work, but sometimes it's a lifesaver when it goes non responsive and you can save what you were working on.

Friday, July 17, 2020

Search tabs in firefox with %

Here's something I'm using a lot.

If you type % in the location box, you can search among your open tabs.

This is really useful when you've got a lot of open tabs.

So if I want to find that usps tab, just type "%usps" for example, and it will show it in the drop down list.

I discovered this when moving the list all tabs button to the left side of the tabs using customize because it kept on disappearing from the right side of the tabs. When you click on the list all tabs, the second entry is search tabs and it puts a % into the location box.

Tuesday, April 21, 2020

Multi-monitor shortcuts under Ubuntu

One of the best things to know with Ubuntu and multi monitors is to know the shortcuts to move windows from monitor to monitor.

Shift+Windows key and arrows will move a window to a different monitor (in the direction of the arrow).

I guess Ubuntu's term for the windows key is Super, so Shift+Super+arrows.

My TV tends to shut itself off during power save so instead of turning it back on, I'll just shift the window I need back in view.

It beats typing "alt+spacebar then down arrow then down arrow and enter" to activate the window move operation and then using the mouse or arrow keys to bring it back into view.

I've been using ubuntu for years without knowing these useful keystrokes.

Monday, April 6, 2020

2mm leads from golf pencils

I had a couple of golf pencils that broke in half that exposed the lead inside. It's a 2mm lead so it doesn't fit anything, so how to use it?

At the Dollar Tree, they sell these neat colored pencils that use 2mm leads.

I thought, they're 2.0 mm so why not see if the lead fits, and sure enough it does. These pencils have a sharpener in the top so you can sharpen the tip of the lead.

So just break a golf pencil in half for a new lead.