mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
218 lines
7.3 KiB
Plaintext
218 lines
7.3 KiB
Plaintext
# vim: filetype=i3
|
||
|
||
# #---Basic Definitions ---# #
|
||
# i3-gaps
|
||
hide_edge_borders both
|
||
for_window [class="^.*"] border pixel 0
|
||
gaps inner 5
|
||
gaps outer 5
|
||
font pango:DejaVuSansMonoForPowerline Nerd Font 8
|
||
set $mod Mod4
|
||
|
||
# #---Start External Scripts---# #
|
||
# Align monitors
|
||
exec_always --no-startup-id xrandr --dpi 150
|
||
# Polybar
|
||
exec_always --no-startup-id $HOME/.config/polybar/launch-laptop.sh
|
||
# Composite manager
|
||
exec --no-startup-id compton --xrender-sync-fence
|
||
# Wallpaper
|
||
exec_always --no-startup-id feh --bg-scale ~/.config/wall.png
|
||
# Makes mouse invisible after a brief period
|
||
exec --no-startup-id unclutter
|
||
# Applet to control pulseaudio
|
||
exec --no-startup-id pasystray
|
||
# Network manager applet
|
||
exec --no-startup-id nm-applet
|
||
# Redhift for better sleep
|
||
exec --no-startup-id redshift-gtk
|
||
# Syncthing
|
||
exec --no-startup-id syncthing-gtk -m
|
||
# Notification
|
||
exec_always --no-startup-id dunst
|
||
|
||
## --- Start Apps ---# #
|
||
# Browser
|
||
exec iceweasel
|
||
exec slack
|
||
exec i3-sensible-terminal -c weechat -e weechat
|
||
exec i3-sensible-terminal -c mutt -e neomutt
|
||
exec spotify
|
||
exec gpodder
|
||
|
||
# #---Basic Bindings---# #
|
||
bindsym $mod+Return exec i3-sensible-terminal
|
||
bindsym $mod+shift+Return exec i3-sensible-terminal -e tmux
|
||
|
||
bindsym $mod+Shift+space floating toggle
|
||
bindsym $mod+space focus mode_toggle
|
||
|
||
bindsym $mod+Escape workspace prev
|
||
bindsym $mod+Shift+e exec i3-msg exit
|
||
|
||
bindsym $mod+Shift+BackSpace exec sudo reboot
|
||
|
||
bindsym $mod+Shift+q kill
|
||
|
||
# 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
|
||
|
||
# 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
|
||
|
||
|
||
# my keybindings
|
||
bindsym $mod+u [instance="dropdown"] scratchpad show
|
||
bindsym $mod+d exec rofi -show
|
||
bindsym $mod+p exec rofi-pass -show
|
||
bindsym Control+$mod+l exec i3lock-fancy
|
||
|
||
# Screenshots
|
||
bindsym Print exec --no-startup-id scrot -e 'mv $f ~/Pictures/Screenshots/'
|
||
bindsym Shift+Print exec --no-startup-id scrot -u -e 'mv $f ~/Pictures/Screenshots/'
|
||
|
||
# Pulse Audio controls
|
||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
|
||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
|
||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
|
||
|
||
# Sreen brightness controls
|
||
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
|
||
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
|
||
|
||
# #---Workspace Bindings--# #
|
||
|
||
# name workspaces
|
||
set $workspace1 "1"
|
||
set $workspace2 "2"
|
||
set $workspace3 "3"
|
||
set $workspace4 "4"
|
||
set $workspace5 "5"
|
||
set $workspace6 "6"
|
||
set $workspace7 "7"
|
||
set $workspace8 "8"
|
||
set $workspace9 "9"
|
||
set $workspace10 "10"
|
||
|
||
# switch to workspace
|
||
bindsym $mod+1 workspace $workspace1
|
||
bindsym $mod+2 workspace $workspace2
|
||
bindsym $mod+3 workspace $workspace3
|
||
bindsym $mod+4 workspace $workspace4
|
||
bindsym $mod+5 workspace $workspace5
|
||
bindsym $mod+6 workspace $workspace6
|
||
bindsym $mod+7 workspace $workspace7
|
||
bindsym $mod+8 workspace $workspace8
|
||
bindsym $mod+9 workspace $workspace9
|
||
bindsym $mod+0 workspace $workspace10
|
||
|
||
# move focused container to workspace
|
||
bindsym $mod+Shift+1 move container to workspace $workspace1
|
||
bindsym $mod+Shift+2 move container to workspace $workspace2
|
||
bindsym $mod+Shift+3 move container to workspace $workspace3
|
||
bindsym $mod+Shift+4 move container to workspace $workspace4
|
||
bindsym $mod+Shift+5 move container to workspace $workspace5
|
||
bindsym $mod+Shift+6 move container to workspace $workspace6
|
||
bindsym $mod+Shift+7 move container to workspace $workspace7
|
||
bindsym $mod+Shift+8 move container to workspace $workspace8
|
||
bindsym $mod+Shift+9 move container to workspace $workspace9
|
||
bindsym $mod+Shift+0 move container to workspace $workspace10
|
||
|
||
workspace $workspace8 output HDMI2
|
||
|
||
# enable floating for apps
|
||
for_window [title="Screen Layout Editor"] floating enable
|
||
for_window [window_role="gimp-dock"] floating disable; move left; resize shrink width 50 px or 50ppt
|
||
for_window [window_role="gimp-toolbox"] floating disable; move right; resize grow width 30 px or 30ppt
|
||
for_window [title="PulseAudio Manager"] floating enable
|
||
for_window [title="PulseAudio Volume Meter"] floating enable
|
||
for_window [title="Volume Control"] floating enable
|
||
for_window [title="Toggl Desktop"] floating enable
|
||
for_window [title="Syncthing"] floating enable for_window [title="QtPass"] floating enable
|
||
|
||
# make sure all apps start where they're supposed to
|
||
assign [class="Google-chrome"] $workspace2
|
||
assign [class="Firefox"] $workspace2
|
||
assign [class="Gpodder"] $workspace4
|
||
assign [class="ncmpcpp"] $workspace4
|
||
for_window [class="Spotify"] move to workspace $workspace4
|
||
assign [class="Slack"] $workspace7
|
||
assign [class="weechat"] $workspace7
|
||
assign [class="retroarch"] $workspace8
|
||
assign [class="mutt"] $workspace6
|
||
|
||
# First I have a tmux window used for background scripts.
|
||
# I'll later bind this to mod+u.
|
||
for_window [instance="dropdown"] floating enable
|
||
for_window [instance="dropdown"] resize set 625 400
|
||
for_window [instance="dropdown"] move scratchpad
|
||
for_window [instance="dropdown"] border pixel 5
|
||
# Runs the tmuxinit script, which searches for an earlier tmux instance,
|
||
# otherwise starts a new one (to prevent multiple dropdown sessions).
|
||
exec --no-startup-id $term -n dropdown -e tmux
|
||
# Runs neofetch on first tmux screen if installed.
|
||
exec_always --no-startup-id "tmux send-keys -t 0:0 'clear && neofetch 2>/dev/null' Enter"
|
||
|
||
floating_modifier $mod
|
||
|
||
# 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
|
||
bindsym Return mode "default"
|
||
bindsym Escape mode "default"
|
||
} bindsym $mod+r mode "resize"
|