lainchan / tech

i3wm configuration tips?

Anonymous · 2015-11-15 16:39
I have a few questions about configuring i3wm... Sorry for my noobishness in all matters i3wm though. a)How can I make it so that when I press a key combination that it runs a CLI command i.e. 'xset led 3'? b)Is it possible to map some keybindings in a way that it does the following things: 1)Opens the default terminal 2)sudo apt-get update 3)sudo apt-get upgrade btw. look at this interesting link I found: https://l3net.wordpress.com/2013/03/17/a-memory-comparison-of-light-linux-desktops/
Anonymous · 2015-11-15 16:59
You can add the terminal to a keyboard shortcut. Use the alias command for the latter. For xset: alias newname='xset led 3' For updating: alias newname='sudo apt-get update && sudo apt-get upgrade' (where newname is the replacement command name). Add it to bashrc to make permanent *may be different for your distro.
Anonymous · 2015-11-15 17:08
>>13911 Thx, for a) I just added: #turn on the keyboard backlight bindsym $mod+x exec "xset led 3" Now I am hacking on b)
Anonymous · 2015-11-15 17:13
>>13911 Can't I make it somehow that it callsthe terminal, runs those 2 commands by itself and exits? And all that I would have to do is input my sudo password and say yes once?
Anonymous · 2015-11-15 17:14
>>13911 Oh yeah and if we are doing aliases I would rather just make a script.
Anonymous · 2015-11-15 18:09
>>13912 This sounds like you're using a laptop. You can run 'xev' to find out the keysyms of the various laptop buttons such as the volume keys or the usual combination to switch the backlighting. >>13914 Sure, just look for the proper argument in your terminal emulator's man page. For urxvt it's -e:bindsym $mod+x exec urxvt -e bash -c "sudo apt-get update && sudo apt-get upgrade" This solution might exit right after executing the second command and you wouldn't be able to read any error messages. You could probably delay it or add an '&& exit' but once you encounter errors, you'll need the terminal anyway to fix them so I'd just go with an alias, say "upug" (UPdate & UpGrade) that you can type once without worrying about windows closing and stuff. Protip: Many prompts highlight their default answer in caps, e.g. "Continue? [YES/no]". You don't have to type in "YES", you can just press return.
Anonymous · 2015-11-15 19:08
>>13915 thank you it works now.
Anonymous · 2015-11-15 22:55
Some apps show the GNOME titlebar, how can that be changed? I can't even see or that window is selected or not. Maybe this isn't a i3 thing I vaguely remember I had the same issue with openbox. Still help is appreciated.
Anonymous · 2015-11-16 01:32
>>13920 care to share that pdf?
Anonymous · 2015-11-16 02:12
>>13920 You taking CPE bro?
Anonymous · 2015-11-16 07:21
>>13910 Neat phrase OP, wheres it come from? Or is it original.
Anonymous · 2015-11-16 07:34
>>13920 I'm not entirely sure but I think it has to do with the GTK3 theme Gnome 3 uses. The Arch wiki has some info on it, even if you don't use Arch: https://wiki.archlinux.org/index.php/GTK%2B#Configuration_tools (maybe try gnome-tweak-tool) You could also use different programs such as zathura or mupdf as document viewers and thunar or ranger as file managers. Ranger runs inside the terminal and has some great features (bulk rename, vim-like jumps to folders for fast navigation etc.). It can even preview images inside the terminal with w3mimgdisplay. Again, the Arch wiki has useful info on it: https://wiki.archlinux.org/index.php/Ranger
Anonymous · 2015-11-16 19:54
>>13921 It's up on volafile >> 13928 Usually I use ranger and even for PDFs I normally use a browser. Evince is mostly used for displaying dvi files that get generated by Latex. I'll check the arch wiki, it has been helpful more than once and I'm on Debian. It might have something to do that gnome3 is installed. Might just as well remove it I never use it.
Anonymous · 2015-11-17 01:24
as stated elsewhere i use a modified version of https://github.com/electro7/dotfiles can someone tell me how to get decent copy paste in i3 by any chance, i'm using the xorg or whatever default where it's on shift-insert and it is like kicking dead whales down the beach pretty hard
Anonymous · 2015-11-17 10:14
>>13927 It's just something that goes around.
Anonymous · 2015-11-17 10:18
How do I remove i3's default window decorations?
Anonymous · 2015-11-18 05:09
>>13951 >decent copy paste in i3 I use parcellite as a clipboard manager. Aside from a clipboard history and searching it allows synchronizing the Ctrl-c and primary selection clipboards, so you can at least paste selected text from a terminal window with Ctrl-v to a GUI application. If you hoped for using Ctrl-c/v inside the terminal I'll have to disappoint you. Both combinations have different uses in bash: Ctrl-c sends an interrupt signal (SIGINT) and Ctrl-v lets you type control sequences literally (e.g. Ctrl-v followed by Ctrl-b prints ^b) and while some terminal emulators support Ctrl-Shift-c/v, you shouldn't rely on it. Shift-Insert or middle mouse button is where it's at. >>13957 >How do I remove i3's default window decorations? If you are referring to the window title bar, the easiest way to do that would be "border none" or "border pixel 1". However there are lots of ways to fine-tune this behaviour.# Hide window titles border pixel 1 # Show window titles on new floating windows new_float normal # Only hide window title on terminal windows for_window [title="Terminal"] border pixel 1 # Hide borders adjacent to screen edges [none|vertical|horizontal|both] hide_edge_borders both Check out the excellent official documentation: http://i3wm.org/docs/userguide.html
Anonymous · 2015-11-18 09:03
>>13981 Thank you!