nixos/config/etc/i3/config

289 lines
9.6 KiB
Text
Raw Normal View History

2019-02-26 13:44:40 +01:00
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
exec redshift-gtk -l 51.0504:13.7373
### START USER CONFIG ###
set $mod Mod4
workspace "HDMI" output HDMI1
workspace_auto_back_and_forth yes
new_window pixel
hide_edge_borders both
exec setxkbmap de
2019-02-26 13:44:40 +01:00
#exec compton -f
2021-10-28 15:03:55 +02:00
exec feh --bg-scale $(xdg-user-dir PICTURES)/wallpaper.jpg
2019-02-26 13:44:40 +01:00
#exec pulseaudio -D
#exec fcitx
#exec env=LC_CTYPE=zh_CN.UTF-8 emacs --daemon
#exec conky -c $HOME/.my_little_conky/.conkyrc
#exec xsnow -nosanta -norudolf -notrees
#exec $LOCK
### END USER CONFIG ###
### START USER PROGRAMMS ###
### END USER PROGRAMMS ###
### START MEDIA BINDSYM ###
2019-02-26 13:44:40 +01:00
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym $mod+Mod1+space exec playerctl play-pause
bindsym $mod+Mod1+Left exec playerctl position 10-
bindsym $mod+Mod1+Right exec playerctl position 10+
bindsym $mod+Mod1+Down exec playerctl next
bindsym $mod+Mod1+Up exec playerctl previous
2019-02-26 13:44:40 +01:00
bindsym $mod+Shift+w sticky toggle
bindsym $mod+Shift+B floating enable; border none; resize set 900 600; move position 1020 19
2023-06-15 11:04:34 +02:00
### END MEDIA BINDSYM ###
2019-02-26 13:44:40 +01:00
### START BINDSYM ###
bindsym $mod+b border toggle
bindsym $mod+m bar mode toggle
bindsym $mod+y move container to output left
bindsym $mod+x move container to output right
bindsym $mod+Shift+y move workspace to output left
bindsym $mod+Shift+x move workspace to output right
bindsym $mod+minus exec amixer -c 0 sset Master 1%-
bindsym $mod+plus exec amixer -c 0 sset Master 1%+
bindsym $mod+Mod1+minus exec amixer -D pulse sset Master 1%-
bindsym $mod+Mod1+plus exec amixer -D pulse sset Master 1%+
bindsym $mod+Shift+minus exec xbacklight -5
bindsym $mod+Shift+plus exec xbacklight +5
bindsym $mod+Ctrl+0 exec xbacklight -set 0
bindsym $mod+Ctrl+1 exec xbacklight -set 10
bindsym $mod+Ctrl+2 exec xbacklight -set 20
bindsym $mod+Ctrl+3 exec xbacklight -set 30
bindsym $mod+Ctrl+4 exec xbacklight -set 40
bindsym $mod+Ctrl+5 exec xbacklight -set 50
bindsym $mod+Ctrl+6 exec xbacklight -set 60
bindsym $mod+Ctrl+7 exec xbacklight -set 70
bindsym $mod+Ctrl+8 exec xbacklight -set 80
bindsym $mod+Ctrl+9 exec xbacklight -set 90
bindsym $mod+p move scratchpad
bindsym $mod+Shift+p scratchpad show
bindsym --release $mod+Ctrl+s exec scrot
bindsym --release $mod+Ctrl+d exec "scrot --select"
bindsym --release $mod+Ctrl+a exec "scrot -s '/tmp/%F_%T_$wx$h.png' -e 'xclip -selection clipboard -target image/png -i $f && rm $f'"
2019-02-26 13:44:40 +01:00
bindsym $mod+o exec pcmanfm
2023-06-15 11:04:34 +02:00
bindsym $mod+Mod1+1 exec luxa fade --speed 50 '00ff00'
bindsym $mod+Mod1+2 exec luxa fade --speed 50 'ffff00'
bindsym $mod+Mod1+3 exec luxa fade --speed 50 'ff0000'
bindsym $mod+Mod1+4 exec luxa fade --speed 50 '0000ff'
bindsym $mod+Mod1+5 exec luxa fade --speed 50 'ffffff'
2019-02-26 13:44:40 +01:00
### END BINDSYM ###
### START MODES ###
mode "ACPI Events" {
bindsym p exec systemctl poweroff; mode "default"
bindsym h exec systemctl hibernate; mode "default"
bindsym s exec systemctl suspend; mode "default"
bindsym r exec systemctl reboot; mode "default"
bindsym h exec systemctl halt; mode "default"
bindsym e exec systemctl exit; mode "default"
bindsym l exec $LOCK; mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "Power Mode"{
bindsym s exec xbacklight -set 5; exec rfkill block all ; exec xset -b +dpms; mode "default"
bindsym p exec xbacklight -set 100; exec rfkill unblock all; exec xset -dpms; mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "No Keybinds" {
bindsym $mod+Shift+Escape mode "default"
}
bindsym $mod+F12 mode "ACPI Events"
bindsym $mod+F11 mode "No Keybinds"
bindsym $mod+F10 mode "Power Mode"
### END MODES ###
# 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
#font pango:System San Francisco Display 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 doesnt scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Shift+Return exec emacsclient -c
bindsym $mod+Mod1+Return exec emacsclient -c -e '(eshell t)'
bindsym $mod+Return exec alacritty
2019-02-26 13:44:40 +01:00
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
#bindsym $mod+d exec rofi -show run -lines 3 -eh 2 -width 100 -padding 330 -opacity "85" -config ~/.config/rofi.cfg -font "System San Francisco Display 12"
bindsym $mod+d exec dmenu_run -fn 'Droid Sans Mono-8'
2019-02-26 13:44:40 +01:00
# 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
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+odiaeresis focus right
#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+odiaeresis move right
#bindsym $mod+Shift+semicolon1 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+q layout stacking
2019-02-26 13:44:40 +01:00
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+s focus child
2019-02-26 13:44:40 +01:00
# 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'"
# 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 windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows 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"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
position top
status_command py3status -c /etc/i3/py3status
# status_command i3status
colors {
separator #586e75
background #002b36
statusline #aea79f
focused_workspace #586e75 #586e75 #ffffff
active_workspace #073642 #073642 #ffffff
inactive_workspace #002b36 #002b36 #aea79f
urgent_workspace #77216f #77216f #ffffff
}
}
client.focused #008666 #000000 #ffffff
client.focused_inactive #000000 #222222 #ffffff
client.unfocused #002b36 #333333 #ffffff #ffffff
client.urgent #aa0000 y#990000 #ffffff
#client.focused #586e75 #586e75 #fdf6e3 #268bd2
#client.focused_inactive #073642 #073642 #93a1a1 #002b36
#client.unfocused #002b36 #002b36 #586e75 #002b36
#client.urgent #dc322f #dc322f #fdf6e3 #dc322f