From e352144037cb5d9293d0f32688f72112889c6985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Hangh=C3=B8j=20Iversen?= Date: Sun, 2 Dec 2018 22:02:55 +0100 Subject: [PATCH] Move some stuff to xinitrc --- i3.config | 26 ++++++++++++++++++++------ xinitrc | 12 ++++++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) create mode 100755 xinitrc diff --git a/i3.config b/i3.config index ade04a8..d52f4b7 100644 --- a/i3.config +++ b/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:monospace 11 +font pango:monospace 12 # This font is widely installed, provides lots of unicode glyphs, right-to-left # text rendering and scalability on retina/hidpi displays (thanks to pango). @@ -33,10 +33,12 @@ floating_modifier $mod bindsym $mod+Return exec i3-sensible-terminal # kill focused window -bindsym $mod+q kill +bindsym $mod+Escape kill # start dmenu (a program launcher) -bindsym $mod+d exec dmenu_run +# bindsym $mod+d exec dmenu_run +bindsym $mod+d exec "rofi -show run" +bindsym $mod+Tab exec "rofi -show window" # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. @@ -82,6 +84,7 @@ bindsym $mod+v layout splitv # toggle tiling / floating bindsym $mod+Shift+space floating toggle +bindsym $mod+Shift+f floating toggle # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle @@ -129,12 +132,25 @@ bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+0 move container to workspace $ws10 +bindsym Ctrl+Alt+f0 exec "sudo chvt 0" +bindsym Ctrl+Alt+f1 exec "sudo chvt 1" +bindsym Ctrl+Alt+f2 exec "sudo chvt 2" +bindsym Ctrl+Alt+f3 exec "sudo chvt 3" +bindsym Ctrl+Alt+f4 exec "sudo chvt 4" +bindsym Ctrl+Alt+f5 exec "sudo chvt 5" +bindsym Ctrl+Alt+f6 exec "sudo chvt 6" +bindsym Ctrl+Alt+f7 exec "sudo chvt 7" +bindsym Ctrl+Alt+f8 exec "sudo chvt 8" +bindsym Ctrl+Alt+f9 exec "sudo chvt 9" + # reload the configuration file bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart + # exit i3 (logs you out of your X session) -bindsym $mod+Escape exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" +bindsym $mod+Shift+Escape exec "zenity --question --title 'Log out' --text 'End X session?' && i3-msg exit" +bindsym $mod+Shift+s exec "zenity --question --title 'Suspend' --text 'Suspend?' && systemctl suspend" # resize window (you can also use the mouse for that) mode "resize" { @@ -223,6 +239,4 @@ bindsym XF86AudioPause exec playerctl pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous -exec "setxkbmap -option grp:win_space_toggle -layout us,dk" - bindsym $mod+l exec "i3lock -c 1e0023" diff --git a/xinitrc b/xinitrc new file mode 100755 index 0000000..f0b4c40 --- /dev/null +++ b/xinitrc @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Daemons +# Perhaps this sort of thing belongs elsewhere? +nm-applet + + +setxkbmap -option grp:win_space_toggle -layout us,dk +xrdb -merge ~/.Xresources + +# Nice for urxvt, not so nice for emacs: +# autocutsel -f