Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # i3 config file (v4)
- # Please see http://i3wm.org/docs/userguide.html for a complete reference!
- # place this file in ~/.config/i3/config
- # RESOURCES:
- # i3code cast tutorial:
- # https://www.youtube.com/watch?v=j1I63wGcvU4&list=PL5ze0DjYv5DbCv9vNEzFmP6sU7ZmkGzcf
- # REQUIREMENTS:
- # playerctl - Install deb from https://github.com/acrisci/playerctl/releases (sudo dpkg -i package-name)
- # font awesome - https://github.com/FortAwesome/Font-Awesome/releases (unzip and cp fonts in ~/.fonts)
- # OPTIONAL:
- # infinity - http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html
- # feh - background images
- # compton - transparence and transition between windows
- # rofi
- # VARIABLES:
- # Mod key
- set $mod Mod4
- # directional alternative keys (Sorry vi I don't like "jkl;")
- set $key_up i
- set $key_down k
- set $key_left j
- set $key_right l
- # monitors
- set $display_laptop "LVDS-1"
- set $display_external "DP-2"
- # colors
- set $bg-color #2f343f
- set $inactive-bg-color #2f343f
- set $text-color #f3f4f5
- set $inactive-text-color #676E7D
- set $urgent-bg-color #E53935
- # workspace name variables
- set $ws_browsing "1 "
- set $ws_terminals "2 "
- set $ws_editors "3 editors"
- # "
- set $ws_messaging "4 messages"
- # "
- set $ws_media "5 media"
- # "
- set $ws_tools "6 "
- # Font for window titles. Will also be used by the bar unless a different font
- # is used in the bar {} block below.
- font pango:Liberation 12px
- # 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
- bindsym $mod+Shift+q kill
- # start rofi (a program launcher)
- bindsym $mod+d exec rofi -show run -lines 4 -eh 2 -width 100 -padding 200 -opacity "85" -bw 0 -bc "$bg-color" -bg "$bg-color" -fg "$text-color" -hlbg "$bg-color" -hlfg "#9575cd" -font "Terminos 18"
- # change focus
- bindsym $mod+u focus [urgent=latest]
- bindsym $mod+$key_left focus left
- bindsym $mod+$key_down focus down
- bindsym $mod+$key_up focus up
- bindsym $mod+$key_right focus right
- # alternatively, you can use the cursor keys:
- 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+$key_left move left
- bindsym $mod+Shift+$key_down move down
- bindsym $mod+Shift+$key_up move up
- bindsym $mod+Shift+$key_right move right
- # alternatively, you can use the cursor keys:
- bindsym $mod+Shift+Left move left
- bindsym $mod+Shift+Down move down
- bindsym $mod+Shift+Up move up
- bindsym $mod+Shift+Right move right
- # split in horizontal orientation
- bindsym $mod+h 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
- # switch to workspace
- bindsym $mod+1 workspace $ws_browsing
- bindsym $mod+2 workspace $ws_terminals
- bindsym $mod+3 workspace $ws_editors
- bindsym $mod+4 workspace $ws_messaging
- bindsym $mod+5 workspace $ws_media
- bindsym $mod+6 workspace $ws_tools
- 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 $ws_browsing
- bindsym $mod+Shift+2 move container to workspace $ws_terminals
- bindsym $mod+Shift+3 move container to workspace $ws_editors
- bindsym $mod+Shift+4 move container to workspace $ws_messaging
- bindsym $mod+Shift+5 move container to workspace $ws_media
- bindsym $mod+Shift+6 move container to workspace $ws_tools
- 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
- # move current workspace to different screen
- bindsym $mod+Mod1+$key_left move workspace to output left
- bindsym $mod+Mod1+$key_right move workspace to output right
- bindsym $mod+Mod1+Left move workspace to output left
- bindsym $mod+Mod1+Right move workspace to output right
- # 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'"
- # 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 $key_left resize shrink width 10 px or 10 ppt
- bindsym $key_down resize grow height 10 px or 10 ppt
- bindsym $key_up resize shrink height 10 px or 10 ppt
- bindsym $key_right resize grow width 10 px or 10 ppt
- # same bindings, but for the arrow keys
- 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
- tray_output $display_laptop
- }
- # Pulse Audio controls
- bindsym XF86AudioRaiseVolume exec "volume_control.sh +"
- bindsym XF86AudioLowerVolume exec "volume_control.sh -"
- bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
- # Media player controls
- bindsym XF86AudioPlay exec playerctl play-pause
- bindsym XF86AudioStop exec playerctl pause
- bindsym XF86AudioNext exec playerctl next
- bindsym XF86AudioPrev exec playerctl previous
- # Other XF86 Keys
- # (dell keyboard)
- bindsym XF86Tools exec spotify
- bindsym XF86Back exec keepassx
- bindsym XF86Forward exec emacs
- bindsym XF86HomePage exec dolphin
- bindsym XF86Explorer exec firefox
- bindsym XF86Mail exec thunderbird
- bindsym XF86Calculator exec kcalc
- bindsym Cancel exec i3lock -d
- bindsym XF86Reload reload
- bindsym Print exec spectacle
- # ThinkPad x230 fn keys
- bindsym XF86Launch1 exec i3lock -d # orizontal unmarked button
- bindsym XF86AudioMicMute exec emacs ~/.config/i3/config
- bindsym XF86ScreenSaver exec i3lock -d
- bindsym XF86WebCam exec google-chrome https://hangouts.google.com
- # bindsym XF86Display exec # TODO: bind to script that will activate/disactivate second screen
- # bindsym XF86Sleep # DO NOT USE.. used to suspend pc
- # bindsym XF86WLAN exec # DO NOT USE.. used by the system to toggle wifi
- # assign window classes to workspaces
- assign [class="Firefox"] $ws_browsing
- assign [class="Emacs24"] $ws_editors
- assign [class="Thunderbird"] $ws_browsing
- # assign [class="Spotify"] $ws_media
- for_window [class="Spotify"] move to workspace $ws_media
- # list of app to load at startup
- exec firefox
- exec emacs
- exec nm-applet
- exec feh --bg-scale ~/images/wallpapers/Nessy.png
- exec compton -f
- exec dropbox start
- # exec thunderbird
- # exec spotify
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement