The officially official Devuan Forum!

You are not logged in.

#1 2021-03-23 21:40:41

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Minimalism Tips

If anyone has some tips for those of us who prefer minimalism, post it here! big_smile

Here are a couple that I use, because I don't need a bloated video player like mpv or a bloated audio player like CMUS or MOC. tongue

I will leave out any scripts/aliases for simplicity/minimalism in this post, because it's about minimalism...LOLOLOL!!! tongue  I'll just give the basics...

1. Play your downloaded videos with ffmpeg/ffplay...

CD into (or open a terminal in) the folder containing the desired video to watch, and enter this command (as an example)...

ffplay the-name-of-your-video.mp4 

BAM!!! Your video plays.

2. Play your music folders with ffmpeg/ffplay...

CD into (or open a terminal in) the folder containing the desired music to listen to, and enter this command (as an example)...

for f in *.mp3 ; do ffplay -nodisp -autoexit "$f"; done

BAM!!! Your music plays.

The player will automatically move to the next song and quit when finished playing the files; however, you do have a little bit of...minimalistic control wink ...

CTRL + C = move to next song
CTRL + Z = stop the player

Have more than one folder in the folder you want to listen to? Enter this command (as an example)...

for f in */*.mp3 ; do ffplay -nodisp -autoexit "$f"; done

BAM!!! It will play each folder. It will move from one folder to the next as each folder finishes.

smile


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#2 2021-03-23 23:02:53

zapper
Member
Registered: 2017-05-29
Posts: 967  

Re: Minimalism Tips

If you consider moc to be bloated, I wonder what you would think of vlc and smplayer... tongue

Thank you though for the info! Will try it.


Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term  If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Peace Be With us All!

Offline

#3 2021-03-24 12:22:56

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Minimalism Tips

zapper wrote:

If you consider moc to be bloated, I wonder what you would think of vlc and smplayer... tongue

Hahaha! I was just kidding around about the bloat.

Actually, MOC is my preferred audio player...I like it so much that I made my own theme for it. big_smile

...and VLC...I always install it. It has too many useful tools in its arsenal not to have it on my system. wink


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#4 2021-03-24 13:13:16

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: Minimalism Tips

Instead of bloaty gui text editors use ed.

https://www.gnu.org/software/ed/manual/ed_manual.html

Instead of bloaty password managers use pass

https://www.passwordstore.org/

Offline

#5 2021-03-24 15:41:40

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Minimalism Tips

dice wrote:

Instead of bloaty gui text editors use ed.

Much as I love ed it is also bloat if you just want to create new files:

tee /path/to/file <<!
blah
blah
blah
!

Or

cat > /path/to/file <<!
blah
blah
blah
!

I prefer tee because it can be prepended with sudo (or doas) if you want to create system files as your normal user. See also https://xkcd.com/378/

And one from me: instead of bloated wallpaper programs to cycle the desktop background every ten minutes just add this one-liner to ~/.xsessionrc:

while true; do feh --bg-fill --randomize /path/to/wallpaper/directory; sleep 600; done &

EDIT: and use mksh instead of bloated bash!

Last edited by Head_on_a_Stick (2021-03-24 15:44:24)


Brianna Ghey — Rest In Power

Offline

#6 2021-03-24 16:54:22

Ogis1975
Member
Registered: 2017-04-21
Posts: 307  
Website

Re: Minimalism Tips

Thank you so much for your valuable information, MiyoLinux!

Last edited by Ogis1975 (2021-03-24 17:07:26)


What economists call over-production is but a production that is above the purchasing power of the worker, who is reduced to poverty by capital and state.
            ----+- Peter Kropotkin -+----

Offline

#7 2021-03-24 17:22:46

manyroads
Member
From: 20 Jan 2021 ~ "Free at last"
Registered: 2020-08-18
Posts: 73  
Website

Re: Minimalism Tips

It may be that some of these suggestions are beyond minimalism and solidly into subminimalism.  wink


Pax vobiscum,
Mark Rabideau - ManyRoads
i3wm, bspwm, dkwm, dwm, hlwm, sway, openbox on Sid/ ceres ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken

Offline

#8 2021-03-24 17:29:23

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Minimalism Tips

I think ffplay is also bloat, at least for music files:

for f in */*.wav; do aplay "$f"; done

Brianna Ghey — Rest In Power

Offline

#9 2021-03-24 20:19:44

greenjeans
Member
Registered: 2017-04-07
Posts: 541  
Website

Re: Minimalism Tips

Dang, some of you guys really like it minimal!

My full-size Vuu-do iso is only around 560 mb, my style of minimalism is to get rid of mountains of useless cruft i'll never use or need. And believe me, there's a LOT! Too much to detail really.

Here's one I use, instead of loading a calendar program, if you just want a simple basic calendar for Tint2 , enter this in the slot for it in the Tint2 config gui:

yad --calendar --undecorated --button=gtk-close:0 --skip-taskbar --borders=5 --posx=-1 --posy=-1 --width=300 --on-top

https://sourceforge.net/projects/vuu-do/
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.

Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#10 2021-03-25 14:41:30

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: Minimalism Tips

Head_on_a_Stick wrote:
dice wrote:

Instead of bloaty gui text editors use ed.

Much as I love ed it is also bloat if you just want to create new files:

tee /path/to/file <<!
blah
blah
blah
!

Or

cat > /path/to/file <<!
blah
blah
blah
!

I prefer tee because it can be prepended with sudo (or doas) if you want to create system files as your normal user. See also https://xkcd.com/378/

And one from me: instead of bloated wallpaper programs to cycle the desktop background every ten minutes just add this one-liner to ~/.xsessionrc:

while true; do feh --bg-fill --randomize /path/to/wallpaper/directory; sleep 600; done &

EDIT: and use mksh instead of bloated bash!

Possibly but ?

~ $ ed
a
blah
blah
blah
.
w blah.txt
10
q

There is also echo.

echo $'blah\nblah\nblah\n' > blah.txt

With ed i couldnt find out how to go recursive like say create a file to ~/Documents, you have to be in the directory first.

Last edited by dice (2021-03-25 15:21:23)

Offline

#11 2021-03-25 18:14:20

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Minimalism Tips

dice wrote:

Possibly but ?

Bloat!

$ ls -l /bin/ed
-rwxr-xr-x 1 root root 55368 Jan 19 07:39 /bin/ed
$ ls -l /bin/tee
-rwxr-xr-x 1 root root 39080 Mar  6  2020 /bin/tee
$

tongue


Brianna Ghey — Rest In Power

Offline

#12 2021-03-25 20:44:56

MiyoLinux
Member
Registered: 2016-12-05
Posts: 1,323  

Re: Minimalism Tips

Head_on_a_Stick wrote:

I think ffplay is also bloat...

Despite HoaS's aversion to the bloatiness of ffplay, here's another one tongue ...

Don't use a bloated webcam app like guvcview, cheese, etc., just use ffplay...

ffplay -f v4l2 -noborder -video_size 320x240 -i /dev/video0

If you want a titlebar, leave -noborder out of the command. wink


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#13 2021-03-25 23:30:33

alphalpha
Member
From: Germany
Registered: 2018-01-23
Posts: 146  

Re: Minimalism Tips

Head_on_a_Stick wrote:

I think ffplay is also bloat, at least for music files:

for f in */*.wav; do aplay "$f"; done

i dont think anyone that fell for the bloat meme has is music in *.wav format

MiyoLinux wrote:

Don't use a bloated webcam app like guvcview, cheese, etc., just use ffplay...

saved
here is a similar one for screenshots, but is is not as fast as a real screenshot programm

ffmpeg -f x11grab -r 1 -s "$(xdpyinfo | awk '/dimensions/ {print $2}')" -i :0.0  "$(date +Screenshot-%Y-%m-%d_%H-%M-%S).png"

i recently found svgcleaner, it saved over 7MB in my /usr/share/icons
also if you use rust programms, you can get them significantly smaller if you build them with a new rust version and not the one from the repositry

Offline

#14 2021-03-26 02:53:02

andyprough
Member
Registered: 2019-10-19
Posts: 327  

Re: Minimalism Tips

Head_on_a_Stick wrote:

I think ffplay is also bloat, at least for music files:

for f in */*.wav; do aplay "$f"; done

Ouch!! That's nasty! You should warn someone before sharing commands like that.

Offline

#15 2021-03-26 08:30:20

steve_v
Member
Registered: 2018-01-11
Posts: 381  

Re: Minimalism Tips

andyprough wrote:

You should warn someone before sharing commands like that.

Or, someone should think before copy-pasting commands from a forum.

greenjeans wrote:
yad --calendar --undecorated --button=gtk-close:0 --skip-taskbar --borders=5 --posx=-1 --posy=-1 --width=300 --on-top

Bloat!

$ cal
     March 2021     
Su Mo Tu We Th Fr Sa
    1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

See, I can play this silly game too tongue

Last edited by steve_v (2021-03-26 08:57:44)


Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Offline

#16 2021-03-26 08:40:06

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: Minimalism Tips

Doing basic math in the bash shell.

# Subtraction
[me@linux ~]$ expr 1 - 1
0
# Addition
[me@linux ~]$ expr 1 + 1
2
# Assign result to a variable
[me@linux ~]$ myvar=$(expr 1 + 1)
[me@linux ~]$ echo $myvar
2
# Addition with a variable
[me@linux ~]$ expr $myvar + 1
3
# Division
[me@linux ~]$ expr $myvar / 3
0
# Multiplication
[me@linux ~]$ expr $myvar \* 3
6

https://www.shell-tips.com/bash/math-ar … lculation/

Offline

#17 2021-03-26 10:19:59

Nili
Member
From: $HOME/♫♪
Registered: 2016-12-01
Posts: 230  
Website

Re: Minimalism Tips

3 month calendar with auto close after 60sec.

x-terminal-emulator -title Calendar -geometry 56x10+720+19 -e sh -c 'ncal -3 && sleep 60'

shuffle playing audio/video with mpv

x-terminal-emulator -title mpv--shuffle-playing... -geometry 170x30+0+19 -e mpv --shuffle /music/folder/directory/

set a desktop background with feh, the same code may be used on a wm config to change the image via keyboard/mouse.

feh --randomize --no-fehbg --bg-scale /image/folder/directory/*

Last edited by Nili (2021-03-26 10:21:36)


Tumbleweed - KDE Plasma (Wayland) - Breeze (LeafDark) [Qt]
♪Mahara★Japaaan!

Offline

#18 2021-03-26 11:01:12

yeti
Member
From: I'm not here: U R halucinating
Registered: 2017-02-23
Posts: 334  

Re: Minimalism Tips

dice wrote:

Doing basic math in the bash shell.

BASH can do "more readable" than expr:

#!/bin/bash
#
# ###surprise### in bash
#
# 20131116      start.
#

((xmin=-8601))  # int(-2.1*4096)
((xmax=2867))   # int( 0.7*4096)

((ymin=-4915))  # int(-1.2*4096)
((ymax=4915))   # int( 1.2*4096)

((maxiter=30))

((dx=(xmax-xmin)/72))
((dy=(ymax-ymin)/23))

C='.-+co%#'
((lC=${#C}))

for((cy=ymax;cy>=ymin;cy-=dy)) ; do
        for((cx=xmin;cx<=xmax;cx+=dx)) ; do
                ((x=0))
                ((y=0))
                ((rsq=0))
                for((iter=0;iter<maxiter && rsq<=16384;iter++)) ; do
                        ((xn=((x*x-y*y)>>12)+cx))
                        ((yn=((x*y)>>11)+cy))
                        ((x=xn))
                        ((y=yn))
                        ((rsq=(x*x+y*y)>>12))
                done
                ((c=iter%lC))
                echo -n "${C:$c:1}"
        done
        echo
done

*𝚛𝚒𝚋𝚋𝚒𝚝!*

Online

#19 2021-03-26 11:19:28

yeti
Member
From: I'm not here: U R halucinating
Registered: 2017-02-23
Posts: 334  

Re: Minimalism Tips

AWK... or: Sometimes minimalism looks like luxury.

#!/usr/bin/awk -f
# ncomm-1565083172
BEGIN {
	if(ARGC<2) {
		print "usage: ncomm list_1 ... list_N" >"/dev/stderr"
		exit(1)
	}
	for(i=1;i<ARGC;i++) {
		print s ARGV[i]
		s=s"| "
		while((rc=getline < ARGV[i])>0) { P[$0]++ ; f[$0,i]++ }
		if(rc<0) {
			print "ncomm: read error in file: "ARGV[i] >"/dev/stderr"
			exit(2)
		}
	}
	print s
	c="sort | cut -d/ -f2-"
	for(i in P) {
		printf i"/" | c
		for(n=1;n<ARGC;n++) printf f[i,n]?"+ ":"· " | c
		print i | c
	}
	close(c)
}

E.g.: For hunting differences in packages lists of multiple Devuan installs:

$ ncomm packages.pi1-0 packages.pi2-0 packages.pi3-0 | awk 'NR<5||/init/'
packages.pi1-0
| packages.pi2-0
| | packages.pi3-0
| | | 
· · + init 1.24+devuan1.0 
+ + · init 1.46+devuan1.0 
· · + initramfs-tools 0.120+deb8u2 
+ · · initramfs-tools 0.130 
+ · · initramfs-tools-core 0.130 
+ + + initscripts 2.88dsf-59.3+devuan2 
· · + init-system-helpers 1.24+devuan1.0 
+ + · init-system-helpers 1.46+devuan1.0 
+ + + sysvinit 2.88dsf-59.3+devuan2 
+ + + sysvinit-core 2.88dsf-59.3+devuan2 
· · + sysvinit-utils 2.88dsf-59.2+devuan2 
+ + · sysvinit-utils 2.88dsf-59.3+devuan2 

AWK is omnipresent, even in systems based on busybox (OpenWrt) and often can replace whole spreadsheets.  Learning to do do some basic stuff in AWK takes only some few hours and pays back fast.

Last edited by yeti (2021-03-26 11:21:14)


*𝚛𝚒𝚋𝚋𝚒𝚝!*

Online

#20 2021-03-26 18:18:30

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Minimalism Tips

alphalpha wrote:

i dont think anyone that fell for the bloat meme has is music in *.wav format

CODECs are bloat!

dice wrote:

Doing basic math in the bash shell.

Or use a better shell that can actually handle floating point arithmetic:

% echo $SHELL
/bin/zsh
% echo $((1.0/2.0))
0.5
%

Brianna Ghey — Rest In Power

Offline

#21 2021-03-26 18:39:05

yeti
Member
From: I'm not here: U R halucinating
Registered: 2017-02-23
Posts: 334  

Re: Minimalism Tips

Or use a nice and easy language that was made especially for numbercrunching:

#!/usr/bin/dc -f
_2.1sx0.7sX_1.2sy1.2sY32sM72sW23sH8k[q]sq0sh[lhlH=q0sw[lwlW=qlXlx-lW1-/
lw*lx+sRlYly-lH1-/lh*ly+sI0sr0si0sa0sb0sm[lmlM=qlalb+4<q2lr*li*lI+silalb
-lR+srlm1+smlr2^sali2^sbl0x]s0l0xlm32+Plw1+swl1x]s1l1xAPlh1+shl2x]s2l2x

smiley_emoticons_frankenstein_lol.gif


*𝚛𝚒𝚋𝚋𝚒𝚝!*

Online

#22 2021-03-27 05:30:23

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: Minimalism Tips

Head_on_a_Stick wrote:
dice wrote:

Doing basic math in the bash shell.

Or use a better shell that can actually handle floating point arithmetic:

% echo $SHELL
/bin/zsh
% echo $((1.0/2.0))
0.5
%

That is a drawback to bash and math, but one could always use bc.

~ $ echo "scale=2; 1.0 / 2.0" | bc
.50

Offline

#23 2021-03-27 07:14:08

yeti
Member
From: I'm not here: U R halucinating
Registered: 2017-02-23
Posts: 334  

Re: Minimalism Tips

dice wrote:
~ $ echo "scale=2; 1.0 / 2.0" | bc
.50

Back to the roots...

$ dc -e '2k 1.0 2.0 / f'
.50

—▷ wikipedia://Bc_(programming_language)#History


*𝚛𝚒𝚋𝚋𝚒𝚝!*

Online

#24 2021-03-27 08:17:13

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: Minimalism Tips

bc is bloat!

Sorry, I'll stop now...


Brianna Ghey — Rest In Power

Offline

#25 2021-03-27 13:55:21

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: Minimalism Tips

yeti wrote:

Or use a nice and easy language that was made especially for numbercrunching:

#!/usr/bin/dc -f
_2.1sx0.7sX_1.2sy1.2sY32sM72sW23sH8k[q]sq0sh[lhlH=q0sw[lwlW=qlXlx-lW1-/
lw*lx+sRlYly-lH1-/lh*ly+sI0sr0si0sa0sb0sm[lmlM=qlalb+4<q2lr*li*lI+silalb
-lR+srlm1+smlr2^sali2^sbl0x]s0l0xlm32+Plw1+swl1x]s1l1xAPlh1+shl2x]s2l2x

http://www.greensmilies.com/smile/smile … in_lol.gif

What shape is that? Looks like a stingray maybe?

Last edited by dice (2021-03-27 13:56:13)

Offline

Board footer