From 9b314f0932bd3189b704cfc51145b925ccb39d86 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Sun, 18 Sep 2022 16:17:58 -0400 Subject: post-reinstall i3, fixed persistent xresources errors --- .config/i3/config | 286 +++++++++++++++++++----------------------------- .config/i3blocks/config | 6 +- .xinitrc | 12 +- 3 files changed, 121 insertions(+), 183 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 9b4336a..8007890 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -1,22 +1,13 @@ -## i3 config file (v4) -## -## Please see https://i3wm.org/docs/userguide.html for a complete reference! +## GENERAL -## GENERAL -default_border pixel 1 -default_floating_border pixel 1 font pango:sans-serif 13 -force_display_urgency_hint 500 ms -hide_edge_borders smart -set $locker xautolock -locknow -set $mod Mod1 +set $term LIBGL_ALWAYS_SOFTWARE=1 i3-sensible-terminal set $sigaudio pkill -75 i3blocks -set $syncmail "mbsync -c ~/.config/mbsync/mbsyncrc -a && pkill -77 i3blocks && notify-send Mail synced" -set $mail "alacritty -e zsh -i -c 'cd ~/downloads ; mutt ; cd - ' ; mbsync -c ~/.config/mbsync/mbsyncrc -a && pkill -77 i3blocks && notify-send Mail synced" -title_align center -workspace_auto_back_and_forth yes ## WORKSPACES + +workspace_auto_back_and_forth yes + set $ws1 "1:󰖟" set $ws2 "2:󰲢" set $ws3 "3:󰲤" @@ -28,186 +19,143 @@ set $ws8 "8:󰲮" set $ws9 "9:󰣀" set $ws10 "10:󰭹" -workspace $ws1 output DP-3 -workspace $ws2 output DP-3 -workspace $ws3 output DP-3 -workspace $ws4 output DP-3 -workspace $ws5 output DP-3 -workspace $ws6 output DP-3 -workspace $ws7 output DP-3 -workspace $ws8 output DP-3 -workspace $ws9 output DP-3 -workspace $ws10 output DP-3 +workspace $ws1 output primary +workspace $ws2 output primary +workspace $ws3 output primary +workspace $ws4 output primary +workspace $ws5 output primary +workspace $ws6 output primary +workspace $ws7 output primary +workspace $ws8 output primary +workspace $ws9 output primary +workspace $ws10 output primary # switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 -bindsym $mod+9 workspace $ws9 -bindsym $mod+0 workspace $ws10 -bindsym $mod+Tab workspace back_and_forth +bindsym Mod1+1 workspace $ws1 +bindsym Mod1+2 workspace $ws2 +bindsym Mod1+3 workspace $ws3 +bindsym Mod1+4 workspace $ws4 +bindsym Mod1+5 workspace $ws5 +bindsym Mod1+6 workspace $ws6 +bindsym Mod1+7 workspace $ws7 +bindsym Mod1+8 workspace $ws8 +bindsym Mod1+9 workspace $ws9 +bindsym Mod1+0 workspace $ws10 +bindsym Mod1+Tab workspace back_and_forth # move focused container to workspace -bindsym $mod+shift+1 move container to workspace $ws1 -bindsym $mod+shift+2 move container to workspace $ws2 -bindsym $mod+shift+3 move container to workspace $ws3 -bindsym $mod+shift+4 move container to workspace $ws4 -bindsym $mod+shift+5 move container to workspace $ws5 -bindsym $mod+shift+6 move container to workspace $ws6 -bindsym $mod+shift+7 move container to workspace $ws7 -bindsym $mod+shift+8 move container to workspace $ws8 -bindsym $mod+shift+9 move container to workspace $ws9 -bindsym $mod+shift+0 move container to workspace $ws10 - -## COLORS -set_from_resource $color0 i3wm.color0 -set_from_resource $color15 i3wm.color15 -set_from_resource $color8 i3wm.color8 -set_from_resource $coloru i3wm.color2 -set_from_resource $color4 i3wm.color4 -set_from_resource $split i3wm.color4 -set_from_resource $color_active i3wm.color4 -set_from_resource $colorin i3wm.color10 -set_from_resource $color_bar_urgent i3wm.color2 -set_from_resource $color_workspace_urgent i3wm.color1 - -client.background $color0 -# class border backgr text indicator child_border -client.focused $color_active $color_active $color15 $split $color_active -client.focused_inactive $color_active $color_active $color15 $split $colorin -client.placeholder $color0 $color8 $color15 $color0 $color8 -client.unfocused $colorin $colorin $color15 $split $colorin -client.urgent $coloru $coloru $color15 $coloru $coloru +bindsym Mod1+shift+1 move container to workspace $ws1 +bindsym Mod1+shift+2 move container to workspace $ws2 +bindsym Mod1+shift+3 move container to workspace $ws3 +bindsym Mod1+shift+4 move container to workspace $ws4 +bindsym Mod1+shift+5 move container to workspace $ws5 +bindsym Mod1+shift+6 move container to workspace $ws6 +bindsym Mod1+shift+7 move container to workspace $ws7 +bindsym Mod1+shift+8 move container to workspace $ws8 +bindsym Mod1+shift+9 move container to workspace $ws9 +bindsym Mod1+shift+0 move container to workspace $ws10 + +# move workspaces between outputs on dock +bindsym Mod1+d exec xrandr --output DP-3 --auto --primary --output eDP-1 --auto --off +bindsym Mod1+shift+d exec xrandr --output DP-3 --auto --off --output eDP-1 --auto --primary + +## WINDOWS + +default_border pixel +hide_edge_borders smart +title_align center +bindsym Mod1+shift+p move scratchpad +bindsym Mod1+p scratchpad show -## WINDOW CONTROL # movement -floating_modifier $mod set $down j set $left h set $right l set $up k # change focus -bindsym $mod+$down focus down -bindsym $mod+$left focus left -bindsym $mod+$right focus right -bindsym $mod+$up focus up +bindsym Mod1+$down focus down +bindsym Mod1+$left focus left +bindsym Mod1+$right focus right +bindsym Mod1+$up focus up +bindsym Mod1+space focus mode_toggle # move focused window -bindsym $mod+shift+$down move down -bindsym $mod+shift+$left move left -bindsym $mod+shift+$right move right -bindsym $mod+shift+$up move up +bindsym Mod1+shift+$down move down +bindsym Mod1+shift+$left move left +bindsym Mod1+shift+$right move right +bindsym Mod1+shift+$up move up # resize -bindsym $mod+i resize grow height 100 or 10 -bindsym $mod+o resize grow width 100 or 10 -bindsym $mod+u resize shrink height 100 or 10 -bindsym $mod+y resize shrink width 100 or 10 +bindsym Mod1+i resize grow height 100 or 10 +bindsym Mod1+o resize grow width 100 or 10 +bindsym Mod1+u resize shrink height 100 or 10 +bindsym Mod1+y resize shrink width 100 or 10 ## LAYOUT -# split direction -bindsym $mod+q split toggle - -# fullscreen mode -bindsym $mod+f fullscreen toggle -# container layout -bindsym $mod+shift+w layout toggle tabbed stacking -bindsym $mod+shift+e layout toggle split +bindsym Mod1+f fullscreen toggle +bindsym Mod1+shift+space floating toggle +bindsym Mod1+shift+s floating enable; sticky toggle -# toggle tiling / floating / sticky -bindsym $mod+shift+space floating toggle -bindsym $mod+shift+s floating enable; sticky toggle +## CONTROLS -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle +bindsym Mod1+shift+q kill +bindsym Mod1+shift+e exit +bindsym Mod1+shift+c reload +bindsym Mod1+shift+r restart ## SHORTCUTS -#bindsym $mod+F1 exec dock.sh dock -#bindsym $mod+shift+F1 exec dock.sh undock -#bindsym $mod+F1 move workspace to output down -#bindsym $mod+shift+F1 move workspace to output up -#bindsym $mod+F1 workspace --no-auto-back-and-forth $ws1; move workspace to output down; -bindsym $mod+F2 exec firefox -bindsym $mod+shift+F2 exec firefox --private-window -bindsym $mod+F3 exec url_handler.sh -bindsym $mod+F4 exec $mail -bindsym $mod+shift+F4 exec $syncmail -#bindsym $mod+F5 exec alacritty -e zsh -i -c 'newsboat && pkill -78 i3blocks' -bindsym $mod+F6 exec --no-startup-id dict.sh -#bindsym $mod+F7 exec -#bindsym $mod+F8 exec "killall pwcview || exec pwcview -f 30 -s sif" -#bindsym $mod+shift+F8 exec --no-startup-id toggle-screencast.sh -bindsym $mod+F9 exec passmenu.sh -#bindsym $mod+shift+F9 exec --no-startup-id "killall picom || exec picom" -#bindsym $mod+F10 exec xautolock -toggle -#bindsym $mod+shift+F12 exec alacritty -e zsh -i -c mixertui && pkill -75 i3blocks -bindsym $mod+Return split horizontal; exec alacritty -bindsym $mod+shift+Return split vertical; exec alacritty -bindsym $mod+shift+Insert exec $locker -bindsym $mod+a exec rofi -show run -bindsym $mod+s exec rofi -show ssh -bindsym $mod+shift+q kill + +bindsym Mod1+Return split horizontal; exec $term +bindsym Mod1+shift+Return split vertical; exec $term +bindsym Mod4+p exec arandr +bindsym Mod4+l exec xautolock -locknow +bindsym Mod1+F1 exec rofi -show run +bindsym Mod1+shift+F1 exec rofi -show ssh +bindsym Mod1+F2 exec firefox +bindsym Mod1+F3 exec thunderbird +#bindsym Mod1+F4 exec +#bindsym Mod1+F5 exec +#bindsym Mod1+F1 exec +#bindsym Mod1+F1 exec +#bindsym Mod1+F1 exec +#bindsym Mod1+F6 exec +#bindsym Mod1+F7 exec +#bindsym Mod1+F8 exec +bindsym Mod1+F9 exec passmenu.sh +bindsym Mod1+F10 exec mixer vol -5 && $sigaudio +bindsym Mod1+F11 exec mixer vol +5 && $sigaudio +bindsym Mod1+F12 exec mixer vol 0 && $sigaudio +bindsym XF86AudioLowerVolume exec mixer vol -5 && $sigaudio +bindsym XF86AudioRaiseVolume exec mixer vol +5 && $sigaudio +bindsym XF86AudioMute exec mixer vol 0 && $sigaudio bindsym --release Print exec import -window root ~/Nextcloud/InstantUpload/Screenshots/`date +"%Y-%m-%d-%H-%M-%S"`.png bindsym --release shift+Print exec import -monitor ~/Nextcloud/InstantUpload/Screenshots/`date +"%Y-%m-%d-%H-%M-%S"`.png -#bindsym --release $mod+Print exec import -monitor ~/Nextcloud/InstantUpload/Screenshots/`date +"%Y-%m-%d-%H-%M-%S"`.png -bindsym Mod4+p exec nvidia-settings -bindsym $mod+F10 exec --no-startup-id mixer vol 0 && $sigaudio -bindsym $mod+F11 exec --no-startup-id mixer vol -5 && $sigaudio -bindsym $mod+F12 exec --no-startup-id mixer vol +5 && $sigaudio -bindsym XF86AudioLowerVolume exec --no-startup-id mixer vol -5 && $sigaudio -bindsym XF86AudioMute exec --no-startup-id mixer vol 0 && $sigaudio -bindsym XF86AudioRaiseVolume exec --no-startup-id mixer vol +5 && $sigaudio - -# scratchpad terminal -bindsym $mod+shift+p move scratchpad -bindsym $mod+p scratchpad show - -# 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 - -set $mode_system 󰌾l 󰩈e 󰤄s 󰤁r 󰤂shift+s -mode "$mode_system" { - bindsym e exit - bindsym l exec --no-startup-id $locker, mode "default" - bindsym s exec --no-startup-id $locker ; exec --no-startup-id sleep 2 && doas acpiconf -s3, mode "default" - bindsym r exec doas reboot - bindsym shift+s exec doas poweroff - bindsym Return mode "default" - bindsym q mode "default" - bindsym Escape mode "default" -} -set $mode_volume 󰝞j 󰝝k 󰸈m -mode "$mode_volume" { - bindsym j exec mixer vol -5 && $sigaudio - bindsym m exec mixer vol 0 && $sigaudio - bindsym k exec mixer vol +5 && $sigaudio - bindsym Return mode "default" - bindsym q mode "default" - bindsym Escape mode "default" -} +## COLORS -set $mode_help 󱊫Help/Handbook 󱊬Browser 󱊭Files 󱊮Email 󱊯News 󱊰YouTube 󱊱Dictionary 󱊲Dock/Compositor 󱊳Ports 󱊴Webcam/Screencast 󱊵AutoLock-Toggle 󱊶Mixer -mode "$mode_help" { - bindsym Return mode "default" - bindsym q mode "default" - bindsym Escape mode "default" -} +# see .Xresources +set_from_resource $color0 i3wm.color0 +set_from_resource $color15 i3wm.color15 +set_from_resource $color4 i3wm.color4 +set_from_resource $color8 i3wm.color8 +set_from_resource $color_active i3wm.color4 +set_from_resource $color_bar_urgent i3wm.color2 +set_from_resource $color_workspace_urgent i3wm.color1 +set_from_resource $colorin i3wm.color10 +set_from_resource $coloru i3wm.color2 +set_from_resource $split i3wm.color4 -bindsym $mod+Insert mode "$mode_system" -#bindsym $mod+F1 mode "$mode_help" -#bindsym $mod+F12 mode "$mode_volume" +client.background $color0 +client.focused $color_active $color_active $color15 $split $color_active +client.focused_inactive $color_active $color_active $color15 $split $colorin +client.placeholder $color0 $color8 $color15 $color0 $color8 +client.unfocused $colorin $colorin $color15 $split $colorin +client.urgent $coloru $coloru $color15 $coloru $coloru ## BARS + bar { modifier Mod1 strip_workspace_numbers yes @@ -225,13 +173,3 @@ bar { urgent_workspace $color_bar_urgent $color_bar_urgent $color15 } } - -## DEFAULT PLACEMENT -for_window [class = "Wpg"] floating enable -for_window [title = "x64"] floating enable -for_window [title = "Streaming from YouTube"] floating enable; sticky enable -for_window [title = "pwcview"] border pixel 1; floating enable; sticky enable; move position 1598px 808px -#for_window [title = "sxiv"] floating enable - -## STARTUP -exec firefox diff --git a/.config/i3blocks/config b/.config/i3blocks/config index 178b82c..bf5ca79 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -56,9 +56,9 @@ interval=10 command=cpu_count=$(sysctl -n hw.ncpu) ; avg_load=$(sysctl vm.loadavg|cut -w -f3) ; percent=$(echo "result = $avg_load / $cpu_count * 100; scale=0; result / 1"|bc -l) ; printf "󰻠 %.2d%%\n" $percent ; [ $percent -ge 70 ] && return 33 || return 0 #command=printf "󰻠 %s\n" $(top -n|sed -n '3p'|cut -w -f2) -[temp] -interval=10 -command=celcius=$(sysctl -n dev.cpu.0.temperature|cut -d'.' -f1) ; printf "󰔏 %.3d℉\n" $(echo "$celcius * 9 / 5 + 32" | bc) ; [ $celcius -ge 80 ] && return 33 || return 0 +#[temp] +#interval=10 +#command=celcius=$(sysctl -n dev.cpu.0.temperature|cut -d'.' -f1) ; printf "󰔏 %.3d℉\n" $(echo "$celcius * 9 / 5 + 32" | bc) ; [ $celcius -ge 80 ] && return 33 || return 0 [battery] interval=60 diff --git a/.xinitrc b/.xinitrc index 2262d2b..426ecda 100755 --- a/.xinitrc +++ b/.xinitrc @@ -1,7 +1,7 @@ #!/bin/sh -xrandr --output DP-2 --auto --output DP-3 --auto --below DP-2 \ - && cat ~/.config/*Xresources | xrdb - \ - && dunst \ - & xautolock -locker "i3lock -n -f -c 002b36" \ - & wal.sh \ - & exec i3 2>&1 > /var/log/xinit/i3wm.log +#&& dunst \ +xrandr --output DP-2 --auto --output DP-3 --auto --below DP-2 +xrdb .Xresources +wal.sh +xautolock -locker "i3lock -n -f -c 002b36" & +exec i3 2>&1 > /var/log/xinit/i3wm.log -- cgit v1.2.3