From 90185367321df86d130b2ebf0ef1fab05027c3b5 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Thu, 13 Apr 2017 19:26:42 -0700 Subject: [PATCH 1/3] i3 updates. --- bin/i3lock.sh | 5 ++++- dotfiles/config/i3/config | 1 + dotfiles/xinitrc | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) delete mode 100644 dotfiles/xinitrc diff --git a/bin/i3lock.sh b/bin/i3lock.sh index 679167e..448ec2b 100755 --- a/bin/i3lock.sh +++ b/bin/i3lock.sh @@ -1,6 +1,9 @@ #!/bin/sh +LOCKER="i3lock -c 000000" +/usr/bin/xss-lock -- "${LOCKER}" & exec /usr/bin/xautolock \ -time 5 \ - -locker "i3lock -c 000000" \ + -detectsleep \ + -locker "${LOCKER}" \ -notify 30 \ -notifier "notify-send -u critical -t 10000 -- 'LOCKING SCREEN IN 30 SECONDS'" diff --git a/dotfiles/config/i3/config b/dotfiles/config/i3/config index c782917..72666ea 100644 --- a/dotfiles/config/i3/config +++ b/dotfiles/config/i3/config @@ -141,6 +141,7 @@ bindsym --whole-window $mod+button3 floating toggle exec --no-startup-id /usr/bin/cinnamon-settings-daemon & exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11,secrets exec --no-startup-id (sleep 2; nm-applet) & +exec --no-startup-id xset r rate 200 20 # customize windows for_window [class="^google-chrome$"] border pixel diff --git a/dotfiles/xinitrc b/dotfiles/xinitrc deleted file mode 100644 index 4453914..0000000 --- a/dotfiles/xinitrc +++ /dev/null @@ -1 +0,0 @@ -xset r rate 200 20 From 12dd58dc01a46c002b8100c5d3568a86258bab08 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Thu, 13 Apr 2017 21:13:47 -0700 Subject: [PATCH 2/3] Run autostart .desktop files on i3 login. --- bin/autostart.py | 16 ++++++++++++++++ dotfiles/config/i3/config | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 bin/autostart.py diff --git a/bin/autostart.py b/bin/autostart.py new file mode 100755 index 0000000..5860e63 --- /dev/null +++ b/bin/autostart.py @@ -0,0 +1,16 @@ +#!/usr/bin/python +""" +Launch desktop files from ~/.config/autostart +""" + +import glob +import os.path +from gi.repository import Gio + +dirname = os.path.expanduser('~/.config/autostart') +for desktop in glob.glob(os.path.join(dirname, '*.desktop')): + try: + fp = Gio.DesktopAppInfo.new_from_filename(desktop) + except TypeError: + continue + fp.launch_uris([], None) diff --git a/dotfiles/config/i3/config b/dotfiles/config/i3/config index 72666ea..4faa5ad 100644 --- a/dotfiles/config/i3/config +++ b/dotfiles/config/i3/config @@ -130,7 +130,7 @@ bindsym $mod+l exec i3lock -c 000000 -d && xset dpms force off bindsym $alt+Control+l exec i3lock -c 000000 -d && xset dpms force off # things to start quickly -bindsym $mod+g exec /usr/bin/google-chrome-beta +bindsym $mod+g exec /usr/bin/google-chrome-beta --password-store=gnome # kill a window with middle click + mod bindsym --whole-window $mod+button2 kill @@ -142,6 +142,7 @@ exec --no-startup-id /usr/bin/cinnamon-settings-daemon & exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11,secrets exec --no-startup-id (sleep 2; nm-applet) & exec --no-startup-id xset r rate 200 20 +exec --no-startup-id ~/bin/autostart.py # customize windows for_window [class="^google-chrome$"] border pixel From c7194cb349fa5f0bd8e262c43879ebde6015b644 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Thu, 13 Apr 2017 22:56:09 -0700 Subject: [PATCH 3/3] Add i3status. --- dotfiles/config/i3status/config | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 dotfiles/config/i3status/config diff --git a/dotfiles/config/i3status/config b/dotfiles/config/i3status/config new file mode 100644 index 0000000..07d68af --- /dev/null +++ b/dotfiles/config/i3status/config @@ -0,0 +1,52 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 +} + +order += "ipv6" +order += "disk /" +order += "disk /home" +order += "wireless _first_" +order += "ethernet _first_" +order += "battery all" +order += "load" +order += "tztime local" + +wireless _first_ { + format_up = "W: (%quality at %essid) %ip" + format_down = "W: down" +} + +ethernet _first_ { + # if you use %speed, i3status requires root privileges + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +battery all { + format = "%status %percentage %remaining" +} + +tztime local { + format = "%Y-%m-%d %H:%M:%S" +} + +load { + format = "%1min" +} + +disk "/" { + format = "%avail" +} + +disk "/home" { + format = "%avail" +}