[ 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: 1447605583489.jpg (494.88 KB, 1280x960, 1234-kzkggaara-collection.jpg) ImgOps Exif iqdb

 No.13910

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/
>>

 No.13911

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.

>>

 No.13912

>>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)

>>

 No.13913

>>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?

>>

 No.13914

>>13911
Oh yeah and if we are doing aliases I would rather just make a script.

>>

 No.13915

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

>>

 No.13917

>>13915
thank you it works now.

>>

 No.13920

File: 1447628109545.png (133.88 KB, 1280x1024, 2015-11-15-23:52:40.png) ImgOps iqdb

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.

>>

 No.13921

>>13920
care to share that pdf?

>>

 No.13924

>>13920
You taking CPE bro?

>>

 No.13927

>>13910
Neat phrase OP, wheres it come from? Or is it original.

>>

 No.13928

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

>>

 No.13942

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

>>

 No.13951

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

>>

 No.13956

>>13927
It's just something that goes around.

>>

 No.13957

How do I remove i3's default window decorations?

>>

 No.13981

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

>>

 No.13984

>>13981
Thank you!



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