In the middle of the desert you can say anything you want
According to the docu it should be this, not working for me:
plt.ion()
Somehow it magically worked before without any changes from my side actually. Anyway, this1 worked:
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
I can’t start everything from within i3 config. keynav
doesn’t work (though it’s running), and compton creates a black strip in the bottom monitor when started as exec compton
via i3. Though executing a startup script from within i3, a script starting everything else I need, somehow works. I remember dealing with this in the past, and this created the current chaotic setup.
Startup script (./s/s.sh
)
:
setxkbmap -option -option 'grp:rctrl_toggle, compose:rwin, compose:paus' v5,ruua
xmodmap ~/s/mod4
xcape -e 'Control_L=Escape' -t 100
autorandr -l home
feh --bg-center ~/s/bg.jpg ~/s/bg.jpg
compton
keynav
i3 config startup script:
exec ~/s/s.sh
exec --no-startup-id redshift
exec --no-startup-id nm-applet
I had this, but it started too often by error.
:W sudo saves the file
" command W w !sudo tee % > /dev/null
Added this in a modified sh-trapd00r theme:
dir_status="%{$c1%}%* %B%7c/ %?"
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${ret_status}%{$reset_color%}
%{$fg_bold[green]%}> %{$reset_color%}'
loginctl
as a way to manage sessions of logged in usersInstead of killing all processes belonging to someone, loginctl
will return all sessions, and loginctl kill-session $number
will log the user off!
Set my old Lain background with feh. I should look at some of my old i3 settings etc, to make it look different from the work one.
tmux
or screen
well
vim
much better
w/E
etcxinput float ..
)arandr
-ing every time(was curious about the name of a PPA)
Test config file:
displays:
- name: eDP-1
workspaces: [1, 0]
randr_extra_options: "--primary --mode 2560x1440"
- name: HDMI-2
workspaces: [2, 3, 4]
randr_extra_options: "--above eDP-1"
This is even better than the above: phillipberndt/autorandr: Auto-detect the connected display hardware and load the appropriate X11 setup using xrandr
It saves configs readably and automatically to ~/.config/autorandr/config
Very simple config:
gaps inner 10
gaps outer 10
Installed compton
to get transparent terminals.
Added this to kitty config:
background_opacity 0.8
When using public key and ssh for git, when you can’t use ssh-add ...
, this works:
GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example" git clone example
3
I can happily use plt.plot()
/plt.imshow()
inside the <Alt-F8>
and debugger console windows, it’ll be shown!
Replace -user root
with source user, $USER
expands to user currently running command:
sudo find ~ -type d -user root -exec sudo chown -R $USER: {} +
In line with Day 784 about unmounting broken endpoints, yesterday I got a lot of errors (thunar
didn’t start, I blamed memory, but df -h
also didn’t start…), at the end the issue was with a sshfs directory:
fuse: bad mount point
./mountpoint’: Transport endpoint is not connected`
Using day 784 didn’t help, still got the above error. This helped:
fusermount -uz myserver
Also, TODO: Why doesn’t linking stuff like this work?
{%raw%}
[Day 784]({% post_url 2021-02-23-day784.markdown %})
{%endraw%}
a is True
is false for a numpy array of one element a
, even if it’s value is True. a == True
works correctly. Why does this happen?
You can use the console not just to look for output, but to interact with the variables etc! Why didn’t I think of this before: Using Debug Console | PyCharm
I like giving code examples in C++, Java and Python for the same help topic! OpenCV: Creating Bounding boxes and circles for contours
(22:31:53/11773)~/$ xinput list-props 15
Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (170): 1
Coordinate Transformation Matrix (172): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (304): 1
Device Accel Constant Deceleration (305): 2.500000
Device Accel Adaptive Deceleration (306): 1.000000
Device Accel Velocity Scaling (307): 12.500000
Synaptics Edges (327): 1574, 5368, 1408, 4444
Synaptics Finger (328): 25, 30, 0
Synaptics Tap Time (329): 180
Synaptics Tap Move (330): 248
Synaptics Tap Durations (331): 180, 180, 100
Synaptics ClickPad (332): 1
Synaptics Middle Button Timeout (333): 0
Synaptics Two-Finger Pressure (334): 282
Synaptics Two-Finger Width (335): 7
Synaptics Scrolling Distance (336): 112, 112
Synaptics Edge Scrolling (337): 1, 0, 0
Synaptics Two-Finger Scrolling (338): 1, 0
Synaptics Move Speed (339): 1.000000, 1.750000, 0.035417, 0.000000
Synaptics Off (340): 0
Synaptics Locked Drags (341): 0
Synaptics Locked Drags Timeout (342): 5000
Synaptics Tap Action (343): 2, 3, 0, 0, 1, 3, 0
Synaptics Click Action (344): 1, 3, 0
Synaptics Circular Scrolling (345): 0
Synaptics Circular Scrolling Distance (346): 0.100000
Synaptics Circular Scrolling Trigger (347): 0
Synaptics Circular Pad (348): 0
Synaptics Palm Detection (349): 0
Synaptics Palm Dimensions (350): 10, 200
Synaptics Coasting Speed (351): 20.000000, 50.000000
Synaptics Pressure Motion (352): 30, 160
Synaptics Pressure Motion Factor (353): 1.000000, 1.000000
Synaptics Resolution Detect (354): 1
Synaptics Grab Event Device (355): 0
Synaptics Gestures (356): 1
Synaptics Capabilities (357): 1, 0, 0, 1, 1, 1, 1
Synaptics Pad Resolution (358): 54, 45
Synaptics Area (359): 0, 0, 0, 0
Synaptics Soft Button Areas (360): 3471, 0, 4054, 0, 0, 0, 0, 0
Synaptics Noise Cancellation (361): 28, 28
Device Product ID (297): 2, 7
Device Node (296): "/dev/input/event5"
(22:31:59/11774)~/$ xinput set-prop 15 349 1
If there are too many people with video on, Google Hangouts moves the ones who talk closer to the beginning, making them visible?
Got bitten yet again when copypasting them - the name of one of them had four leading tabs. THAT DIDN"T GET SHOWN UNTIL I TRIED TO EDIT THE ENVIRONMENT VARIABLE IN THE PYCHARM WINDOW - it removes them when visualizing. Why? (The parameter of the last one had a trailing space too)
-0.0
exists as float, and gets stored like this. Though it’s not less than 0 or +0.0. Can’t easily google a way to detect if it’s a negative 0 or not.
Aesthetically very pleasant category: Category:SVG signatures of musicians - Wikimedia Commons
GitHub - Nukesor/pueue: Manage your shell commands. (thank you AA)
GitHub - kettanaito/naming-cheatsheet: Comprehensive language-agnostic guidelines on variables naming. Home of the A/HC/LC pattern. (thank you AA)
From it:
Name | Prefix | Action (A) | High context (HC) | Low context (LC) |
---|---|---|---|---|
getUser |
get |
User |
||
getUserMessages |
get |
User |
Messages |
|
handleClickOutside |
handle |
Click |
Outside |
|
shouldDisplayMessage |
should |
Display |
Message |