[ cyb / tech / λ / layer ] [ zzz / drg / lit / diy / art ] [ w / rpg / r ] [ q ] [ / ] [ popular / ???? / rules / radio / $$ / news ] [ volafile / uboa / sushi / LainTV / lewd ]

tech - God bless the AMD

2nd chances
Name
Email
Subject
Comment
File
Password (For file deletion.)

BUY LAINCHAN STICKERS HERE

STREAM » LainTV « STREAM

[Return][Go to bottom]

File: 1436827338121.jpg (381.48 KB, 900x630, cyberpunk_girl_by_oligarch….jpg) ImgOps Exif iqdb

 No.8397[View All]

Let's help eachother make our Linux lives more comfy. Whether it be useful scripts, extensions\add ons, programs, or commands.

I'll start with some Gnome extensions.

Force Quit adds an "X" on your top bar that you can click and then click on an application to force quit it. A quick xkill button https://extensions.gnome.org/extension/770/force-quit/

Imgur Screenshot Uploader lets you take a screenshot of your whole screen, A window, or an area you select and then auto upload it to imgur and provide you a link so you can quickly share screenshots
https://extensions.gnome.org/extension/683/imgur-screenshot-uploader/

Show Desktop from Overview lets you click on an empty space when you open the overview "by pressing the window\super key" to hide all open windows and show you the desktop.
https://extensions.gnome.org/extension/496/show-desktop-from-overview/

Shellshape is one of my favorites. It automatically tiles all your open windows and resizes your windows once you open and close one.
https://extensions.gnome.org/extension/294/shellshape/

and the final one brings tons of options like adding an icon for every application you have running on you top bar, adding a show desktop button, workspace switcher, and some other things I don't use.
https://extensions.gnome.org/extension/584/taskbar/

Something i've been looking for that I can't find is how to have my VPN connect on startup and kill my internet connection when its not running. I tried VPN Demon but that doesn't work very well.
99 posts and 15 image replies omitted. Click reply to view.
>>

 No.12487

File: 1445203125321.jpg (82.63 KB, 480x640, 1411849467446.jpg) ImgOps Exif iqdb

>be computer noob
>learning C
>writing programs in vim
>decide to give fizzbuzz a try
>succeed fairly quickly
>that feel when

Okay, I am by no means experienced in this coding business but what's all the fuzz with fizzbuzz?
I honestly didn't think it was this straightforwardly easy and I could probably clean the code up a bit but I already feel like a damn wizard.

Also, I found working in the Terminal loads of fun, I'm not sure if I really want to go back to Windows or OSX.

>>

 No.12488

File: 1445203758469.jpg (298.9 KB, 642x1832, 1443806320711.jpg) ImgOps Exif iqdb

Does someone know a browser turn rather on security (no cookie, noscript, control all the request, proxy management etc..) and mouseless interface than "i'm such a macfag" "olol cool interface"?

For the one which want a browser turn on emacs keybinding and keyboard: there is conkeror, which accept add-on like NoScript.

>>

 No.12489

>>12487
What this really means is that you're not retarded and have a mind for code.

It's not a "only wizards can do this", it's more of a " If you can't do this you should stop trying "

>>

 No.12490

>>12487
Didn't you see that article about a hipster web-dev that got mad when she didn't got hired after she couldn't make a simple fizzbuzz?

There are people like that, man. that's why fizzbuzz exists.

>>

 No.12492

>>12488
Firefox (or one of its forks) with the pentadactyl addon, will take the plugins but using them with the keyboard can suck.
Then there's qutebrowser, made to be used with the kb but the security parts are still in development.
And xombrero, but I don't know much about that one.

>>

 No.12494

>>12488
I use "dwb", it's no longer maintained, but I'm finding it a bit difficult to switch to another browser. It's for linux.

dwb can en/disable cookies, scripts, and plugins per session, per site, and even per url, mix at your liking.

dwb has vim-like keybinds for everything, Not just browsing around and managing tabs, but for example you can enable plugins on a particular URL for just this session with the 'ptu' keybind.
Tuning what scripts/plugins/cookies run when and your proxy management is all easily configured.

A couple of package managers have it available or you could grab it from bitbucket. Alternatively there's qutebrowser written in python which is a spiritual fork from dwb.

>>

 No.12495

>>9100
have frustrated me enough, this command can help me a lot.

>>

 No.12496

>>12494
Exactly what i'm looking for. Thanks you.
Just need to switch the keybinding to emacs-like keybinding.

>>

 No.12498

>>12480
learn to just roughly follow the line of calls through the mess and only go into detail where you actually want, not everywhere at once

that said, python is a black magic mess to me too

>>12494
nice tip

>>

 No.12508

>>9584

this broke for me recently, haven't been able to fix it. was very cool when it worked though

>>

 No.12522

>>12508
mps-youtube and youtube-dl break sometimes break for some sites when those sites change their APIs or something. You can try updating to the newest version in the repo or to the github version if your distro won't update stuff that often.

>>

 No.12536

>>10629
Maybe you mean HFS (http file server)?

>>

 No.12541

File: 1445286365027.png (295.69 KB, 1365x767, Zaznaczenie_008.png) ImgOps iqdb


I guess that is the right thread to ask about it. Tell me Lainons, can you be really productive in Vim when it comes to programing? Vim looks pretty neat but I'm not sure about it's functionality. Is it worth learning if I feel comfy in IDE like CodeBlocks? Also, I've moved back to Arch. Actually using MATE DE. Is this possible to use more lightweight environment and keep the look of my actual setup (pic rel)? I was using awesomewm and bspwm but everytime I come back to MATE.

>>

 No.12542

>>12541
>can you be really productive in Vim when it comes to programing?
Of course, thousands of people have done it before.

>Is it worth learning if I feel comfy in IDE like CodeBlocks?

Well, it depends. If Code::Blocks suits your needs, then it suits your needs. However, vim is a more ergonomic text editor if you take the time to learn it, and you also have the advantage of it being installed on virtually every system (and if it's not there, vi will be).

>>

 No.12553

>>12541
Advice you to go look at emacs.

>>

 No.12554

>>12541
Nice wallpaper could you post it so people could use it?

>>

 No.12571

What benefit does Antergos give me over regular Arch?

>>

 No.12577

File: 1445365008961.jpg (104.99 KB, 1920x1080, 36619_serial_experiments_l….jpg) ImgOps Exif iqdb

>>12554
No problem.

>>

 No.12578

>>12571
not as hard to setup, it "just werks"
You can also choose your DE/WM (out of 6) at installation.

Other than those two things, it's pretty much identical to Arch, it still uses yaourt, pacman, etc.

>>

 No.12586

>>12577
thank you! c:

>>

 No.12598

>>8405

That rtorrent pyroscope patch tho

>>

 No.12599

>>9614
Disagree with terminal emulator. I've been using one called xiate recently and was an avid urxvt user before, and I don't think I'm ever going back

>>

 No.12616

>>12494
I was using qutebrowser and just switched to dwb, there's a github version that's updated regularly.
Some fonts look ugly and I still haven't figured why, in github for example https://github.com/The-Compiler/qutebrowser the file names look blurry.

>>

 No.12619

>>12536
That wasn't the one I had seen but it does look similar for the client side, thanks.

>>

 No.13147

>>9047
this would be a great article for the lainzine 3.

>>

 No.13429

>>9100
how did you make this gif? looks very good

>>

 No.13434

>>13429
It's on the github page so I don't think he's the author, but you should be able to do it with a screen recorder (like recordmydesktop) and some video to gif converter (ffmpeg maybe?).

>>

 No.13908

I am close to being comfy.
All I need to do is pick some better colors on i3(I like light blue/cyan and orange). And I need to learn how to do window themes on i3.

>>

 No.13909

File: 1447599113362-0.png (29 KB, 500x574, HDD Space.png) ImgOps iqdb

File: 1447599113362-1.png (31.54 KB, 543x412, HDD Space2.png) ImgOps iqdb

>>13908
About 400GB of space on my HDD is missing. The data on the hard drive totals 1.6TB but the drive says only 10GB are available. I've checked SMART and it is enabled. Does anyone have any idea where it all went and how to get it back?

Posting here because this was the closest I could find to a dumb question thread

>>

 No.13931

I really love KDE Plasma 5.

Anyone know the distros that have the least problems with Plasma 5?

>>

 No.13932

>>13909
Maybe try checking with a different program (dfc or ncdu) and as root.

>>

 No.13933

>>13909
I had a similar problem when trying to format a 3tb hdd from NTFS to ext4. The total file storage capacity dropped to 2.7tb.

>>

 No.13938

>>8397
My life became really comfy when I changed to Debian Stable.
It might not have the newest versions but it does everything I need.
It never crashes nor receives breaking updates.
It literally just werks and is FOSS ootb.

>>

 No.14354

awesome thread, I got nothing to contribute with so I am bumping

>>

 No.14358

Two music-related scripts:

Coverart - gets file path to cover art in the folder of the currently playing song:

#!/bin/zsh
# coverart

DEFAULT_COVER="~/Music/cover.png"

MFILE=`mpc current -f %file%`
MFILE=${MFILE%/*}

FULLDIR="/home/$USER/Music/$MFILE"

COVERS=`ls $FULLDIR | grep "\.jpg\|\.png\|\.gif\|.jpeg"`
if [ -z $COVERS ]; then
COVERS="$DEFAULT_COVER"
else
TRYCOVERS=`echo "$COVERS" | grep "cover\|front\|folder\|albumart\|Cover\|Front\|Folder\|Albumart\|f\|F" | head -n 1`
TRYCOVERS="$FULLDIR/$TRYCOVERS"
fi

echo -n "$TRYCOVERS"


and musicupdate - displays music info + coverart via libnotify, if coverart is jpg, converts to png, so it works with dunst


#!/bin/bash
for (( ; ; ))
do
ART=`coverart`

old="`mpc | head -n 1`"
sleep 2
new="`mpc | head -n 1`"

if [ "`echo ${new} | grep volume | grep repeat | grep random`" != "" ] ; then
if [ "$old" != "$new" ] ; then
notify-send -t 5 "MPD Plauback stopped"
fi
old="$new"
fi
if [ "$old" != "$new" ] ; then

COVERART=`coverart`
artist="`mpc current -f %artist%`"
album="`mpc current -f %album%`"
year="`mpc current -f %date%`"
song="`mpc current -f %title%`"

title="$artist"
info="$album\n$year\n$song"

if [[ -f "$COVERART" ]] && \
! file --mime-type "$COVERART" | grep -q "image/png" || \
[[ $(identify "$COVERART"|awk 'sub("x.*","",$3) {print $3}') -gt 200 ]]; then # 200 = size of image (200x200) by default
file_name=$(basename "$COVERART")
file_name=${file_name%.*}
mkdir -p /tmp/notif-images
new_image=/tmp/notif-images/"${file_name}.png"
convert -resize 200x -format png "$COVERART" "$new_image"
else
# image is not jpg, no conversion required
new_image="$COVERART"
fi
notify-send -a "prepare_image" -u "normal" -i "$new_image" "$title" "$info"
fi
done

>>

 No.14359

File: 1448577922189.webm (903.8 KB, 1680x1050, ncmpcpp-coverart.webm) ImgOps iqdb

>>14358
and a webm of it in action

>>

 No.14408

File: 1448715354666.jpg (131.18 KB, 426x640, 2177024598_bbf115e7cc_z.jpg) ImgOps Exif iqdb

Just discovered detox.

http://detox.sourceforge.net/

It's been years now that I use a working but improvable bash script to rename my files without space or weird characters. I'm coming for you non UTF8 french and german characters. Your time is done.

>>

 No.14409

>>14359

Nifty. What is this bar at the top, the i3bar?

>>

 No.14414

>>14408
Non ASCII you mean? UTF8 contains frech and german characters.

I don't really see the utility to make file names less readable.

>>

 No.14421

>>14414
im not him but they dont become less readable

they become less unreadable because the shell autocompletion doesnt have to escape the spaces with "\" anymore

bla_bla_something
instead of
bla\ bla\ something

>>

 No.14452

>>14409
i3blocks

>>

 No.14458

>>12487
>Also, I found working in the Terminal loads of fun, I'm not sure if I really want to go back to Windows or OSX.

me too. i only recently got back into linux after a haitus of several years. I'm picking up much faster than I would've thought.

>>

 No.14506

>>8397
What is the best wallpaper manager for multi monitor systems using i3? For some reason nitrogen is not working.

>>

 No.14532

File: 1449029414522.png (7.83 MB, 3968x2960, desktop.png) ImgOps iqdb

I am working on my setup. I just moved my Windows and GNU/Linux installs onto separate SSDs, so hopefully my linux install will be more stable, and I will be able to use it 90% of the time.

I am really liking i3 with my monitors. I am still working on the config and rice.

>>

 No.14544

>>14506
I got it working. I had to add an exec for nitrogen to i3.

>>

 No.14563

I've been learning Bash lately, what's some cool stuff to do with it?
What do you often write scripts for?

>>

 No.14565

>>14563
What I like the most about bash is how you can just put cli commands in the scripts and execute them or use their output.
The script I write more often is
for i in *; do command "$i"; done
for extracting all files in a folder or things like that. You can also pipe stuff around to have progressbars and such fancy things.
I don't like how you end up using complicated regex sometimes if you want to select just a portion of text.

>>

 No.14571

>>14563
on the fly website blocker

#!/bin/bash

if [[ $EUID -ne 0 ]]; then
echo "Must run as root."
exit 1
fi
block_sites="reddit.com tumblr.com huffingtonpost.com google.com"

unblock_sites() {
echo "unblocking sites"
mv /etc/hosts.bak /etc/hosts
}

block_sites() {
if [[ ! -f /etc/hosts.back ]]; then
cp /etc/hosts /etc/hosts.bak || (echo "Uh oh, error backing up /etc/hosts. Exiting." ; exit 1)
fi
for site in $block_sites; do
echo "blocking $site"
echo "0.0.0.0 $site" >> /etc/hosts
done
}

if [[ -n $1 ]]; then
if [[ $1 == block ]]; then
block_sites
elif [[ $1 == unblock ]]; then
unblock_sites
fi
else
if [[ -f /etc/hosts.bak ]]; then
unblock_sites
else
block_sites
fi
fi


>>

 No.14572

>>14571
>>14563
Checks your current weather!

#!/bin/bash
#
# WTFPL 2015

LOCATION=KDAA
# station list at: http://www.rap.ucar.edu/weather/surface/stations.txt

NEW=$(wget -qO- "http://www.weather.gov/data/current_obs/${LOCATION}.xml"\
| sed -nr '/<(weather|temp_f)>/s/.*>(.*)<.*/\1/p' 2>/dev/null)
if [ "x$NEW" != x ]; then
NEW=$(echo "$NEW" | awk 'BEGIN{RS="";FS="\n"}{printf "%s %s\xb0",$1,$2}')
echo -e "$NEW F" | tr -d '°'
echo "" # an empty line flushes data inside i3blocks
fi


>>

 No.14588

There's something I want to do but don't know if it's possible or easy.
I want to disallow the loading of certain elements per website, for example don't show banners on lainchan, don't show the languages list on wikipedia, etc.
and maybe change things like background colors and such.
It would make browsing a lot more comfy and (I think) save a bit of bandwith.
Is it possible to download a site's CSS/HTML, modify it and tell the browser to load the site's content using that custom configuration?
There surely is a Firefox addon for this but I'm using dwb on arch.



Delete Post [ ]
[ cyb / tech / λ / layer ] [ zzz / drg / lit / diy / art ] [ w / rpg / r ] [ q ] [ / ] [ popular / ???? / rules / radio / $$ / news ] [ volafile / uboa / sushi / LainTV / lewd ]