Sunday, February 23, 2020

The Current Debian Desktop

Not much has changed this week... Switched to the Adapta Window Manager theme, and that's it.
I fucking love this setup and my Optiplex 755 + the Apple Cinema Display as my daily driver, comfy, practical and useful as hell.
As a side note, wttr.in has run out of available queries at the moment.

Labels: , , , , , , , , , , , , ,

Saturday, February 22, 2020

On The Dark Side of The Chrome

The GF got me onto this whole dark mode thing... I've played a bit with a couple of dark themes on Chrome before, but they put a bit of a strain on my crappy boxes, besides, they slowed a bit the browsing experience, so decided to wait until Chrome gets a native dark mode to use it day in day out.
Well, today out of the blue checked how was the native dark mode support on Linux doing, and lo and behold, it is here!

Launch Chrome like this:
/usr/bin/google-chrome-stable --force-dark-mode

But that is not enough. The Chrome interface will get dark, yes, but many, many websites will not.
In order to force a dark Chrome across the board, you'll also have to open the URL:

chrome://flags/

And set this two options:

Force Dark Mode for Web Contents -> Enabled
Prominent Dark Mode Active Tab Titles -> Enabled

Re-start Chrome to see the changes.

Labels: , , , , ,

Tuesday, February 11, 2020

Spotty WiFi with The Wireless 4965 AG or AGN

The internet browsing experience on the little Dell M1330 was beyond awful, slow, intermittent, etc, a real PITA.
So a big of Google, and then, the magic started...
Had to edit the file:

/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
And then reboot the little lappie.
The file ended up like this:

[connection]
## wifi.powersave = 3
wifi.powersave = 2
So, a reboot later, and things look much, much better... Will keep testing for a couple of days to see how this goes.

Labels: , , , , ,

Tuesday, December 31, 2019

It is All About Slash(es)


Stupid, simple, useful things you learn by total accident...
There is a "-p" flag for ls that adds a trailing slash to directories, making really easy to find if you're looking at a directory or a file.
Right now, my ls aliases looks like this:

alias ls='ls -CFp --color=auto'
alias lsa='ls -lshap --color=auto'
alias lst='ls -lshapt --color=auto'

Labels: , ,

Wednesday, December 18, 2019

OpenBSD Configs

My configs, or dot files, as the cool kids call them, from the OpenBSD setup I've made last week.

My .profile file:

## ----------------------------------------------
## $HOME/.profile from Thinkpad T60 - OpenBSD 6.6
## ----------------------------------------------

# $OpenBSD: dot.profile,v 1.5 2018/02/02 02:29:54 yasuoka Exp $
#
# sh/ksh initialization

PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:\
/usr/local/sbin:/usr/games
export PATH HOME TERM

## --------------------------------

ENV="$HOME/.kshrc" export ENV

## --------------------------------

## EoF ##


The K Shell config file:

## --------------------------------------------
## $HOME/.kshrc from Thinkpad T60 - OpenBSD 6.6
## --------------------------------------------

alias df='df -h'
alias du='du -sh'
alias j='jobs -l'
alias lsa='ls -lasht'

export VISUAL=mg
export EDITOR=$VISUAL
export PAGER=less
HISTSIZE=500
HISTFILE="$HOME/.ksh_history"
HISTEDIT=$EDITOR

set -o ignoreeof
set -o emacs

# Put the current directory and history number in the prompt
PS1='$_pwd [!]\$ '

## EoF ##

The Micro Emacs clone that ships with the Base install:
## --------------------------------------------
## $HOME/.mg from Thinkpad T60 - OpenBSD 6.6
## --------------------------------------------

## Create dir $HOME/.mg.d to store backups in one place
## Repeat this for root user
backup-to-home-directory

## EoF ##

The xsession file:

## -----------------------------------------------
## $HOME/.xsession from Thinkpad T60 - OpenBSD 6.6
## -----------------------------------------------

export ENV=$HOME/.kshrc

## Load X Window configurations
/usr/X11R6/bin/xrdb $HOME/.Xresources

## Sets the "wallpaper" as plain vanilla grey
## xsetroot -solid grey &

## Sets the "wallpaper" as a grey/ black/ white twatch
## xsetroot -gray &

xsetroot -cursor_name left_prt &
xclock -geometry 230x20-0-0 -fn 9x15 -strftime "%A %d %b %Y %H:%M" &

###################
## Window Managers:
###################

## Calm Window Manager
exec cwm

## Tab Window Manager
## twm

########
## XFCE:
########
## exec ck-launch-session startxfce4

## EoF ##

The Calm Window Manager config file, I picked this one from the internet, as it tries to mimics the way i3 works, specifically, its keyboard shortcuts: 

## --------------------------------------------
## $HOME/.cwmrc from Thinkpad T60 - OpenBSD 6.6
## --------------------------------------------

fontname "Ubuntu Mono:pixelsize=14"
gap 0 0 24 0
snapdist 4
moveamount 5
color activeborder "#4c7899"
color inactiveborder "#333333"
borderwidth 2

sticky yes

unbind-key all

bind-key CS4-q quit
bind-key CMS-r restart

bind-key 4-Return terminal
bind-key 4S-semicolon lock
bind-key 4S-Return window-hide
bind-key 4S-n window-menu-label
bind-key 4S-q window-delete

bind-key 4-1 group-only-1
bind-key 4-2 group-only-2
bind-key 4-3 group-only-3
bind-key 4-4 group-only-4
bind-key 4-5 group-only-5
bind-key 4-6 group-only-6
bind-key 4-7 group-only-7
bind-key 4-8 group-only-8
bind-key 4-9 group-only-9
bind-key 4S-1 window-movetogroup-1
bind-key 4S-2 window-movetogroup-2
bind-key 4S-3 window-movetogroup-3
bind-key 4S-4 window-movetogroup-4
bind-key 4S-5 window-movetogroup-5
bind-key 4S-6 window-movetogroup-6
bind-key 4S-7 window-movetogroup-7
bind-key 4S-8 window-movetogroup-8
bind-key 4S-9 window-movetogroup-9
bind-key 4-a group-toggle-all
bind-key 4-g window-group

bind-key 4S-f window-freeze
bind-key 4-s window-stick
bind-key 4-f window-fullscreen
bind-key 4S-m window-maximize
bind-key 4-equal window-vmaximize
bind-key 4S-equal window-hmaximize
bind-key 4s-v window-vtile
bind-key 4s-h window-htile

bind-key 4-d menu-exec
bind-key 4-slash menu-window
bind-key 4-Right group-cycle
bind-key 4-Left group-rcycle
bind-key 4-Down window-lower
bind-key 4-Up window-raise
bind-key 4-Tab window-cycle-ingroup
bind-key 4S-Tab window-rcycle-ingroup

bind-key 4CS-h window-resize-left
bind-key 4CS-j window-resize-down
bind-key 4CS-k window-resize-up
bind-key 4CS-l window-resize-right
bind-key 4S-h window-resize-left-big
bind-key 4S-j window-resize-down-big
bind-key 4S-k window-resize-up-big
bind-key 4S-l window-resize-right-big

bind-key 4C-h window-move-left
bind-key 4C-j window-move-down
bind-key 4C-k window-move-up
bind-key 4C-l window-move-right
bind-key 4-h window-move-left-big
bind-key 4-j window-move-down-big
bind-key 4-k window-move-up-big
bind-key 4-l window-move-right-big

bind-key 4-F1 window-snap-left
bind-key 4-F2 window-snap-down
bind-key 4-F3 window-snap-up
bind-key 4-F4 window-snap-right

bind-key 4S-F1 window-snap-up-left
bind-key 4S-F2 window-snap-down-left
bind-key 4S-F3 window-snap-up-right
bind-key 4S-F4 window-snap-down-right

bind-key 4C-w menu-exec-wm

unbind-mouse all
bind-mouse 4S-1 window-group
bind-mouse 4-1 window-move
bind-mouse 4-3 window-resize
bind-mouse 4-2 window-lower
bind-mouse 4S-3 window-hide

# External tools
command term "xterm"

## EoF ##

And this is the only configuration file that isn't on my $HOME...
I've edited in order to get rid of that pesky xconsole window that Xenocara starts by default

## -------------------------------------------------------------
## /etc/X11/xenodm/Xsetup_0 from from Thinkpad T60 - OpenBSD 6.6
## -------------------------------------------------------------

#!/bin/sh
# $OpenBSD: Xsetup_0,v 1.6 2019/06/29 13:33:06 espie Exp $

## 17/12/2019
## Comment to disable the permanent xconsole
## xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail

#  install package openbsd-backgrounds
#  then uncomment:
#
# if test -x /usr/local/bin/openbsd-wallpaper
# then
#       /usr/local/bin/openbsd-wallpaper
# fi

# sxpm OpenBSD.xpm &

Labels: , , , , ,

Wednesday, October 30, 2019

GenMon: Date Script (2)

A little enhancement on the previous script to show the date using GenMon on the XFCE Panel.
The script is basically the same, but this one has a couple of benefits as well.
Here is the script:

#!/usr/bin/env bash
echo """ | "$(date +"%A %d %b %Y")""
echo """"
echo ""xterm -hold -e /usr/bin/cal""
## EoF ##

And these are the benefits:
It prints the date on the format I like (plus a pipe for separation with other indicators) but also disables popup message when mouse over it and also, when clicked, it executes an term with a calendar showing the current date and month.


Labels: , , , , , ,

Tuesday, October 29, 2019

XFCE: Set Keyboard Layout and Disable Caps Locks


Usually set my keyboard layout and configuration by editing the file: /etc/default/keyboard, like this:

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT="alt-intl"
XKBOPTIONS="ctrl:nocaps"
BACKSPACE="guess"


But, and I really don't know why, this time on Buster it didn't work.
So, time for a Plan B... I had to do it using setxkbmap and setting it up thru Settings > Session and Startup > Application AutoStart and adding two entries, one for the language and other for the Caps Locks.
The entries look like this:

/usr/bin/setxkbmap -layout us -variant intl
/usr/bin/setxkbmap -option ctrl:nocaps

Labels: , , , , , ,

Tuesday, October 22, 2019

XFCE is Getting Quirky


Came up with this error (or warning) message while setting up the T60p with its new Sid install.
First time I see something like this, guess you could say that things are really getting classy on the Linux Desktop.

Labels: , , , , , ,

Thursday, October 17, 2019

GenMon: CPU temperature Script

Another script I'm using with Generic Monitor on the XFCE Panel.
This one prints the CPU temperature, but also disables any sort of output when you do a mouse over.

#!/bin/bash

cat /sys/class/thermal/thermal_zone0/temp > /tmp/cpu_temp
echo """ | "$((`cat /tmp/cpu_temp`/1000))"°"""
echo """"

## EoF ##

Labels: , , , , , , , ,

Tuesday, October 01, 2019

GenMon: Date Script

A little script I'm invoking via the Genmon plugin to print the current date on the XFCE Panel, it also prevents anything to show up when you do a mouse over on it.

#!/bin/bash
echo """ | "$(date +"%A %d %b %Y")""
echo """"

## EoF ##

The first empty string and the pipe are there for spacing between the different GenMon scripts I'm running on my Panel.

Labels: , , , , ,

Sunday, September 15, 2019

Google Chrome: Make it Display The Whole URL


That is, do not hide the effing protocol on the URL!!!
That drives me completely nuts, since the whole thing simple appears when you want to copy the damn URL.
The fix is rather simple, post this on the location box:

chrome://flags/#omnibox-ui-hide-steady-state-url-scheme

And set to "Disabled" the option 'Onmibox UI Hide Steady-State URL Scheme'.

Labels: , , ,

Saturday, September 07, 2019

GenMon: A Little Weather Script with Font Awesome Love Included


Started -once again- running XFCE on my beloved Optiplex 755 USFF, but got a couple of things I've "learned" while running i3 to the XFCE world.
Replaced -didn't even installed it- the plain vanilla Weather Plugin, with a little script that pulls the current weather from wttr.in and even a smaller one liner that actually prints it -of course, via GenMon- parses it just a little bit, and then adds a nice Font Awesome flair.
Not much, but I like it.

Labels: , , , , , , , , , ,

Tuesday, September 03, 2019

i3: Set a Floating Window Onto a Specific Positiion


This is the entry on my ~/.config/i3/config file that makes xcalc a floating window, and then places it on a specific place on the screen.

for_window [ title="SuperCalc" ] floating enable move right 930px,move down 870px

The window title ("SuperCalc" here) is provided by an entry on my ~/.Xresources file.

Labels: , , , ,

Saturday, June 29, 2019

Compton: Funky Double Shadow on Evolution menus

 

Started playing a bit with Compton, and I've noticed an annoying double shadow with the menus on Evolution (picture on the right).
To get rid of those, add this to the ~/.config/compton.conf file:

 "class_g ?= 'Evolution'",

On the shadow exclude options section of the configuration.
Close Evolution, restart Compton and start Evolution once again and the menus will have a proper drop shadow (picture on the left).
Be aware that after issuing this snip on the config file, you'll loose the drop shadow effect on all Evolution windows, but, IMHO, that's a small price to pay to get rid of that awful double shadow on menus.

Labels: , , , , , , ,

Wednesday, April 24, 2019

XFCE: Start Dropbox on Login

This drove me nuts, because it failed randomly, so, a quick one liner added to the Session Startup seems to take care of this problem.

Labels: , , , , , , , ,

Tuesday, November 27, 2018

Un-encrypt Your $HOME


This is how I move my $HOME from encrypted to un-encrypted,  in order to be able to keep using Dropbox... Yes, in the end, choose to keep it.
Done this on all of my Linux Mint boxes that had an encrypted $HOME (still running an encrypted LVM, tho).
- Login as your regular user thru GUI.
- Disable Dropbox autostart.
- Logout.
- Drop to a TTY, login as the root user .
- Issue: umount /home/$USER
- Edit the text file "/home/.ecryptfs/$USER/.ecryptfs/Private.mnt".
Change "/home/$USER" to "/home/$USER/Private"
- Issue:

mkdir /home/$USER/Private
chown $USER:$USER /home/$USER/Private
chmod 0700 /home/$USER/

- Reboot
- Login regular user (TTY), issue:

  shopt -s dotglob
  mv Private/* .

Be sure there is enough free space on the disk.
I have run out of space on a couple of boxes, no sweat, simply delete the partial one, and then move once again.

- Login thru GUI and start Dropbox, it'll force a re-connect thru the webfront once again and then sync everything, but not a download.

Labels: , , , , , ,

Tuesday, October 02, 2018

The Way of The Rsync

A day full of Rsync is a good day.
Backup review and testing day... Yeah... One of those days.
Slowly and one server at a time, the way to go thru this.

Labels: , , ,

Saturday, September 01, 2018

The Current LightDM Configuration

The custom Lightdm login window on my Debian Stretch lappie, the mighty T410.

All the magic is been done on the file:

/etc/lightdm/lightdm-gtk-greeter.conf

Here is the configuration script:

[greeter]
indicators=~clock;~spacer;~power;
transition-type=none 
background=#747C87
default-user-image=/home/XXXXXXXXXXXXX/Pictures/Login-Pics/greedo.jpg
theme-name=Minwaita
icon-theme-name=Papirus-GTK
panel-position=bottom
font-name=ubuntu
xft-antialias=true
xft-dpi=91
xft-hintstyle=slight
xft-rgba=vrgb
show-clock= true
clock-format=%F %H:%M
show-language-selector=false

## EoF ##

Labels: , , , ,

Tuesday, September 12, 2017

VLC: Shuffle a Playlist

If you are listening to a shit load of music like I'm doing right now, randomizing whatever you are listening to becomes more than a crucial thing.
VLC's random sucks, so Googling around found this little script: Shuffle Playlist.

It exactly what it says, shuffles the contents of a playlist, yes, random does that, but this script does that before playing the next random file, that is, shuffles the playlist and plays it the way it got randomized.
Download the file (16 KB, small) and copy it to:

~/.local/share/vlc/lua/extensions/

Since the directories "lua/extensions/" don't exist, create those:

mkdir -p ~/.local/share/vlc/lua/extensions/

Then start VLC and select View > Shuffle Playlist

Labels: , , , ,

Wednesday, August 23, 2017

LXDE Woes


I've been using a bit of tiny Lubuntu install on the small Dell XPS M1330 for the last week or so.
Things have been pretty much Ok with it, but there are a couple of things, small annoyances really, but annoyances nevertheless...

1- Emacs keybindings:
You can't setup global Emacs keybindings on LXDE.
You can, however, add this:

gtk-key-theme-name=Emacs

To the "~/.config/gtk-3.0/settings.ini" file.

2- Circle thru Desktop Pager on LXPanel:
I can't for the life of me, find a way to circle thru virtual desktops on the Desktop Pager, that is, when I reach the end of the desktops, I can't go back to the first one without going thru the previous ones.

No big deals, maybe... Maybe, yeah, but to me the lack of Emacs keybindings it is a major PITA, actually.

Labels: , , , , , , , , ,