Skip to content

Instantly share code, notes, and snippets.

@resynth1943
Created October 31, 2019 15:52
Show Gist options
  • Save resynth1943/7e1e198d5774c5ed2006c39e09dcfb88 to your computer and use it in GitHub Desktop.
Save resynth1943/7e1e198d5774c5ed2006c39e09dcfb88 to your computer and use it in GitHub Desktop.
Dotfiles
# 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 https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $vim exec "kitty bash ~/scripts/start-vim.sh"
# Execute the startup script. Don't add shell command execution in here as
# it makes things look messy. This environment is not optimized for it.
exec bash ~/.config/i3/startup.sh
# Disable titlebars for i3-gaps.
for_window [class="^.*"] border pixel 0
# i3-gaps configuration.
gaps inner 10
# Add keybindings here.
bindsym $mod+Shift+v exec $vim
bindsym $mod+Shift+b exec firefox
bindsym $mod+Shift+asciitilde exec "/sbin/shutdown --halt now"
bindsym $mod+Shift+apostrophe exec "/sbin/shutdown -r now"
bindsym $mod+apostrophe exec "/sbin/shutdown now"
bindsym $mod+colon exec "i3-msg exit"
bindsym $mod+Shift+f exec "i3-sensible-terminal -e mc"
bindsym XF86AudioRaiseVolume exec "amixer set Master 5%+"
bindsym XF86AudioLowerVolume exec "amixer set Master 5%-"
bindsym XF86AudioMute exec "amixer set Master toggle"
bindsym $mod+F11 exec "amixer set Master 5%-"
bindsym $mod+F12 exec "amixer set Master 5%+"
bindsym $mod+F10 exec "amixer set Master toggle"
# Set the titlebar colors. These make the titlebars look a dark blue, compared
# to i3's light blue default.
# <colorclass> <border> <background> <text> <indicator> <child_border>
client.focused #6fd3bc #262626 #ffffff #2e92f4 #285577
client.unfocused #364e6d #262626 #ffffff #2e92f4 #285577
client.urgent #ec9a70 #262626 #ffffff #2e92f4 #285577
# 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 8
# 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 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesnโ€™t scale on retina/hidpi displays.
# Use the Fira Code language, which is a monospace font designed for programming.
# Also bump up the font size so text is visible.
font pango:Fira Code 10.5
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec kitty
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec rofi -show run
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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+semicolon 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
# focus the child container
#bindsym $mod+d focus child
bindsym $mod+0 exec rofi -show window
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
# 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 j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon 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 or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
mode "switch" {
bindsym Left workspace prev
bindsym h workspace prev
bindsym Right workspace next
bindsym l workspace prev
bindsym j workspace $ws1
bindsym Home workspace $ws1
bindsym q kill
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+Shift+s mode "default"
}
mode "launch" {
bindsym v exec $vim
bindsym n exec code
bindsym b exec firefox
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+Shift+s mode "default"
}
bindsym $mod+Ctrl+s mode "switch"
bindsym $mod+Ctrl+r mode "launch"
# Scripts:
exec bash ~/scripts/init_scripts.sh
# Only on first load, reloading = messing with config
#exec i3-msg 'workspace 1; append_layout ~/.config/i3/workspace-1.json'
#exec i3=msg 'workspace 2; append_layout ~/.config/i3/workspace-2.json'
#exec i3-msg 'workspace 3; append_layout ~/.config/i3/workspace-3.json'
# Go back to workspace one on boot
exec i3-msg 'workspace 1'
bindsym $mod+grave exec ksnip --rectarea
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
# status_command echo ""
# i3bar_command polybar
# position bottom
# tray_padding 3
# separator_symbol ">"
# # strip_workspace_name false
# bindsym button4 exec amixer sset Master 5%+
# bindsym button5 exec amixer sset Master 5%-
# bindsym button1 exec flameshot gui
#}
;==========================================================
;
;
; โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
; โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—
; โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•
; โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—
; โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘
; โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ• โ•šโ•โ•โ•šโ•โ• โ•šโ•โ•
;
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;==========================================================
[colors]
;background = ${xrdb:color0:#222}
background = #262626
background-alt = #515151
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
foreground-alt = #9e9e9e
primary = #638abd
secondary = #6fd3bc
alert = #ec9a70
background-accent = #638abd
workspace-active = #000000
[bar/bottom]
inherit = bar/top
bottom = true
modules-left = i3
modules-center = mpd
modules-right = alsa date
border-bottom-size = 2
border-top-size = 0
offset-y = 2
width = 100%
foreground = ${colors.foreground}
separator = %{F#363636}|
[bar/top]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 40
;offset-x = 10%
;offset-y = 10
radius = 6.0
margin = 0
fixed-center = true
click-left = kitty
click-right = firefox
background = #00000000
foreground = ${colors.foreground-alt}
#border-top-color = #525252
#border-top-size = 2
separator = %{F#606060}|
# Floating effect
#border-left-size = 4
#border-right-size = 4
#border-bottom-size = 4
#border-left-color =
line-size = 3
line-color = #f00
padding-left = 3
padding-right = 3
module-margin-left = 2
module-margin-right = 2
font-0 = fixed:pixelsize=18;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=18;1
modules-left =
modules-right =
modules-center = filesystem xbacklight xkeyboard memory cpu wlan eth battery temperature powermenu
tray-position = left
tray-padding = 3
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = "๎‰ฏ "
format-prefix-foreground = ${colors.foreground-alt}
;format-prefix-underline = ${colors.secondary}
label-layout = %layout%
;label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
;label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{Fi#0a81f5}%mountpoint%%{F-}: %percentage_used%% free
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-accent}
label-focused-underline= ${colors.primary}
label-focused-padding = 1
label-occupied = %index%
label-occupied-padding = 1
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 1
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 1
label-mode-foreground = #FFF
label-mode-background = ${colors.workspace-active}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
; Separator in between workspaces
label-separator = %{F#606060}ยท%{F-}
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = ๎‚–
icon-stop = ๎‚™
icon-play = ๎‚š
icon-pause = ๎‚›
icon-next = ๎‚œ
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = โ”€
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = โ”€
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "๎€ฆ "
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #f90000
label = %percentage:2%% cpu used
[module/memory]
type = internal/memory
interval = 2
format-prefix = "๎€จ "
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #4bffdc
label = %percentage_free%% free
[module/wlan]
type = internal/network
interface = net1
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = ๎ˆ˜
ramp-signal-1 = ๎ˆ™
ramp-signal-2 = ๎ˆš
ramp-signal-3 = ๎ˆš
ramp-signal-4 = ๎ˆš
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = eth0
interval = 3.0
;format-connected-underline = #55aa55
format-connected-prefix = "๎†œ "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
format-disconnected-underline = ${self.format-connected-underline}
label-disconnected = %ifname% disconnected
label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 1
date-alt =
date = "%Y-%m-%d"
time-alt = %H:%M
time = %{F#606060}%I:%M:%S%{F-} %p
format-prefix = ๎€–
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #0a6cf5
label = %date% %time%
[module/pulseaudio]
type = internal/pulseaudio
format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground}
label-muted = ๐Ÿ”‡ muted
label-muted-foreground = #666
bar-volume-width = 10
bar-volume-foreground-0 = ${colors.primary}
bar-volume-foreground-1 = ${colors.primary}
bar-volume-foreground-2 = ${colors.primary}
bar-volume-foreground-3 = ${colors.primary}
bar-volume-foreground-4 = ${colors.alert}
bar-volume-foreground-5 = ${colors.alert}
bar-volume-foreground-6 = ${colors.alert}
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = โ”€
bar-volume-fill-font = 2
bar-volume-empty = โ”€
bar-volume-empty-font = 2
bar-volume-empty-foreground = #575757
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = volume
label-volume-foreground = ${root.foreground}
format-muted-prefix = "๎ˆ‚ "
format-muted-foreground = ${colors.foreground-alt}
label-muted = muted.
bar-volume-width = 10
bar-volume-foreground-0 = ${colors.primary}
bar-volume-foreground-1 = ${colors.primary}
bar-volume-foreground-2 = ${colors.primary}
bar-volume-foreground-3 = ${colors.primary}
bar-volume-foreground-4 = ${colors.alert}
bar-volume-foreground-5 = ${colors.alert}
bar-volume-foreground-6 = ${colors.alert}
bar-volume-gradient = false
bar-volume-indicator = ยป
bar-volume-indicator-font = 8
bar-volume-fill = โ•
bar-volume-fill-font = 2
bar-volume-empty = โ”€
bar-volume-empty-font = 2
bar-volume-empty-foreground = #575757
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP1
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <animation-discharging> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = "๎ˆบ "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = ๎ˆถ
ramp-capacity-1 = ๎ˆท
ramp-capacity-2 = ๎ˆธ
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = ๎ˆถ
animation-charging-1 = ๎ˆท
animation-charging-2 = ๎ˆธ
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
animation-discharging-0 = ๎ˆธ
animation-discharging-1 = ๎ˆท
animation-discharging-2 = ๎ˆถ
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
;format-underline = #f50a4d
format-warn = <ramp> <label-warn>
;format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = ๎ƒ‰
ramp-1 = ๎ƒŠ
ramp-2 = ๎ƒ‹
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = ๎„Œ
label-open-foreground = ${colors.secondary}
label-close = ๎ฅ cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[global/wm]
margin-top = 5
margin-bottom = 5
; vim:ft=dosini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment