dotfiles

Yes, my $HOME has a git repo now :(

git clone git://git.shimmy1996.com/dotfiles.git
commit e8606510a441e5968b5a5ad9973a9d2186568636
parent 83ec06d3c38516bfb8222cb1d3756b99f92a6a15
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat, 19 Jan 2019 11:22:00 -0500

Add sway settings.

Diffstat:
A.config/background.png | 0
A.config/sway/colorscheme | 19+++++++++++++++++++
A.config/sway/config | 280+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 299 insertions(+), 0 deletions(-)
diff --git a/.config/background.png b/.config/background.png
Binary files differ.
diff --git a/.config/sway/colorscheme b/.config/sway/colorscheme
@@ -0,0 +1,19 @@
+## Base16 Gruvbox dark, pale
+# Author: Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
+
+set $base00 #262626
+set $base01 #3a3a3a
+set $base02 #4e4e4e
+set $base03 #8a8a8a
+set $base04 #949494
+set $base05 #dab997
+set $base06 #d5c4a1
+set $base07 #ebdbb2
+set $base08 #d75f5f
+set $base09 #ff8700
+set $base0A #ffaf00
+set $base0B #afaf00
+set $base0C #85ad85
+set $base0D #83adad
+set $base0E #d485ad
+set $base0F #d65d0e
diff --git a/.config/sway/config b/.config/sway/config
@@ -0,0 +1,279 @@
+### Variables
+## Window manager
+# Leading modifier key. Use Mod1 for Alt.
+set $mod Mod4
+# Home row direction keys.
+set $left h
+set $down j
+set $up k
+set $right l
+# Default gaps sizes.
+set $gaps_inner 10
+set $gaps_outer 0
+## Applications
+set $term env WINIT_HIDPI_FACTOR=1.0 WAYLAND_DISPLAY= alacritty
+set $menu rofi -i -show drun
+set $clipboard rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
+set $screenlocker swaylock -c {$base0D}80 -u
+set $screenshot swaygrab
+set $networkmenu $term -e nmtui
+## System Commands
+set $hibernate systemctl suspend
+set $reboot systemctl reboot
+set $shutdown shutdown -h now
+## Files
+set $background ~/.config/background.png
+
+### Aesthetics
+## Background
+output * bg $background stretch
+## Fonts
+font pango:Iosevka SS09 12
+## Window Style
+gaps inner $gaps_inner
+gaps outer $gaps_outer
+new_window pixel 2
+## Color Scheme
+include colorscheme
+# Basic color configuration using the Base16 variables for windows and borders.
+# Property Name         Border  BG      Text    Indicator Child Border
+client.focused          $base05 $base0D $base00 $base0D $base0D
+client.focused_inactive $base01 $base01 $base05 $base03 $base01
+client.unfocused        $base01 $base00 $base05 $base01 $base01
+client.urgent           $base08 $base08 $base00 $base08 $base08
+client.placeholder      $base00 $base00 $base05 $base00 $base00
+client.background       $base07
+
+### Output Configuration
+#
+# Example configuration:
+#
+#   output HDMI-A-1 resolution 1920x1080 position 1920,0
+#
+# You can get the names of your outputs by running: swaymsg -t get_outputs
+
+### Input configuration
+#
+# Example configuration:
+#
+#   input "2:14:SynPS/2_Synaptics_TouchPad" {
+#       dwt enabled
+#       tap enabled
+#       natural_scroll enabled
+#       middle_emulation enabled
+#   }
+#
+# You can get the names of your inputs by running: swaymsg -t get_inputs
+# Read `man 5 sway-input` for more information about this section.
+
+### Key bindings
+#
+# Basics:
+    # lock screen
+    bindsym $mod+Escape exec $screenlocker
+
+    # start a terminal
+    bindsym $mod+Return exec $term
+
+    # kill focused window
+    bindsym $mod+Shift+q kill
+
+    # start your launcher
+    bindsym $mod+d exec $menu
+    bindsym XF86Search exec $menu
+
+    # screenshot
+    bindsym Print exec $screenshot
+
+    # view clipbord
+    bindsym $mod+Shift+v exec $clipboard
+
+    # network
+    bindsym $mod+Shift+w exec $networkmenu
+
+    # backlight
+    bindsym XF86MonBrightnessUp exec xbacklight -ctrl intel_backlight -inc 10 && pkill -RTMIN+11 i3blocks
+    bindsym XF86MonBrightnessDown exec xbacklight -ctrl intel_backlight -dec 10 && pkill -RTMIN+11 i3blocks
+
+    # volume
+    bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% && pkill -RTMIN+10 i3blocks
+    bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% && pkill -RTMIN+10 i3blocks
+    bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle && pkill -RTMIN+10 i3blocks
+
+    # emoji and unicode character picker
+    bindsym $mod+u exec rofimoji
+    bindsym $mod+Shift+u exec unipicker --command "rofi -dmenu" --copy
+
+    # Drag floating windows by holding down $mod and left mouse button.
+    # Resize them with right mouse button + $mod.
+    # Despite the name, also works for non-floating windows.
+    # Change normal to inverse to use left mouse button for resizing and right
+    # mouse button for dragging.
+    floating_modifier $mod normal
+
+    # reload the configuration file
+    bindsym $mod+Shift+c reload
+
+    # exit sway (logs you out of your wayland session)
+    bindsym $mod+Shift+e exit
+
+#
+# Moving around:
+#
+    # Move your focus around
+    bindsym $mod+$left focus left
+    bindsym $mod+$down focus down
+    bindsym $mod+$up focus up
+    bindsym $mod+$right focus right
+    # or use $mod+[up|down|left|right]
+    bindsym $mod+Left focus left
+    bindsym $mod+Down focus down
+    bindsym $mod+Up focus up
+    bindsym $mod+Right focus right
+
+    # _move_ the focused window with the same, but add Shift
+    bindsym $mod+Shift+$left move left
+    bindsym $mod+Shift+$down move down
+    bindsym $mod+Shift+$up move up
+    bindsym $mod+Shift+$right move right
+    # ditto, with arrow 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
+#
+# Workspaces:
+#
+    # 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
+    # Note: workspaces can have any name you want, not just numbers.
+    # We just use 1-10 as the default.
+#
+# Layout stuff:
+#
+    # You can "split" the current object of your focus with
+    # $mod+b or $mod+v, for horizontal and vertical splits
+    # respectively.
+    bindsym $mod+b splith
+    bindsym $mod+v splitv
+
+    # Switch the current container between different layout styles
+    bindsym $mod+s layout stacking
+    bindsym $mod+w layout tabbed
+    bindsym $mod+e layout toggle split
+
+    # Make the current focus fullscreen
+    bindsym $mod+f fullscreen
+
+    # Toggle the current focus between tiling and floating mode
+    bindsym $mod+Shift+space floating toggle
+
+    # Swap focus between the tiling area and the floating area
+    bindsym $mod+space focus mode_toggle
+
+    # move focus to the parent container
+    bindsym $mod+a focus parent
+
+    bindsym $mod+g gaps inner current plus 5
+    bindsym $mod+Shift+g gaps inner current minus 5
+    bindsym $mod+t gaps inner current set $gaps_inner; gaps outer current set $gaps_outer
+    bindsym $mod+Shift+t gaps inner current set 0; gaps outer current set 0
+#
+# Scratchpad:
+#
+    # Sway has a "scratchpad", which is a bag of holding for windows.
+    # You can send windows there and get them back later.
+
+    # Move the currently focused window to the scratchpad
+    bindsym $mod+Shift+minus move scratchpad
+
+    # Show the next scratchpad window or hide the focused scratchpad window.
+    # If there are multiple scratchpad windows, this command cycles through them.
+    bindsym $mod+minus scratchpad show
+#
+# Resizing containers:
+#
+mode "resize" {
+    # left will shrink the containers width
+    # right will grow the containers width
+    # up will shrink the containers height
+    # down will grow the containers height
+    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
+
+    # ditto, with 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
+
+    # return to default mode
+    bindsym Return mode "default"
+    bindsym Escape mode "default"
+}
+bindsym $mod+r mode "resize"
+
+#
+# System power:
+#
+set $mode_power system: [h]ibernate [r]eboot [s]hutdown
+mode "$mode_power" {
+    bindsym h mode "default"; exec $screenlocker; exec $hibernate
+    bindsym r mode "default"; exec $reboot
+    bindsym s mode "default"; exec $shutdown
+    # return to default mode
+    bindsym Return mode "default"
+    bindsym Escape mode "default"
+}
+bindsym $mod+p mode "$mode_power"
+
+#
+# Status Bar:
+#
+# Read `man 5 sway-bar` for more information about this section.
+bar {
+    position top
+    status_command i3blocks
+    colors {
+        background $base00
+        separator  $base01
+        statusline $base04
+
+        # State             Border  BG      Text
+        focused_workspace   $base05 $base0D $base00
+        active_workspace    $base05 $base03 $base00
+        inactive_workspace  $base03 $base01 $base05
+        urgent_workspace    $base08 $base08 $base00
+        binding_mode        $base00 $base0A $base00
+    }
+}
+
+include /etc/sway/config.d/*
+
+### Startup Applications
+exec --no-startup-id mako
+exec --no-startup-id greenclip daemon
+exec --no-startup-id dropbox
+exec --no-startup-id fcitx -d+
\ No newline at end of file