From f5c4e837df336852f55cc9596c5ca19f593b2b00 Mon Sep 17 00:00:00 2001 From: Jens Sauer Date: Wed, 2 Dec 2020 18:19:49 +0100 Subject: [PATCH 1/6] i3: Replace i3lock with light-locker Replace i3lock with light-locker to enable multi-user setup. i3lock does not let switch user. light-locker locks with lightdm. --- i3/.config/i3/config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 826002d..df4e5a8 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -209,8 +209,9 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # Lock and power settings -bindsym $mod+u exec --no-startup-id lock.sh -bindsym $mod+i exec --no-startup-id lock.sh && sleep 2 && systemctl suspend +exec --no-startup-id light-locker --lock-on-suspend +bindsym $mod+u exec --no-startup-id light-locker-command -l +bindsym $mod+i exec --no-startup-id systemctl suspend bindsym $mod+p exec --no-startup-id systemctl poweroff bindsym $mod+z exec --no-startup-id systemctl reboot @@ -219,7 +220,7 @@ bindsym XF86MonBrightnessDown exec --no-startup-id brightness decrease 50 bindsym XF86MonBrightnessUp exec --no-startup-id brightness increase 50 # Lock screen on inactivity -exec --no-startup-id xautolock -locker lock.sh -time 5 -detectsleep +exec --no-startup-id xautolock -locker 'light-locker-command -l' -time 5 -detectsleep # Wallpaper exec_always --no-startup-id nitrogen --restore From 6fe90417bdbce67749189b57f3ad4fe5b14d1fe6 Mon Sep 17 00:00:00 2001 From: Jens Sauer Date: Thu, 3 Dec 2020 13:38:07 +0100 Subject: [PATCH 2/6] i3: Add 'power' mode binding This adds a seperate mode binding for controlling power state (suspend, reboot and poweroff) --- i3/.config/i3/config | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index df4e5a8..03bc1ce 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -208,12 +208,28 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle -# Lock and power settings +# power settings +set $mode_power Power: [s]uspend [r]eboot [p]oweroff +mode "$mode_power" { + # These bindings trigger as soon as you enter the power mode + + # Pressing r will reboot + # Pressing p will poweroff + # Pressing s will leave power binding mode and suspend + bindsym r exec --no-startup-id systemctl reboot + bindsym p exec --no-startup-id systemctl poweroff + bindsym s exec --no-startup-id i3-msg mode "default" && systemctl suspend + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+p mode "$mode_power" + +# lock settings exec --no-startup-id light-locker --lock-on-suspend bindsym $mod+u exec --no-startup-id light-locker-command -l -bindsym $mod+i exec --no-startup-id systemctl suspend -bindsym $mod+p exec --no-startup-id systemctl poweroff -bindsym $mod+z exec --no-startup-id systemctl reboot # Brightness bindsym XF86MonBrightnessDown exec --no-startup-id brightness decrease 50 From 342a1d3d98ca16454610711653e10a0383ecddbb Mon Sep 17 00:00:00 2001 From: Jens Sauer Date: Thu, 3 Dec 2020 13:42:31 +0100 Subject: [PATCH 3/6] i3: Change default font Change the default font to 'DejaVu Sans' --- i3/.config/i3/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 03bc1ce..cd42b84 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -13,7 +13,7 @@ set $mod Mod4 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. -font pango:Cantarell Bold 11 +font pango: DejaVu Sans 11 # This font is widely installed, provides lots of unicode glyphs, right-to-left # text rendering and scalability on retina/hidpi displays (thanks to pango). From d9589b78d09079bbc78105993989f8ddc23c3490 Mon Sep 17 00:00:00 2001 From: Jens Sauer Date: Thu, 3 Dec 2020 13:44:01 +0100 Subject: [PATCH 4/6] i3: Use urxvt daemon This enables the urxvt deamon on i3 startup and all following terminals (opened through i3) will be attached to the daemon. For more information consult urxvtd(1) manpage. --- i3/.config/i3/config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index cd42b84..a2c1e76 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -28,8 +28,11 @@ font pango: DejaVu Sans 11 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod +# start urxvt daemon +exec urxvtd -q -f -o + # start a terminal -bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec urxvtc # kill focused window bindsym $mod+Shift+q kill From 0ab99544877ac697867e86c141e924fbb6d7e2ac Mon Sep 17 00:00:00 2001 From: Jens Sauer Date: Thu, 3 Dec 2020 14:14:18 +0100 Subject: [PATCH 5/6] i3: Enable binding for child focus Enable binding to set focus to child. --- i3/.config/i3/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index a2c1e76..4d44e68 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -96,7 +96,7 @@ bindsym $mod+space focus mode_toggle bindsym $mod+a focus parent # focus the child container -#bindsym $mod+d focus child +bindsym $mod+x focus child # Workspaces set $workspace2 "2: Firefox " From 15c0da50b3b91e6ff594e800b7475a7b7dc94b95 Mon Sep 17 00:00:00 2001 From: Jens Sauer Date: Thu, 3 Dec 2020 14:27:46 +0100 Subject: [PATCH 6/6] i3: Remove names workspace I do not use this named workspace in a consistent way so lets remove them for now. --- i3/.config/i3/config | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 4d44e68..f17b9bc 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -98,12 +98,9 @@ bindsym $mod+a focus parent # focus the child container bindsym $mod+x focus child -# Workspaces -set $workspace2 "2: Firefox " - # switch to workspace bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace $workspace2 +bindsym $mod+2 workspace 2 bindsym $mod+3 workspace 3 bindsym $mod+4 workspace 4 bindsym $mod+5 workspace 5 @@ -115,7 +112,7 @@ bindsym $mod+0 workspace 10 # move focused container to workspace bindsym $mod+Shift+1 move container to workspace 1 -bindsym $mod+Shift+2 move container to workspace $workspace2 +bindsym $mod+Shift+2 move container to workspace 2 bindsym $mod+Shift+3 move container to workspace 3 bindsym $mod+Shift+4 move container to workspace 4 bindsym $mod+Shift+5 move container to workspace 5