Skip to content

u/chaspum

In this archive from Jun 2016 to Aug 2020

1
posts
38
comments
0
media
71
score

I have not seen these mentioned, so what I have been using for years:

  • Any terminal emulator, with my shell (zsh/bash) config with tmux: tmux allows me to have whatever I need for my local terminal management without having to care about anything else (except clipboard support with xsel/xclip).
  • Openbox: a very simple WM that does the trick for me, I use it at work too. I have been telling myself that I have to try i3 but I never really felt the need, so I just kept using Openbox. The problem I see with Openbox is that I think it does not have support for wayland (as i3 does). For the programs that form the Desktop Environment, like the file manager I just install Mate and use those (I like the old Gnome2 way). XFCE is also a great light DE you can use a WM with.
  • My editor is vim: I have written all my computer degree papers (several being over 200 pages) in vim and I love it. The key is practice and some plugins are awesome once you have enough practice with the basics. But just use whatever you are comfortable with.
1 points

You did not specify if comp.pkglist is in /tmp, in which case you would have to grep with something like

find /tmp -type f -not -name 'comp.pkglist' -exec grep -i tzdata {} \; 2> /dev/null

Is not clear what the format of your file is. Here it appears in one line, but I am guessing each package has a line. If so I think the easiest way is to replace the whole line, because there is nothing to save from the line in comp.pkglist, because there is no field that exists in that old line but not in the new line.

Another issue is that the name of the package could contain '-'. If that is the case you would need to make sure that all the package names extracted are unique. You could extract the names with something like

awk '{print $3}' comp.pkglist |awk -F '-' '{print $1}'

Instead of overwriting comp.pkglist is probably a better idea to write in a different file and replace it at the end (in which case you may need to exclude it from the search command if is in /tmp too). And what is left is to wrap it with some shell and loop around the packages found (this depends of your case), for example like this

packages="$(awk '{print $3}' comp.pkglist |awk -F '-' '{print $1}')"
if [[ -n `uniq -c <<< "$packages" |awk '$1!="1" {print $0}'` ]]; then
	echo "There are these repetitions in package names:"
	uniq -c <<< "$packages" |awk '$1!="1" {print $0}'
else
	files="$(find /tmp -type f -not -name 'comp.pkglist' -and -not -name 'output-file' 2> /dev/null)"
	rm -f output-file #just in case
	while read -r i; do
		while read -r f; do
			\grep -Ii "$i" "$f" >> output-file 2> /dev/null 			#-I ignores binaries
		done <<< "$files"
	done <<< "$packages"
	#mv -f output-file comp.pkglist 									#if all is ok
fi

If there are more than a file for each package with different versions and you need the last you would have to change it to get the latest. You can get the version and release fields with something like

awk -F 'Version Change:' '{print $2}' comp.pkglist |awk -F '-->' '{print $2}' |awk '{print $1}'

awk -F 'Release Change:' '{print $2}' comp.pkglist |awk -F '-->' '{print $2}' |awk '{print $1}'
1 points

I bought one long ago (a FS3-P) and in the end I gave up and programmed it in windows with the program that came with the footswitch (this didn't even work in a virtual machine). Once programmed it works everywhere. Anyway I haven't used the footswitch again in years, but good look.

2 points

In general:

Search and search, most questions have been asked lots and lots of times. Search both the internet and your computer (eg man pages).

The more you know the more you will understand. A lot of stuff just clicks when you know enough.

For the command line:

-Install zsh. Special aliases and the its easy tab-completion are sick.

-Install Prezto (I use zgen, but this is easier for beginners)

-Use productivity boosters, like fasd: from Prezto or install it

-Don't be afraid of using alias, functions, customization in general.

-When you are used to this learn tmux (I prefer it to screen)

-More stuff: rsync, the fuck, sshrc, autoenv, tmuxinator, autokey, Xmodmap, unp (or any other tool to auto-uncompress), nohup

3 points

I agree is kind of a mess, but actually I have never had any problems with it.

About the closing tmux and losing what you just yanked you can copy to the clipboard with copy-pipe (but I does not support the copy-selection -x option to stay in place :( ) so you can avoid losing it after closing the window.

I have used a clipboard history manager before but I don't anymore, just using vim registers most of the time.

2 points

I think is because the way to write the configuration changed with versions, that's why is reporting an error due to the structure. You can still ignore it by rewriting the file while running conky (there is no need to change its contents) so it will reload and ignore this error.

You could also adapt whatever you want to the new style.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.