Skip to content

Instantly share code, notes, and snippets.

@JPenuchot
Last active July 8, 2021 04:39
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JPenuchot/447a84f8384b5ade3a463e6a37bb8d33 to your computer and use it in GitHub Desktop.
Save JPenuchot/447a84f8384b5ade3a463e6a37bb8d33 to your computer and use it in GitHub Desktop.
~/.config/i3/config for my Dell XPS 13 HiDPI running on Solus
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/home/jpenuchot/node_modules/.bin:$HOME/.cargo/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
. /home/jpenuchot/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $alt Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Clear Sans Regular 9
########## Autolaunch ##########
exec --no-startup-id nm-applet
exec --no-startup-id /usr/lib64/polkit-gnome/polkit-gnome-authentication-agent-1
########## Keybindings ##########
# bindsym $mod+Shift+s exec i3lock # Easier locking
### Backlight ###
bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # Increase Brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # Decrease Brightness
### Media Player ###
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioNext exec playerctl next
### Other ###
bindsym Print exec scrot -q 100 -e 'mv $f ~/tmp/'
### Sound ###
# Raise Volume
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
# Lower Volume
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse sset Master toggle-mute # Toggle muting
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec gnome-terminal --hide-menubar --profile=i3
bindsym $mod+n exec caja
# kill focused window
bindsym $mod+Shift+A kill
# start dmenu (a program launcher)
#bindsym $mod+d exec --no-startup-id dmenu
#bindsym $mod+d exec rofi -show run
#bindsym $mod+d exec rofi -show run -lines 3 -eh 2 -width 100 -padding 800 -opacity "85" -bw 0 -bg "$bg-color" -fg "$text-color" -hlbg "$bg-color" -hlfg "#9575cd" -font "Source Code Pro 18"
# 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.
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu='rofi -width 20 -show -matching fuzzy -i -dmenu -font "Clear Sans Regular 18"'
#bindsym $mod+d exec --no-startup-id dmenu -i -fn "Clear Sans"
# change focus
# bindsym $mod+j focus left
# bindsym $mod+k focus down
# bindsym $mod+l focus up
# bindsym $mod+m 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+j move left
# bindsym $mod+Shift+k move down
# bindsym $mod+Shift+l move up
# bindsym $mod+Shift+M 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+z 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+q focus parent
# focus the child container
#bindsym $mod+d focus child
set $wp1 "1. Browser"
set $wp2 "2. Editor/Console"
set $wp3 "3. Editor/Console"
set $wp4 "4. Misc"
set $wp5 "5. Misc"
set $wp6 "6. Misc"
set $wp7 "7. Misc"
set $wp8 "8. Music"
set $wp9 "9. Mail"
set $wp10 "10. Chat"
# switch to workspace
bindsym $mod+ampersand workspace $wp1
bindsym $mod+eacute workspace $wp2
bindsym $mod+quotedbl workspace $wp3
bindsym $mod+apostrophe workspace $wp4
bindsym $mod+parenleft workspace $wp5
bindsym $mod+minus workspace $wp6
bindsym $mod+egrave workspace $wp7
bindsym $mod+underscore workspace $wp8
bindsym $mod+ccedilla workspace $wp9
bindsym $mod+agrave workspace $wp10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $wp1
bindsym $mod+Shift+eacute move container to workspace $wp2
bindsym $mod+Shift+3 move container to workspace $wp3
bindsym $mod+Shift+4 move container to workspace $wp4
bindsym $mod+Shift+5 move container to workspace $wp5
bindsym $mod+Shift+6 move container to workspace $wp6
bindsym $mod+Shift+egrave move container to workspace $wp7
bindsym $mod+Shift+8 move container to workspace $wp8
bindsym $mod+Shift+ccedilla move container to workspace $wp9
bindsym $mod+Shift+agrave move container to workspace $wp10
# 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-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
set $Resize_val 1
# 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 j Resize shrink width $Resize_val px or $Resize_val ppt
# bindsym k Resize grow height $Resize_val px or $Resize_val ppt
# bindsym l Resize shrink height $Resize_val px or $Resize_val ppt
# bindsym m Resize grow width $Resize_val px or $Resize_val ppt
# same bindings, but for the arrow keys
bindsym Left Resize shrink width $Resize_val px or $Resize_val ppt
bindsym Down Resize grow height $Resize_val px or $Resize_val ppt
bindsym Up Resize shrink height $Resize_val px or $Resize_val ppt
bindsym Right Resize grow width $Resize_val px or $Resize_val 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 {
#i3bar_command polybar
status_command i3status
position bottom
mode hide
colors {
separator #928374
background #282828
statusline #ebdbb2
focused_workspace #689d6a #689d6a #282828
active_workspace #1d2021 #1d2021 #928374
inactive_workspace #32302f #32302f #928374
urgent_workspace #cc241d #cc241d #ebdbb2
}
}
########## Styling ##########
client.background #404552
########## i3-gaps integration ##########
for_window [class="^.*"] border pixel 0
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [title="Preferences$"] floating enable
for_window [floating] border pixel 1
#smart_gaps off
#gaps inner 2
#gaps outer 0
########## Custom stuff ##########
# DPI
exec_always --no-startup-id xrandr --dpi 180
#exec_always export GDK_SCALE=2
#exec_always export GDK_DPI_SCALE=0.5
# Background
exec_always --no-startup-id feh --bg-scale /home/jpenuchot/wallpaper.jpg
# Suspend/Lock
bindsym $mod+l exec i3lock -i /home/jpenuchot/wallpaper.png
bindsym $mod+m exec i3lock -i /home/jpenuchot/wallpaper.png && systemctl suspend
bindsym $mod+k exec systemctl suspend
set $touchpad DLL0704:01 06CB:76AE Touchpad
# Touchpad config
exec --no-startup-id xinput set-prop "$touchpad" "libinput Tapping Enabled" 1
exec --no-startup-id xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1
exec --no-startup-id xinput set-prop "$touchpad" "libinput Disable While Typing Enabled" 0
# Misc
exec --no-startup-id redshift
exec --no-startup-id rm -rf /home/jpenuchot/tmp/*
exec --no-startup-id rm -rf /home/jpenuchot/tmp/.*
exec --no-startup-id compton --backend glx --glx-no-stencil --xrender-sync-fence --blur-background -i 0.9 -f -D 3 --inactive-dim 0.2
exec --no-startup-id unclutter
exec --no-startup-id /usr/lib/gnome-settings-daemon/gsd-xsettings
exec --no-startup-id screen -dmS Sync syncthing -no-browser
# Theme
client.focused #689d6a #689d6a #282828 #282828
client.focused_inactive #1d2021 #1d2021 #928374 #282828
client.unfocused #32302f #32302f #928374 #282828
client.urgent #cc241d #cc241d #ebdbb2 #282828
#include "/usr/share/rofi/themes//solarized.theme"
rofi.theme: /usr/share/rofi/themes//sidebar.rasi
{
"always_show_minimap_viewport": true,
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Tomorrow.tmTheme",
"font_face": "Source Code Pro",
"font_size": 10,
"hot_exit": false,
"ignored_packages":
[
"Vintage"
],
"remember_open_files": false,
"rulers":
[
80
],
"show_panel_on_build": false,
"tab_size": 2,
"theme": "Boxy Tomorrow.sublime-theme",
"theme_accent_tangerine": true,
"theme_scrollbar_colored": true,
"theme_scrollbar_rounded": true,
"theme_scrollbar_semi_overlayed": true,
"theme_sidebar_font_xs": true,
"theme_sidebar_size_xxs": true,
"theme_size_xs": true,
"theme_tab_font_xs": true,
"theme_tab_selected_prelined": true,
"theme_tab_size_xs": true,
"theme_unified": true,
"translate_tabs_to_spaces": true,
"wrap_width": 80
}
[
// Navigation
{ "keys": ["ctrl+&"], "command": "focus_group", "args": { "group": 0 } },
{ "keys": ["ctrl+é"], "command": "focus_group", "args": { "group": 1 } },
{ "keys": ["ctrl+\""], "command": "focus_group", "args": { "group": 2 } },
{ "keys": ["ctrl+'"], "command": "focus_group", "args": { "group": 3 } },
{ "keys": ["ctrl+("], "command": "focus_group", "args": { "group": 4 } },
{ "keys": ["ctrl+-"], "command": "focus_group", "args": { "group": 5 } },
{ "keys": ["ctrl+è"], "command": "focus_group", "args": { "group": 6 } },
{ "keys": ["ctrl+_"], "command": "focus_group", "args": { "group": 7 } },
{ "keys": ["ctrl+ç"], "command": "focus_group", "args": { "group": 8 } },
{ "keys": ["ctrl+shift+&"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["ctrl+shift+é"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["ctrl+shift+\""], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["ctrl+shift+'"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["ctrl+shift+("], "command": "move_to_group", "args": { "group": 4 } },
{ "keys": ["ctrl+shift+-"], "command": "move_to_group", "args": { "group": 5 } },
{ "keys": ["ctrl+shift+è"], "command": "move_to_group", "args": { "group": 6 } },
{ "keys": ["ctrl+shift+_"], "command": "move_to_group", "args": { "group": 7 } },
{ "keys": ["ctrl+shift+ç"], "command": "move_to_group", "args": { "group": 8 } },
{ "keys": ["ctrl+à"], "command": "focus_side_bar" },
// Layouts
{
"keys": ["alt+shift+&"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["alt+shift+é"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{
"keys": ["alt+shift+\""],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]
}
},
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment