[i3/sway] Clean up config. Harmonize colors

This commit is contained in:
lhark 2019-08-27 02:47:26 +00:00
parent c8e4a1c6df
commit 742487711a
4 changed files with 91 additions and 167 deletions

View file

@ -57,16 +57,19 @@ client.background $base07
### Key bindings ### Key bindings
# #
# Basics: # Basics:
#
# exit i3/sway
bindsym $mod+Shift+e exec $exit
# lock session
bindsym Ctrl+Mod1+l exec $lock
# application launcher
bindsym $mod+r exec $menu
# start a terminal # start a terminal
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
# kill focused window
bindsym $mod+Shift+c kill
# start your launcher
bindsym $mod+r exec $menu
# call clipboard plumber # call clipboard plumber
bindsym $mod+v exec cliplumber bindsym $mod+v exec cliplumber
@ -75,21 +78,17 @@ client.background $base07
bindsym XF86AudioLowerVolume exec amixer -q set Master 1%- unmute bindsym XF86AudioLowerVolume exec amixer -q set Master 1%- unmute
bindsym XF86AudioMute exec amixer -q set Master toggle bindsym XF86AudioMute exec amixer -q set Master toggle
# lock session
bindsym Ctrl+Mod1+l exec $lock
# 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 # reload the configuration file
bindsym $mod+Shift+r reload bindsym $mod+Shift+r reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
# restart i3/sway inplace (preserves your layout/session)
bindsym $mod+Shift+x restart bindsym $mod+Shift+x restart
# exit
bindsym $mod+Shift+e exec $exit # kill focused window
bindsym $mod+Shift+c kill
# mouse button for dragging.
floating_modifier $mod normal
# #
# Moving around: # Moving around:
@ -185,15 +184,10 @@ client.background $base07
# Resizing containers: # Resizing containers:
# #
mode "resize" { 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 10px bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px bindsym $right resize grow width 10px
# ditto, with arrow keys # ditto, with arrow keys
bindsym Left resize shrink width 10px bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px bindsym Down resize grow height 10px
@ -224,11 +218,6 @@ bar {
#status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done #status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
status_command i3status status_command i3status
#colors {
# statusline #ffffff
# background #323232
# inactive_workspace #32323200 #32323200 #5c5c5c
#}
# Base16 colors for the statusbar # Base16 colors for the statusbar
colors { colors {
background $base00 background $base00
@ -236,12 +225,13 @@ bar {
statusline $base05 statusline $base05
# State Border BG Text # State Border BG Text
focused_workspace $base05 $base0D $base00 focused_workspace $base0D $base0D $base00
active_workspace $base05 $base03 $base00 active_workspace $base03 $base03 $base00
inactive_workspace $base03 $base01 $base05 inactive_workspace $base01 $base01 $base05
urgent_workspace $base08 $base08 $base00 urgent_workspace $base0F $base0F $base00
binding_mode $base00 $base0A $base00 binding_mode $base0A $base0A $base00
} }
separator_symbol " | "
strip_workspace_numbers yes strip_workspace_numbers yes
} }

View file

@ -1,89 +1,17 @@
# This file has been auto-generated by i3-config-wizard(1). ###############################################
# It will not be overwritten, so edit it as you like. # i3 config file (v4) #
# # Manual https://i3wm.org/docs/userguide.html #
# Should you change your keyboard layout some time, delete ###############################################
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# i3/sway common config
include ./common include ./common
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
set $lock i3lock -c 000000
set $menu dmenu_run
# start dmenu (a program launcher)
bindsym $mod+r exec dmenu_run
# call clipboard plumber
bindsym $mod+v exec cliplumber
# 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+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l 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+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l 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+shift+v split h
# split in vertical orientation
bindsym $mod+ctrl+shift+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
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+d focus child
# exit i3 (logs you out of your X session) # 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'" set $exit i3-msg exit
bindsym $mod+Shift+e exec i3-msg exit #set $exit "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'"
# Start i3bar to display a workspace bar (plus the system information i3status # Screen locker
# finds out, if available) set $lock i3lock -c 000000
bar {
position top # Application launcher
status_command i3status set $menu dmenu_run
strip_workspace_numbers yes
}

View file

@ -7,8 +7,13 @@
# If the above line is not correctly displayed, fix your editor first! # If the above line is not correctly displayed, fix your editor first!
general { general {
colors = true colors = true
interval = 5 interval = 5
# Base16 gruvbox-dark-pale
color_good = "#afaf00"
color_degraded = "#ffaf00"
color_bad = "#d65d0e"
} }
order += "ipv6" order += "ipv6"
@ -20,34 +25,41 @@ order += "load"
order += "memory" order += "memory"
order += "tztime local" order += "tztime local"
ipv6 {
format_down = ""
}
wireless _first_ { wireless _first_ {
format_up = "W: (%quality at %essid) %ip" format_up = "W: (%quality at %essid) %ip"
format_down = "W: down" format_down = "W: down"
} }
ethernet _first_ { ethernet _first_ {
format_up = "E: %ip (%speed)" format_up = "E: %ip (%speed)"
format_down = "E: down" format_down = "E: down"
} }
battery all { battery all {
format = "%status %percentage %remaining" format = "%status %percentage %remaining"
format_down = ""
} }
disk "/" { disk "/" {
format = "%avail" format = "%avail"
low_threshold = "5"
threshold_type = "percentage_free"
} }
load { load {
format = "%1min" format = "%1min"
} }
memory { memory {
format = "%used | %available" format = "%used:%available"
threshold_degraded = "1G" threshold_degraded = "1G"
format_degraded = "MEMORY < %available" format_degraded = "MEMORY < %available"
} }
tztime local { tztime local {
format = "%Y-%m-%d %H:%M:%S" format = "%Y-%m-%d %H:%M"
} }

View file

@ -1,46 +1,44 @@
# Default config for sway ####################
# # sway config file #
# Read `man 5 sway` for a complete reference. # `man 5 sway` #
####################
# i3/sway common config # i3/sway common config
include ../i3/common include ../i3/common
# Your preferred application launcher
# Note: it's recommended that you pass the final command to sway
set $menu dmenu_path | bemenu | xargs swaymsg exec --
# exit sway (logs you out of your Wayland session) # exit sway (logs you out of your Wayland session)
set $exit swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' set $exit swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
### Output configuration # Screen locker
# set $lock swaylock -f -c 000000
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
#
# 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
### Idle configuration # Application launcher
# # Note: it's recommended that you pass the final command to sway
# Example configuration: set $menu dmenu_path | bemenu | xargs swaymsg exec --
#
# exec swayidle -w \ # Default wallpaper
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# Set keyboard layout
input * xkb_layout fr,us
############
# Examples #
############
# Output config
# output HDMI-A-1 resolution 1920x1080 position 1920,0
# Get outputs names
# swaymsg -t get_outputs
# Idle config
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \ # timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * dpms off"' \ # timeout 600 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on"' \ # resume 'swaymsg "output * dpms on"' \
# before-sleep 'swaylock -f -c 000000' # before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration # Input configuration (man 5 sway-input)
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" { # input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled # dwt enabled
# tap enabled # tap enabled
@ -48,11 +46,7 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# middle_emulation enabled # middle_emulation enabled
# } # }
# #
# You can get the names of your inputs by running: swaymsg -t get_inputs # Get inputs names
# Read `man 5 sway-input` for more information about this section. # swaymsg -t get_inputs
# Set keyboard layout
input * xkb_layout fr,us
include /etc/sway/config.d/* include /etc/sway/config.d/*