diff options
author | Jakob Odersky <jakob@odersky.com> | 2017-05-18 23:40:18 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2017-05-18 23:40:18 -0700 |
commit | 906c506f92ac835a2b66cec92ebaafdf13ef875a (patch) | |
tree | 751eb987fd37ee2f5c00b96cc72c026452bb10fe /home | |
parent | 0cf98cdcfb6b3ae70fa2ffa8b1593b97cb1edec3 (diff) | |
download | dotfiles-906c506f92ac835a2b66cec92ebaafdf13ef875a.tar.gz dotfiles-906c506f92ac835a2b66cec92ebaafdf13ef875a.tar.bz2 dotfiles-906c506f92ac835a2b66cec92ebaafdf13ef875a.zip |
Adapt settings to x260
Diffstat (limited to 'home')
-rw-r--r-- | home/.config/i3/config | 33 | ||||
-rwxr-xr-x | home/bin/setup | 35 |
2 files changed, 56 insertions, 12 deletions
diff --git a/home/.config/i3/config b/home/.config/i3/config index 8ffa00d..25cc83c 100644 --- a/home/.config/i3/config +++ b/home/.config/i3/config @@ -41,8 +41,10 @@ bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # move workspaces between monitors -bindsym $mod+Shift+greater move workspace to output right -bindsym $mod+Shift+less move workspace to output left +bindsym $mod+Shift+Control+Left move workspace to output right +bindsym $mod+Shift+Control+Right move workspace to output left +bindsym $mod+Shift+Control+Up move workspace to output up +bindsym $mod+Shift+Control+Down move workspace to output down # split in horizontal orientation bindsym $mod+h split h @@ -138,7 +140,7 @@ bindsym $mod+x exec --no-startup-id dmenu_run # all executables mode "common" { bindsym t exec i3-sensible-terminal, mode "default" bindsym e exec emacsclient --alternate-editor='' --create-frame --no-wait , mode "default" - bindsym f exec firefox, mode "default" + bindsym f exec google-chrome, mode "default" bindsym p exec open-project, mode "default" bindsym y exec ~/bin/passmenu --type, mode "default" bindsym Shift+y exec ~/bin/passmenu, mode "default" @@ -148,23 +150,29 @@ mode "common" { bindsym $mod+q mode "common" mode "setup" { - bindsym 0 exec --no-startup-id setup mirror - bindsym 1 exec --no-startup-id setup single - bindsym 2 exec --no-startup-id setup double + bindsym 0 exec --no-startup-id ~/bin/setup mirror + bindsym 1 exec --no-startup-id ~/bin/setup single + bindsym 2 exec --no-startup-id ~/bin/setup double bindsym Return mode "default" bindsym Escape mode "default" } -bindsym XF86LaunchA mode setup +bindsym XF86Explorer mode setup -# media keys +mode "media" { + bindsym space exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause, exec pkill -SIGRTMIN+10 i3blocks, mode "default" + bindsym Right exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next, exec pkill -SIGRTMIN+10 i3blocks, mode "default" + bindsym Left exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous, exec pkill -SIGRTMIN+10 i3blocks, mode "default" + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+m mode "media" + +# volume keys bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ '-5%', exec pkill -SIGRTMIN+10 i3blocks bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ '+5%', exec pkill -SIGRTMIN+10 i3blocks bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle, exec pkill -SIGRTMIN+10 i3blocks -bindsym XF86AudioPlay exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause, exec pkill -SIGRTMIN+10 i3blocks -bindsym XF86AudioNext exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next, exec pkill -SIGRTMIN+10 i3blocks -bindsym XF86AudioPrev exec --no-startup-id dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous, exec pkill -SIGRTMIN+10 i3blocks -# lighting +# backlight bindsym XF86MonBrightnessDown exec --no-startup-id ~/bin/backlight dec, exec pkill -SIGRTMIN+10 i3blocks bindsym XF86MonBrightnessUp exec --no-startup-id ~/bin/backlight inc, exec pkill -SIGRTMIN+10 i3blocks @@ -178,6 +186,7 @@ bindsym $mod+Control+l exec --no-startup-id systemctl suspend # utility applications exec --no-startup-id nm-applet +exec --no-startup-id blueman-applet exec --no-startup-id redshift # layout preferences diff --git a/home/bin/setup b/home/bin/setup new file mode 100755 index 0000000..b56ea71 --- /dev/null +++ b/home/bin/setup @@ -0,0 +1,35 @@ +#!/bin/bash + +internal=eDP-1 +external=$(xrandr | grep -w connected | grep -v "$internal" | cut -d ' ' -f 1) + +case "$1" in + single) + xrandr --output "$internal" --auto --primary --output "$external" --off + #xrandr --dpi 172 + #gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gdk/WindowScalingFactor': <1>}" + #emacsclient -e '(zoom-all-frames-in)' + #emacsclient -e '(zoom-all-frames-in)' + ;; + double) + xrandr --output "$internal" --auto --output "$external" --auto --primary --above "$internal" + #gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gdk/WindowScalingFactor': <1>}" + #emacsclient -e '(zoom-all-frames-out)' + #emacsclient -e '(zoom-all-frames-out)' + ;; + mirror) + xrandr --output "$internal" --auto --output "$ex3ternal" --auto --same-as "$internal" + #gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gdk/WindowScalingFactor': <1>}" + ;; + *) + echo "Usage: $0 (single|double|mirror)" 1>&2 + exit 1 + ;; +esac + +xmodmap ~/.Xmodmap +i3-msg restart + +#echo "Reverting to single display in 10 seconds." 1>&2 +#sleep 10 +#"$0" single |