Skip to content

u/suchtie

In this archive from Aug 2013 to Mar 2024

5
posts
302
comments
3
media
1.7k
score

I use a mode for that in i3.

# POWER MODE
set $power "power: (l) logout (s) shutdown (r) reboot"
mode $power {
    bindsym l exec i3-msg exit, mode "default"
    bindsym s exec systemctl poweroff, mode "default"
    bindsym r exec systemctl reboot, mode "default"
    bindsym Return mode "default"
    bindsym Escape mode "default"
}
bindsym $mod+p mode $power
2 points

(beware, wall of text incoming)

i3 is a good start because it's easy to understand for most people who have never used a tiling wm before. It also has sane defaults and an uncomplicated config file.

The first thing you should know about WMs is that they do not come with any of the niceties that a full desktop environment (DE) offers. A WM does nothing but manage your windows, so you have to build your own environment. But this is also the main reason people use them: you sacrifice user-friendliness and accessibility for a completely custom-made workflow where everything looks and works exactly the way you want it to. But it requires a lot of work to get to that point.

To begin with, you should have at least basic CLI knowledge, i.e. you should know how to navigate folders and move/copy/delete/edit files in a terminal. Tiling wms are mostly used by heavy terminal users, or people who want to learn to use the CLI more, because tiling wms are great for a CLI-only workflow. You can still use some graphical software if you want though.

Some things you'll need to have installed alongside i3:

  • terminal emulator - whatever your current DE uses is fine. If you want something nicer, I recommend alacritty.
  • application launcher - dmenu or rofi. I'd recommend dmenu for starters, it's very simple and i3 uses it in its default config.
  • optionally, a file manager - ranger for CLI, or a graphical file manager. Whatever your DE comes with is probably fine. Or just use standard shell commands.
  • text editor - CLI or graphical doesn't matter. If you use a graphical file manager, you'll want a graphical editor as well; again, you can just use whatever your DE came with. For CLI, I use vim, but that's not easy to use for a beginner - nano is fine.
  • notification daemon (dunst) so that apps can send desktop notifications
  • if you have more than 1 screen, you'll want arandr to easily configure your screen layout
  • if you want to have a desktop background picture, install feh.

And of course, you should keep the i3 documentation handy, perhaps on your phone.

After starting i3 for the first time, you'll be presented with a dialog window that has you set a few options; the most important is whether you want your $mod key on Super (aka Windows key) or Alt - if you don't care, use Super. Then i3 will create a config file according to what you chose.

Now you want to immediately hit $mod+Return to open a terminal. i3 will use basically the first terminal emulator it finds; unfortunately it often chooses xterm, which is not great. Use nano to edit the i3 config file (look at the docs to find where that may be). Unless i3 already uses the terminal you want, search for "terminal" and change "i3-sensible-terminal" to your choice of terminal emulator. Save the file, then press $mod+Shift+R to restart i3 in-place and apply your new config.

If you have multiple screens, you now want to use arandr to set up your screen layout. Press $mod+D to launch apps using dmenu. Save your layout; this will create a shell script. Make the script executable using chmod, then put it into your i3 config using the exec command, so that the layout will be loaded whenever you login, like this:

exec --no-startup-id ~/.screenlayout/yourlayout.sh

(The reason why you want to use the --no-startup-id option here is explained in the "exec" section of the i3 docs.)

I recommend making a small "autostart" section in your config file where you can place all the things that you want to be started together with i3. Mine looks like this (with some comments added so you know why I'm using things):

# == AUTOSTART ==

# screen layout
exec --no-startup-id ~/.screenlayout/dual.sh

# power manager to turn off screens when afk
# also controls display brightness on laptop
exec --no-startup-id xfce4-power-manager

# notification daemon 
exec --no-startup-id dunst

# Steam for vidya, with silent option so it starts quietly in the background
exec steam -silent

# wallpaper
exec_always --no-startup-id feh --bg-fill $HOME/.wallpapers/ocean.jpg

Now you can basically just play around. Though, don't forget to also configure the other things you installed, like the terminal emulator and dunst.

One more thing that you'll often see in r/unixporn is that people don't use the i3 bar, because it's limited in the ways it can look like and the information it can display. polybar is a popular option to use instead since it offers incredible customization, but this again means more work.

Since i3 now has gaps built in by default, you may also want to use a compositor that allows you to use things like animations, drop shadows, and transparency for your windows; picom is really the only decent option here to my knowledge.

8 points

Yup. I certainly felt the effects. Yesterday I googled for very specific information regarding a video game I play but most of the discussion for it happens in a subreddit. I couldn't get the info I needed because the moderators had set the sub to private instead of restricting submissions/comments.

I totally support the protest since I use a 3rd party app on my phone and I support inclusivity, but removing information from the Internet is going to result in a lot of angry people. Setting subs to private isn't the way to go forward. I only had an issue with a game. What if someone has an issue with their car which they need to live? Or even more serious things such as an illness they need info about? There's lots of great legal advice as well. And of course reddit is an absolute treasure trove of info for very niche communities and interests, info which you just can't find elsewhere outside of some forums with 20 users.

Even if future communication moves elsewhere, the things that already exist must not be made inaccessible. This doesn't only affect reddit users, but everyone who googles things. And that's exactly why reddit leadership isn't going to budge.

24 points

It's hard to explain concisely. NixOS is extremely different from any other distro.

The most important thing is that you can write a declarative config file that describes your entire system, so you don't have to install or remove packages the traditional way; you can just write down how you want your system to be setup, and the Nix package manager will parse that and (re)build the system accordingly.

Having your entire OS declared in a version-controlled config file has some obvious benefits. It makes rollbacks extremely easy, because you can't brick your entire system. You can only brick one version of your OS. You can completely wipe your system, and then you can reinstall it with a single command.

Basically it's an absolute dream for tinkerers, but on the flipside it's really not great for beginners.

6 points

Huh, interesting. I dualboot, and recently installed GTA IV on Windows because I was being lazy. Performance is so bad. I can completely max out all graphics settings (except MSAA) on GTA V with my PC but GTA IV regularly drops to like 40 fps. I kinda expected it as I knew the PC port was shitty. Should reinstall it on Arch then.

9 points

The commit message of removing the CoC is "reclaim polymc from the leftoids"

He said on discord:

They say it's compromised but all they mean is that i removed all of the contributors' permissons who were promoting radicalist leftist queer ideology, and people really think that I got hacked just because I was never public about hating this shit.

He was also posting a ton of Trump memes and anti-trans stuff. The guy is clearly a nutjob and very definitely homophobic and transphobic.

51 points

SSH may as well be "everything" in certain jobs like sysadmin, editing config files and writing scripts on headless machines is a major part of that occupation.

I interned at my friend's former workplace for a few weeks and shared their office, that's how I know they largely used nano.

Your choice of editor doesn't really matter that much anyway. Sure, using an advanced editor like vim can make you faster, but if you can touch type at 100 wpm and know exactly what you want to do before you even open the file, you're already way faster than most. Your editor isn't going to make that much of a difference.

2 points

Part of the reason everyone knows and uses nano is that almost every distro out there comes with nano, but none of them come with your fancy config. It's worth having some muscle memory of the defaults if you ever work on computers that aren't your own.

This is also why I keep my .vimrc small. I don't change any keybinds and I only use a small amount of quality-of-life plugins that I could live without because I want to be able to use default vi/vim if necessary.

28 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.