commit 708f8379f07083498c3de1fb924b20bdf51c2d94
parent 3ee0a5c770330debb7591fc897869f85726f9cff
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Mon, 21 Jan 2019 18:09:53 -0500
Move majority of sway config to i3.
Diffstat:
3 files changed, 305 insertions(+), 293 deletions(-)
diff --git a/.config/i3/config b/.config/i3/config
@@ -0,0 +1,299 @@
+# i3 config file (v4)
+
+### 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 $menu rofi -i -show drun
+set $clipboard rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
+set $screenlocker swaylock -c 85ad8580 -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
+exec --no-startup-id feh --bg-fill $background
+## transparency under X
+exec --no-startup-id compton
+## Fonts
+font pango:Iosevka SS09 12
+## Window Style
+gaps inner $gaps_inner
+gaps outer $gaps_outer
+default_border pixel 2
+## Color Scheme (gruvbox-dark-pale)
+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
+# 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 --no-startup-id $screenlocker
+
+ # start a terminal
+ bindsym $mod+Return exec --no-startup-id ~/.local/bin/sway/launch-terminal
+
+ # kill focused window
+ bindsym $mod+Shift+q kill
+
+ # start your launcher
+ bindsym $mod+d exec --no-startup-id $menu
+ bindsym XF86Search exec --no-startup-id $menu
+
+ # screenshot
+ bindsym Print exec --no-startup-id $screenshot
+
+ # view clipbord
+ bindsym $mod+Shift+v exec --no-startup-id $clipboard
+
+ # network
+ bindsym $mod+Shift+w exec --no-startup-id $networkmenu
+
+ # backlight
+ bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -ctrl intel_backlight -inc 10 && pkill -RTMIN+11 i3blocks
+ bindsym XF86MonBrightnessDown exec --no-startup-id 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
+
+ # music control
+ bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+12 i3blocks
+ bindsym XF86AudioPrev exec --no-startup-id mpc prev && pkill -RTMIN+12 i3blocks
+ bindsym XF86AudioNext exec --no-startup-id mpc next && pkill -RTMIN+12 i3blocks
+
+ # emoji and unicode character picker
+ bindsym $mod+u exec --no-startup-id rofimoji
+ bindsym $mod+Shift+u exec --no-startup-id 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
+
+ # reload the configuration file
+ bindsym $mod+Shift+c reload
+
+#
+# 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 [l]ogout [r]eboot [s]hutdown
+mode "$mode_power" {
+ # exit sway (logs you out of your wayland session)
+ bindsym h mode "default"; exec $screenlocker; exec $hibernate
+ bindsym l mode "default"; exit
+ 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
+ }
+}
+
+### Startup Applications
+exec --no-startup-id greenclip daemon
+exec --no-startup-id ~/.local/bin/sway/start-notifyd
+exec --no-startup-id dropbox
+exec --no-startup-id fcitx -d
diff --git a/.config/sway/config b/.config/sway/config
@@ -1,301 +1,11 @@
-### 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 $menu rofi -i -show drun
-set $clipboard rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
-set $screenlocker swaylock -c 85ad8580 -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
+include ~/.config/i3/config
### Aesthetics
## Background
output * bg $background stretch
-## Fonts
-font pango:Iosevka SS09 12
-## Window Style
-gaps inner $gaps_inner
-gaps outer $gaps_outer
-default_border pixel 2
-## Color Scheme (gruvbox-dark-pale)
-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
-# 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
-## GTK Settings
+## GTK Settings (wayland specific)
exec_always ~/.local/bin/sway/import-gsettings \
gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \
cursor-theme:gtk-cursor-theme-name \
- font-name:gtk-font-name
-
-### 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 --no-startup-id $screenlocker
-
- # start a terminal
- bindsym $mod+Return exec --no-startup-id ~/.local/bin/sway/launch-terminal
-
- # kill focused window
- bindsym $mod+Shift+q kill
-
- # start your launcher
- bindsym $mod+d exec --no-startup-id $menu
- bindsym XF86Search exec --no-startup-id $menu
-
- # screenshot
- bindsym Print exec --no-startup-id $screenshot
-
- # view clipbord
- bindsym $mod+Shift+v exec --no-startup-id $clipboard
-
- # network
- bindsym $mod+Shift+w exec --no-startup-id $networkmenu
-
- # backlight
- bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -ctrl intel_backlight -inc 10 && pkill -RTMIN+11 i3blocks
- bindsym XF86MonBrightnessDown exec --no-startup-id 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
-
- # music control
- bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+12 i3blocks
- bindsym XF86AudioPrev exec --no-startup-id mpc prev && pkill -RTMIN+12 i3blocks
- bindsym XF86AudioNext exec --no-startup-id mpc next && pkill -RTMIN+12 i3blocks
-
- # emoji and unicode character picker
- bindsym $mod+u exec --no-startup-id rofimoji
- bindsym $mod+Shift+u exec --no-startup-id 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
-
- # reload the configuration file
- bindsym $mod+Shift+c reload
-
-#
-# 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 [l]ogout [r]eboot [s]hutdown
-mode "$mode_power" {
- # exit sway (logs you out of your wayland session)
- bindsym h mode "default"; exec $screenlocker; exec $hibernate
- bindsym l mode "default"; exit
- 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
- }
-}
-
-### Startup Applications
-exec --no-startup-id greenclip daemon
-exec --no-startup-id ~/.local/bin/sway/start-notifyd
-exec --no-startup-id dropbox
-exec --no-startup-id fcitx -d
+ font-name:gtk-font-name+
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
@@ -18,6 +18,8 @@
!.config/greenclip.cfg
!.config/gtk-3.0
!.config/gtk-3.0/*
+!.config/i3
+!.config/i3/*
!.config/i3blocks
!.config/i3blocks/*
!.config/mako