Move some stuff to xinitrc

This commit is contained in:
Frederik Hanghøj Iversen 2018-12-02 22:02:55 +01:00
parent 8d23da9e96
commit e352144037
2 changed files with 32 additions and 6 deletions

View file

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

12
xinitrc Executable file
View file

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