From 5dc03aa989f1f1c312f1e85f2e1bbfbdd1337910 Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Thu, 5 Jul 2018 20:13:13 +0200 Subject: [PATCH] Add i3 config --- .config/i3/config | 176 ++++++++++++++++++++++++++++++++++++++++++ .config/mimeapps.list | 7 +- 2 files changed, 180 insertions(+), 3 deletions(-) create mode 100644 .config/i3/config diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..33f68c8 --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,176 @@ +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! +# +# Mod=Windows/Command key (left of spacebar) +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. +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +font pango:DejaVu Sans Mono 10 + +# use these keys for focus, movement, and resize directions +# +# Make it the same as vim +set $left h +set $down j +set $up k +set $right l + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +# +# Use vim delete (vim vixen settings more than vim) +bindsym $mod+d kill + +# start dmenu (a program launcher) +# +# Make it the same as vim command mode +# bindsym $mod+semicolon exec dmenu_run +bindsym $mod+semicolon exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+$left focus left +bindsym $mod+$down focus down +bindsym $mod+$up focus up +bindsym $mod+$right focus right + +# move focused window +bindsym $mod+Shift+$left move left +bindsym $mod+Shift+$down move down +bindsym $mod+Shift+$up mov e up +bindsym $mod+Shift+$right move right + +# split in horizontal orientation +bindsym $mod+n split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +#bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +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 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 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +# 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+Shift+e 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+e exec "i3-nagbar -t warning -m 'Do you really want to exit i3?' -b 'Yes, exit i3' 'gnome-session-quit --force --logout'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym $left resize shrink width 10 px or 10 ppt + bindsym $down resize grow height 10 px or 10 ppt + bindsym $up resize shrink height 10 px or 10 ppt + bindsym $right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status +} + +#### Keep as much as possible from GNOME desktop + +# audio controls +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 + +# screen brightness controls +bindsym XF86MonBrightnessUp exec xbacklight -inc 10 +bindsym XF86MonBrightnessDown exec xbacklight -dec 10 + +# screenlock +bindsym Control+$mod+l exec gnome-screensaver-command -l + +#exec --no-startup-id dbus-send \ +# --session \ +# --print-reply=literal \ +# --dest=org.gnome.SessionManager \ +# "/org/gnome/SessionManager" \ +# org.gnome.SessionManager.RegisterClient \ +# "string:i3" \ +# "string:$DESKTOP_AUTOSTART_ID" + +# custom settings +exec --no-startup-id gnome-session # GNOME session +exec --no-startup-id gnome-settings-daemon # GNOME desktop settings +exec --no-startup-id gnome-screensaver # GNOME screensaver +exec --no-startup-id xautolock -time 10 -locker 'gnome-screensaver-command -l' + +# background image +exec --no-startup-id feh --bg-fill /usr/share/backgrounds/gnome/Wood.jpg + +####################################################################### +# automatically start i3-config-wizard to offer the user to create a +# keysym-based config which used their favorite modifier (alt or windows) +# +# i3-config-wizard will not launch if there already is a config file +# in ~/.i3/config. +# +# Please remove the following exec line: +####################################################################### +#exec i3-config-wizard diff --git a/.config/mimeapps.list b/.config/mimeapps.list index 5f6fdc1..5d002bb 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -1,8 +1,8 @@ [Default Applications] text/plain=vim.desktop -text/html=brave.desktop -x-scheme-handler/http=brave.desktop -x-scheme-handler/https=brave.desktop +text/html=firefox.desktop +x-scheme-handler/http=firefox.desktop +x-scheme-handler/https=firefox.desktop x-scheme-handler/about=brave.desktop x-scheme-handler/unknown=brave.desktop video/x-ogm+ogg=vlc.desktop @@ -243,3 +243,4 @@ application/x-mimearchive=gvim.desktop; x-scheme-handler/http=firefox.desktop; x-scheme-handler/https=firefox.desktop; text/html=firefox.desktop; +x-scheme-handler/sms=org.gnome.Shell.Extensions.GSConnect.desktop; -- 2.43.0