From a347622f9f683ec69c529bc403e56eeec68d1b36 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 19 Dec 2021 22:09:13 +0800 Subject: Update i3wm config --- .config/i3/config | 83 +++++++++++++++++++++++++++++++------------------ .config/i3status/config | 53 +++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 31 deletions(-) create mode 100644 .config/i3status/config (limited to '.config') diff --git a/.config/i3/config b/.config/i3/config index 09dfd37..6471a29 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -32,7 +32,7 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork # and nm-applet is a desktop environment-independent system tray GUI for it. exec --no-startup-id nm-applet -exec --no-startup-id fcitx5 -d +exec --no-startup-id autostart # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status @@ -45,13 +45,13 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU floating_modifier $mod # start a terminal -bindsym $mod+Return exec xterm +bindsym $mod+Shift+Return exec st # kill focused window bindsym $mod+q kill # start dmenu (a program launcher) -bindsym $mod+space exec --no-startup-id dmenu_run +bindsym $mod+space exec --no-startup-id dmenu_run -m 0 -fn monospace:size=12 -nb '#222222' -nf '#bbbbbb' -sb '#005577' -sf '#eeeeee' # A more modern dmenu replacement is rofi: # bindcode $mod+40 exec "rofi -modi drun,run -show drun" # There also is i3-dmenu-desktop which only displays applications shipping a @@ -82,20 +82,9 @@ 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 v - -# split in vertical orientation -bindsym $mod+v split h - # 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 @@ -105,9 +94,6 @@ bindsym $mod+d focus mode_toggle # focus the parent container bindsym $mod+a focus parent -# focus the child container -#bindsym $mod+d focus child - # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. set $ws1 "1" @@ -145,12 +131,18 @@ bindsym $mod+Shift+8 move container to workspace number $ws8 bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+0 move container to workspace number $ws10 +bindsym $mod+Tab workspace next +bindsym $mod+Shift+Tab workspace prev + +# focus the child container +bindsym $mod+c focus child + # reload the configuration file bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) -bindsym $mod+Shift+q 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'" +bindsym $mod+Shift+q exec i3-msg exit # resize window (you can also use the mouse for that) mode "resize" { @@ -179,22 +171,51 @@ mode "resize" { bindsym $mod+r mode "resize" +mode "move" { + bindsym Tab focus right + + bindsym h move left + bindsym j move down + bindsym k move up + bindsym l move right + + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+m mode "default" +} + +bindsym $mod+m mode "move" focus floating + +# mode "system" { +# bindsym r exec reboot +# bindsym s exec shutdown now +# +# bindsym Return mode "default" +# bindsym Escape mode "default" +# bindsym $mod+s mode "default" +# } +# +# bindsym $mod+s mode "system" + +bindsym $mod+e layout toggle split +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+v split toggle + bindsym $mod+equal scratchpad show bindsym $mod+minus move scratchpad # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) -# bar { -# status_command i3status -# } - -for_window [class="Steam" title=".*"] floating enable -for_window [class="Lutris"] floating enable -for_window [class="KeePassXC"] floating enable -for_window [class="GameHub"] floating enable -for_window [class="Minigalaxy"] floating enable -for_window [class="Volume Control"] floating enable -for_window [class="Heroic"] floating enable - -exec_always --no-startup-id $HOME/.config/polybar/launch.sh +bar { + position top + font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 + font pango:DejaVu Sans Mono 12 + separator_symbol ":|:" + status_command i3status +} +# for_window [class="Steam" title=".*"] floating enable +# for_window [class="KeePassXC"] floating enable +# for_window [title="Origin"] floating enable +for_window [instance="origin.exe"] floating enable diff --git a/.config/i3status/config b/.config/i3status/config new file mode 100644 index 0000000..f503b7a --- /dev/null +++ b/.config/i3status/config @@ -0,0 +1,53 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 +} + +# order += "ipv6" +# order += "wireless _first_" +# order += "ethernet _first_" +# order += "battery all" +# order += "disk /" +# order += "load" +# order += "memory" +order += "tztime local" + +wireless _first_ { + format_up = "W: (%quality at %essid) %ip" + format_down = "W: down" +} + +ethernet _first_ { + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +battery all { + format = "%status %percentage %remaining" +} + +disk "/" { + format = "%avail" +} + +load { + format = "%1min" +} + +memory { + format = "%used | %available" + threshold_degraded = "1G" + format_degraded = "MEMORY < %available" +} + +tztime local { + format = "%a %d %b %H:%M" +} -- cgit v1.2.3