Re: [qubes-users] Qubes i3 Tips & Tricks

2017-03-08 Thread Alex
On 03/08/2017 12:17 PM, pixel fairy wrote:
> On Tuesday, March 7, 2017 at 4:21:07 PM UTC-8, Eva Star wrote:
>> Can somebody share screenshots of i3 ? Thanks
> 
> https://sietse.no/i3-wm-in-qubes-os
> 
> only image i could find. hope someone here posts one. im curious
> too.
> 

My desktop, as of now, with a little pixelation effect here and there:
http://tinypic.com/r/296lkkn/9

A little explanation: I have 6 monitors as you can see here
http://tinypic.com/r/etd2kn/9 (here Qubes was being installed), and i3
is in tabbed mode in all of them except the rightmost bottom one.
Pre-emptive comment: yes qubes does support the Matrox C680 graphics
card I use in this setup, and without any problems. Since it's a
developer/sysadmin workstation no special gaming acceleration is needed,
but screen real estate is very much appreciated by my eyes.

In the top row you can see 3 tabs (personal-firefox, work-urxvt,
personal-keepassx): if you install i3 with qubes settings as per
official documentation you will get colored tabs; the color is the one
from the VM label. It's used also in window border, but it can't easily
be seen in tinypic (has anybody a picture sharing service to recommend
that does not scale the image? original il 3840x2048).

In the other screens you can see monodevelop running, remmina (with a
running remote desktop session to a windows 2016 server), and the Qubes
VM Manager. I hate to have it floating, so I docked it and I'm hoping
(but I know I'm not the only one) that one day we'll have it with a
"responsive" datatable layout, because that wasted area is really sad -
I'd love to be able to add columns to that table, say disk image usage
percent or network traffic, but with the current layout that would only
clutter the view.

You can see that I juxtaposed two Thunderbird instances from personal
and work in screen #6, to always have the email shitstorm situation
available at a glance. You may notice the upper rightmost screen has two
tabs; one is the VM Manager and the other is the Firefox instance with
Skype and the Slack sessions opened.

Because the Qubes VM Manager is rarley used and because the space wasted
on its window saddens me a little the active window is usually the
mentioned skype+slack firefox. I devoted the rightmost column of
monitors to "communications" (on the top one the chats, on the bottom
one the e-mails).

The leftmost column is typically used by the two main firefox instances
(personal + work) and the respective keepassx windows. The decision of
this separation has been configured in i3's config file: thunderbirds
are opened in screen #6, all windows from "chat" appVM are opened in
screen #3, all firefox windows from "work" are opened in screen #4 and
from "personal" in screen #1.

All windows are automatically configured to open in docked mode; I had
to force the floating mode for some windows:
 * [instance=":Msgcompose$" class=":Thunderbird$"]
 * [title="^Android Emulator"]
 * [class="^teamviewer:"]
 * [class=":Pidgin$"]

Yes, teamviewer has its own appVM (fedora 25 based, named "teamviewer")
and all windows from that appVM are floating because otherwise it's a
nightmare. Teamviewer for linux is a packaged teamviewer.exe+wine, so it
does not really like to have its windows stretched. I also happen to use
the Android Emulator in arm mode; it's quite slow but runs without
nested-virtualization paranoia, and given a huge amount of both RAM and
time it kinda works.

You can see the effects of floating mode in screen #1 (there's a message
composition window and no, I don't normally compose from a postmaster@,
it's for the sake of the screenshot...), in screen #2 (where I started
scrot in dom0 to take the screenshot) and in screen #3 (the pidgin
instance). Since floating windows are always on top of any docked window
I rarely use them. Note that terminals (both in dom0 and, you can't see
in the screenshot but believe me, all other appvms) have been set up
with large fonts and solarized theme to ease my eyes... xterm's default
microfont and color scheme borders on crime.

The center column of screen is general-purpose to me; I end up putting
there developer consoles, IDEs, text editors and such.

With i3 you can move the mouse at the center of any screen using the
keyboard, and focus follows the mouse; you can switch tab and move thems
with keyboard shortcuts. This takes a little to get used to, but gives
speed and predictability (no more alt-tab roulettes, nor fake focus
hints because of spurious mouse movements).

Completing the tour, I added a xrandr bash script in auto-execution in
i3's config file to make sure the screens are where I expect them to be,
and reassigned some hotkeys to move a window from one screen to another.

That's just an example of my i3 setup, since you asked for some
examples. I'd never use the tiled mode much, because I need to look at
long lines (for logs/terminals) and/or long scrolls of text (for source
code), so having to constrain either dimension 

Re: [qubes-users] Qubes i3 Tips & Tricks

2017-03-08 Thread pixel fairy
On Tuesday, March 7, 2017 at 4:21:07 PM UTC-8, Eva Star wrote:
> Can somebody share screenshots of i3 ? Thanks

https://sietse.no/i3-wm-in-qubes-os

only image i could find. hope someone here posts one. im curious too.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/a1c23e0d-043f-4ab1-9d4d-a7fca8b8e78d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Qubes i3 Tips & Tricks

2017-03-07 Thread Eva Star

Can somebody share screenshots of i3 ? Thanks


--
Regards

--
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/add2297f-5044-278e-e8bd-1f8187c1fa22%40openmailbox.org.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Qubes i3 Tips & Tricks

2017-03-07 Thread Daniel Moerner
On Mon, Mar 6, 2017 at 11:02 PM, sm8ax1  wrote:
> Thanks for this. I've used i3 on other OSes and I like it a lot. I
> probably won't use it on Qubes however because of an issue that I'll
> note here since it may or may not affect other users.
>
> In i3 it is rather difficult to control the size of a window with fine
> granularity, and in particular it is very difficult to restore the exact
> size a window would have been created with. This is a problem for users
> of Tor Browser, because websites and exit nodes can query the browser
> window's size even when you have JavaScript disabled. This makes you an
> easy fingerprinting target.
>
> If anyone knows of any workarounds for this, perhaps forcing certain
> kinds of windows to be created in floating mode and keep their original
> size, please share them.

You'd have to experiment with whether it keeps the windows their original
size, but you can force windows to start in floating mode in .i3/config:
https://faq.i3wm.org/question/61/forcing-windows-as-always-floating.1.html

A line similar to:

for_window [class="anon-whonix:[.]*"] floating enable

Should make all windows from the anon-whonix VM float by default, although
I haven't tested this.

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/CAPSgt5nbAWaR0EXRQvNG_Z_4tDx4ULfifZHYyNzRzgMUeQn3VA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [qubes-users] Qubes i3 Tips & Tricks

2017-03-06 Thread sm8ax1
Daniel Moerner:
> I've been using i3 in dom0 for about a month now, and I wanted to share a few 
> tips and tricks (partly so I can have them in a centralized place for 
> reference):
> 
> 1. To lock the screen on suspend and resume, you need to add a systemd target 
> in /etc/systemd/system. This has to use your username (or supposedly 
> xss-lock, which I haven't bothered figuring out how to use). I use the 
> following content, substituting for $USER:
> 
> [Unit]
> Description=Lock screen on suspend
> 
> [Service]
> User=$USER
> Type=forking
> Environment=DISPLAY=:0
> ExecStart=/usr/bin/i3lock -d -c 00
> 
> [Install]
> WantedBy=suspend.target
> 
> 2. Volume keys: Install pulseaudio-utils. Then put the following in 
> .i3/config:
> 
> bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5%
> bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5%
> bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle
> 
> I then customize the qubes-i3status command by adding: (I know this awk/sed 
> mixture is awful, and it's hard-coded for my system, which has two pulseaudio 
> sinks)
> 
> status_volume() {
>local muted=$(pactl list sinks | awk -F ' ' '/Mute/ {print $2}' | sed -s 
> 's/ //g' -e '2q;d')
>if [[ $muted == 'yes' ]]; then
>json volume "Volume: 0%"
>else
>local volume=$(pactl list sinks | awk -F ' ' '/Volume/ {print $2}' | 
> sed -s 's/ //g' -e '3q;d')
>json volume "Volume: $volume"
>fi
> }
> 
> And then add a local volume variable to the main() call. I update every 
> second.
> 
> 3. A few minor tweaks to the config file: See this pull request, which has 
> already been merged: https://github.com/QubesOS/qubes-desktop-linux-i3/pull/5 
> 
> A few more personal thoughts: Personally, I change the navigation to use vim 
> keys, and then remap horizontal split to 'b'. I also remap 'focus child' to 
> 'c', since I find it to be a useful shortcut. Originally I disabled 
> fullscreen, on the model of Xfce4, but I had to reenable it as part of a 
> workaround for https://github.com/QubesOS/qubes-issues/issues/1502
> 
> I'm sure I'm missing a few things, but I wanted to share this, since I 
> sometimes see people asking about i3, especially on IRC.
> 
> Best,
> Daniel 
> 

Thanks for this. I've used i3 on other OSes and I like it a lot. I
probably won't use it on Qubes however because of an issue that I'll
note here since it may or may not affect other users.

In i3 it is rather difficult to control the size of a window with fine
granularity, and in particular it is very difficult to restore the exact
size a window would have been created with. This is a problem for users
of Tor Browser, because websites and exit nodes can query the browser
window's size even when you have JavaScript disabled. This makes you an
easy fingerprinting target.

If anyone knows of any workarounds for this, perhaps forcing certain
kinds of windows to be created in floating mode and keep their original
size, please share them.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/bab51d99-56d2-af1e-96bd-0483eebd2653%40vfemail.net.
For more options, visit https://groups.google.com/d/optout.


[qubes-users] Qubes i3 Tips & Tricks

2017-03-06 Thread Daniel Moerner
I've been using i3 in dom0 for about a month now, and I wanted to share a few 
tips and tricks (partly so I can have them in a centralized place for 
reference):

1. To lock the screen on suspend and resume, you need to add a systemd target 
in /etc/systemd/system. This has to use your username (or supposedly xss-lock, 
which I haven't bothered figuring out how to use). I use the following content, 
substituting for $USER:

[Unit]
Description=Lock screen on suspend

[Service]
User=$USER
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock -d -c 00

[Install]
WantedBy=suspend.target

2. Volume keys: Install pulseaudio-utils. Then put the following in .i3/config:

bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle

I then customize the qubes-i3status command by adding: (I know this awk/sed 
mixture is awful, and it's hard-coded for my system, which has two pulseaudio 
sinks)

status_volume() {
   local muted=$(pactl list sinks | awk -F ' ' '/Mute/ {print $2}' | sed -s 's/ 
//g' -e '2q;d')
   if [[ $muted == 'yes' ]]; then
   json volume "Volume: 0%"
   else
   local volume=$(pactl list sinks | awk -F ' ' '/Volume/ {print $2}' | sed 
-s 's/ //g' -e '3q;d')
   json volume "Volume: $volume"
   fi
}

And then add a local volume variable to the main() call. I update every second.

3. A few minor tweaks to the config file: See this pull request, which has 
already been merged: https://github.com/QubesOS/qubes-desktop-linux-i3/pull/5 

A few more personal thoughts: Personally, I change the navigation to use vim 
keys, and then remap horizontal split to 'b'. I also remap 'focus child' to 
'c', since I find it to be a useful shortcut. Originally I disabled fullscreen, 
on the model of Xfce4, but I had to reenable it as part of a workaround for 
https://github.com/QubesOS/qubes-issues/issues/1502

I'm sure I'm missing a few things, but I wanted to share this, since I 
sometimes see people asking about i3, especially on IRC.

Best,
Daniel 

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/33922074-d6a3-46cb-b450-2b094122d53a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.