From 7c0481af47905d159411a378b92744571cfee2c9 Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Sun, 14 Nov 2021 20:19:22 +1030 Subject: [PATCH] updates to i3 conf --- .config/i3/config | 41 ++++++++++---------------- .config/i3status/config | 65 +++++++++++++++++++++++++++++++++++++++++ .xinitrc | 4 --- 3 files changed, 80 insertions(+), 30 deletions(-) create mode 100644 .config/i3status/config diff --git a/.config/i3/config b/.config/i3/config index be58424..b2c54e9 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -52,31 +52,20 @@ bindsym $mod+Shift+j kill # start dmenu (a program launcher) bindsym $mod+a exec --no-startup-id "dmenu_run -bw 3 -c -l 15 -h 26" -# 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 -# .desktop file. It is a wrapper around dmenu, so you need that installed. -# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +# prompt for shutdown, restart, lock, and logout +bindsym $mod+Shift+s exec /usr/local/bin/dmenuprompt "Are you sure you want to Shutdown?" "shutdown now" +bindsym $mod+Shift+r exec /usr/local/bin/dmenuprompt "Are you sure you want to Restart?" "reboot" +bindsym $mod+Escape exec /usr/local/bin/dmenuprompt "Are you sure you want to lock?" "slock" 1 +bindsym $mod+Shift+l exec /usr/local/bin/dmenuprompt "Are you sure you want to logout?" "logout" # change focus -bindsym $mod+h focus left -bindsym $mod+t focus down -bindsym $mod+n focus up -bindsym $mod+s 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+t move down -bindsym $mod+Shift+n move up -bindsym $mod+Shift+s 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 @@ -160,16 +149,16 @@ mode "resize" { # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. - bindsym h resize shrink width 10 px or 10 ppt - bindsym t resize grow height 10 px or 10 ppt - bindsym n resize shrink height 10 px or 10 ppt - bindsym s resize grow width 10 px or 10 ppt + bindsym h resize shrink width 5 px or 5 ppt + bindsym t resize grow height 5 px or 5 ppt + bindsym n resize shrink height 5 px or 5 ppt + bindsym s resize grow width 5 px or 5 ppt # same bindings, but for the 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 + bindsym Left resize shrink width 5 px or 5 ppt + bindsym Down resize grow height 5 px or 5 ppt + bindsym Up resize shrink height 5 px or 5 ppt + bindsym Right resize grow width 5 px or 5 ppt # back to normal: Enter or Escape or $mod+r bindsym Return mode "default" @@ -186,4 +175,4 @@ bar { } gaps inner 8 -gaps outer 8 +gaps outer 4 diff --git a/.config/i3status/config b/.config/i3status/config new file mode 100644 index 0000000..1a75ebd --- /dev/null +++ b/.config/i3status/config @@ -0,0 +1,65 @@ +general { + colors = true + interval = 1 +} + +order += "ipv6" +order += "wireless wlp36s0" +order += "ethernet enp33s0" +order += "path_exists VPN" +order += "battery 0" +order += "disk /" +order += "memory" +order += "cpu_usage" +order += "tztime local" +order += "tztime adelaide" + +wireless wlp36s0 { + format_up = "W: (%quality at %essid, %bitrate) %ip" + format_down = "W: down" +} + +ethernet enp33s0 { + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +battery 0 { + format = "%status %percentage %remaining %emptytime" + format_down = "No battery" + status_chr = "⚡ CHR" + status_bat = "🔋 BAT" + status_unk = "? UNK" + status_full = "☻ FULL" + path = "/sys/class/power_supply/BAT%d/uevent" + low_threshold = 10 +} + +path_exists VPN { + # path exists when a VPN tunnel launched by nmcli/nm-applet is active + path = "/proc/sys/net/ipv4/conf/tun0" +} + +tztime local { + format = "%Y-%m-%d %H:%M:%S" + hide_if_equals_localtime = true +} + +tztime adelaide { + format = "%Y-%m-%d %H:%M:%S %Z" + timezone = "Australia/Adelaide" +} + +cpu_usage { + format = "all: %usage" +} + +memory { + format = "%used" + threshold_degraded = "10%" + format_degraded = "MEMORY: %free" +} + +disk "/" { + format = "%free" +} diff --git a/.xinitrc b/.xinitrc index 0daac4b..2445096 100644 --- a/.xinitrc +++ b/.xinitrc @@ -47,7 +47,3 @@ if [ "$HOST" == "archmetabox" ] ; then xrandr --auto fi -# start my trusty window manager -#exec xmonad --recompile -#exec xmonad --replace -