~ecs/dotfiles

3492f0cc014f155cbbfe3b0f7677391f6126c229 — Eyal Sawady 2 months ago c17c0b5
i3: update
1 files changed, 79 insertions(+), 32 deletions(-)

M etc/i3/config
M etc/i3/config => etc/i3/config +79 -32
@@ 1,3 1,5 @@
# Note: this config is optimized for an N900 with the US keyboard

set $focused_bg		#222222
set $focused_fg		#ffffff



@@ 33,6 35,7 @@ mode "workspace" {
        bindsym f workspace f
        bindsym g workspace g
        bindsym h workspace h
        bindsym j workspace j
        bindsym k workspace k
        bindsym l workspace l
        bindsym period workspace .


@@ 60,6 63,7 @@ mode "workspace" {
        bindsym Shift+f move container to workspace f
        bindsym Shift+g move container to workspace g
        bindsym Shift+h move container to workspace h
        bindsym Shift+j move container to workspace j
        bindsym Shift+k move container to workspace k
        bindsym Shift+l move container to workspace l
        bindsym Shift+period move container to workspace .


@@ 76,66 80,110 @@ mode "workspace" {
        bindsym Shift+Left move container to workspace prev
        bindsym Shift+Right move container to workspace next
        bindsym q mode "command"

	bindsym KP_Enter exec st -f "DejaVu Sans Mono-7"; mode "default"
}

# Control the music player daemon. Keybindings are roughly the same as in
# the ncmpcpp client.
mode "mpd" {
        bindsym p exec mpc toggle
        bindsym s exec mpc stop
mode "music" {
	# Music mode: control MPD

        bindsym Left exec mpc prev
        bindsym Right exec mpc next
        bindsym Up exec mpc vol +2
        bindsym Down exec mpc vol -2
	# Queue
	bindsym h exec "mpc prev"
	bindsym j exec "mpc stop"
	bindsym k exec "mpc toggle"
	bindsym l exec "mpc next"
	bindsym c exec "mpc clear"
	bindsym Shift+c exec "mpc crop"
	bindsym u exec "mpc shuffle"
	bindsym r mode "default"; exec mpc playlist | menu | xargs mpc del
	bindsym n exec "np | wl-copy"

        bindsym n exec st -f "DejaVu Sans Mono-7" -e ncmpcpp; mode "default"
        bindsym q mode "command"
	# Playlists
	bindsym s mode "default"; \
		exec mpc lsplaylists | menu | xargs mpc save
	bindsym d mode "default"; \
		exec mpc lsplaylists | menu | xargs mpc rm
	bindsym i mode "default"; \
		exec mpc lsplaylists | menu | xargs mpc playlist

	# Show queue
	bindsym u mode "default"; exec mpc playlist | menu

	# Seeking
	bindsym Shift+h exec "mpc seek -5"
	bindsym Shift+l exec "mpc seek +5"

	bindsym p mode "music/player"

	bindsym a mode "music/add"

	bindsym q mode "command"
}

mode "music/add" {
	bindsym t mode "default"; exec play-matching title
	bindsym a mode "default"; exec play-matching album
	bindsym i mode "default"; exec play-matching artist
	bindsym f mode "default"; exec play-matching file
	bindsym p mode "default"; exec mpc lsplaylists | menu | mpc load

	bindsym q mode "music"
}

mode "music/player" {
	bindsym c exec "mpc consume"
	bindsym r exec "mpc repeat"
	bindsym z exec "mpc random"
	bindsym s exec "mpc single"
	bindsym u exec "mpc update"

	bindsym q mode "music"
}

mode "command" {
	bindsym KP_Enter exec st -f "DejaVu Sans Mono-7"; mode "default"
        bindsym d exec dmenu_run; mode "default"
	bindsym d exec listall | menu | xargs i3-msg exec; mode "default"
        bindsym q mode "default"
        bindsym k kill; mode "default"
        bindsym i kill
        bindsym b exec netsurf
        bindsym r restart
        bindsym Shift+r exec doas reboot
        bindsym e exit
        bindsym Shift+e exec doas poweroff
	bindsym f fullscreen toggle
	bindsym l exec i3lock -fenc 000000; exec xset dpms force off; exec xset dpms force off; mode "default" 
	bindsym w exec i3lock -fenc 000000; exec xset dpms force off; exec xset dpms force off; mode "default"
        bindsym Shift+w exec i3lock -fenc 000000; exec doas pm-suspend; mode "default"

        bindsym Left focus left
        bindsym Right focus right
        bindsym Up focus up
        bindsym Down focus down
        bindsym h focus left
        bindsym l focus right
        bindsym k focus up
        bindsym j focus down

        bindsym Shift+Left move left
        bindsym Shift+Right move right
        bindsym Shift+Up move up
        bindsym Shift+Down move down
        bindsym Shift+h move left
        bindsym Shift+l move right
        bindsym Shift+k move up
        bindsym Shift+j move down

        bindsym h split h
        bindsym v split v

        bindsym w mode "workspace"
        bindsym m mode "mpd"
        bindsym s mode "workspace"
        bindsym m mode "music"
        bindsym p mode "music"

	bindsym space floating toggle
	bindsym Shift+space focus mode_toggle

	bindsym g scratchpad show
	bindsym Shift+g move scratchpad
}

# Enter command mode
bindsym Shift+space mode "command"
bindsym Shift+BackSpace workspace back_and_forth
bindsym Shift+KP_Enter exec st -f "DejaVu Sans Mono-7"

# This is the slidey button on the side
bindsym XF86ScreenSaver exec --no-startup-id disptoggle

# Pressing the power button suspends the device
bindsym XF86PowerOff exec --no-startup-id doas pm-suspend

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        position top
        status_command status


@@ 150,7 198,6 @@ bar {
        }
}

# Hide mouse cursor
exec --no-startup-id unclutter-xfixes --fork

default_border pixel 3