mostly fixes, some improvements master
authorIan Kelling <ian@iankelling.org>
Mon, 24 Mar 2025 20:41:49 +0000 (16:41 -0400)
committerIan Kelling <ian@iankelling.org>
Tue, 25 Mar 2025 00:58:53 +0000 (20:58 -0400)
13 files changed:
.xsession
brc
brc2
distro-end
filesystem/etc/i3/config [new file with mode: 0644]
filesystem/etc/kaya.conf
filesystem/etc/profile.d/environment.sh
filesystem/usr/local/bin/btrbk-run
i3-sway/common.conf
i3-sway/gen
mail-setup
myx
pkgs

index 544d84af30dd2dab0b9271399d8f3e524ebb6e65..dcb4a0b676d1e43de75a491c08c89204882a24d5 100755 (executable)
--- a/.xsession
+++ b/.xsession
@@ -10,5 +10,4 @@
 # xsetroot -cursor_name left_ptr
 
 
-/a/exe/myx >/tmp/myx.log 2>&1
 exec i3
diff --git a/brc b/brc
index 61acff4543c12d9d1f42af1b8195c6153435ab04..2f9ec574efa6b74a4d2b0cfbf58a6b239302e300 100644 (file)
--- a/brc
+++ b/brc
@@ -65,6 +65,8 @@ fi
 
 # * settings
 
+uint_regex='^[0-9]+$'
+
 CDPATH=.
 
 # remove all aliases. aliases provided by the system tend to get in the way,
@@ -93,7 +95,8 @@ PS4='$LINENO+ '
 # this note is from 6-2014.
 # still broken in flidas.
 # Giving it a shot in 2025 again!
-shopt -s nullglob
+# Nope! too many old servers.
+##shopt -s nullglob
 
 # make tab on an empty line do nothing
 shopt -s no_empty_cmd_completion
@@ -321,8 +324,8 @@ if [[ $SOE ]]; then
   fi
 fi
 
-# go exists here
-path_add --ifexists /usr/local/go/bin
+# go exists here
+path_add --ifexists /usr/local/go/bin
 
 # Wrap source command to look in alternate directory in conjunction with
 # sl().
@@ -808,7 +811,6 @@ tsl() {
 }
 
 
-
 # Gets all the essential disk info on a machine. In case it gets ill, this
 # will help us know the expected state.
 disk-info() {
@@ -818,6 +820,7 @@ tail -n +1 /proc/mdstat /etc/mdadm/mdadm.conf /etc/fstab /etc/crypttab
 lsblk
 blkid
 ls -la /dev/disk/by-id
+btrfs fi show
 EOF
 
   for cmd in "${cmds[@]}"; do
@@ -833,6 +836,22 @@ EOF
 
 EOF
   done
+
+  tmps=$(mount | grep ' type btrfs ' | awk '{print $1}'); mapfile -t btrfs_devs <<<"$tmps"
+  cat <<EOF
+### btrfs dev stats ...
+
+\`\`\`
+EOF
+  for dev in "${btrfs_devs[@]}"; do
+    m btrfs device stats "$dev"
+    echo
+  done
+  cat <<'EOF'
+
+```
+
+EOF
 }
 
 # Send a screencast in rtp. For libreplanet testing of local stream.
@@ -1308,7 +1327,8 @@ dfp() {
     a=$(df --output=used $mp | tail -n1)
     sleep $interval
     b=$(df --output=used $mp | tail -n1)
-    printf "used mib: %'d  mib/min: %s\n" $(( b /1000 )) $(( (b-a) / (interval * 1000 / 60 ) ))
+    printf "used mib: %'d  mib/min: %s  gib/h: %s\n" $(( b /1000 )) $(( (b-a) / (interval * 1000 / 60 ) )) \
+           $(( (b-a) / (interval * 1000000 / (60*60) ) ))
   done
 }
 
@@ -2665,14 +2685,14 @@ r() {
 
 # rsync with nice defaults.
 # scp is a bit insecure and deprecated.
-scp() {
+sp() {
   local -a arg
   if [[ $SL_SSH_ARGS ]]; then
     arg=(-e "ssh $SL_SSH_ARGS")
   fi
   rsync "${arg[@]}" -Pt --inplace "$@"
 }
-ccomp rsync scp
+ccomp rsync sp
 
 # output a random high port.
 randport() {
diff --git a/brc2 b/brc2
index 802aa551141150ac12f6903546f4070c912e4707..43df9e503b3e038f1c41687879cf0db6be3a41f9 100644 (file)
--- a/brc2
+++ b/brc2
@@ -59,11 +59,10 @@ path_add /a/exe
 ## for yarn, etc
 #path_add --end /usr/lib/node_modules/corepack/shims/
 
-# pip3 --user things go here:
+## pip3 --user things go here:
 path_add --end ~/.local/bin
-path_add --ifexists --end /a/work/libremanage
-path_add --ifexists --end /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
-path_add --ifexists --end /a/opt/scancode-toolkit-3.10.
+#path_add --ifexists --end /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
+#path_add --ifexists --end /a/opt/scancode-toolkit-3.10.
 path_add --ifexists --end /p/bin
 
 case $HOSTNAME in
@@ -4398,7 +4397,7 @@ youtube-dl-update() {
 
 # https://github.com/yt-dlp/yt-dlp/wiki/Installation
 yt-dlp-update() {
-  sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
+  sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux -o /usr/local/bin/yt-dlp
   sudo chmod a+rx /usr/local/bin/yt-dlp  # Make executable
 }
 
index 178e8949ef7ce01ae6b11de4bcdcb8c7edfe4ce5..77ff21f0a21821dde7ee81db80492e88c634885e 100755 (executable)
@@ -1672,12 +1672,40 @@ rm -rf /home/iank/.mpv
 ## end
 ## in ubuntu, you can install python3-venv
 
-# if [[ ! -e ~/.local/bin/pip ]]; then
-#   tmp=$(mktemp)
-#   wget -O$tmp https://bootstrap.pypa.io/get-pip.py
-#   python3 $tmp --user
-#   hash -r
-# fi
+
+if [[ ! -e ~/.local/bin/pip ]]; then
+  tmp=$(mktemp)
+  wget -O$tmp https://bootstrap.pypa.io/get-pip.py
+  ### begin msg from below without --break-system-package
+  #   error: externally-managed-environment
+
+  # × This environment is externally managed
+  # ╰─> To install Python packages system-wide, try apt install
+  #     python3-xyz, where xyz is the package you are trying to
+  #     install.
+
+  #     If you wish to install a non-Debian-packaged Python package,
+  #     create a virtual environment using python3 -m venv path/to/venv.
+  #     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
+  #     sure you have python3-full installed.
+
+  #     If you wish to install a non-Debian packaged Python application,
+  #     it may be easiest to use pipx install xyz, which will manage a
+  #     virtual environment for you. Make sure you have pipx installed.
+
+  #     See /usr/share/doc/python3.12/README.venv for more information.
+
+  # note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
+  # hint: See PEP 668 for the detailed specification.
+  ### end msg
+  #
+  ### That stuff doesn't work in trisquel.
+  python3 $tmp --user --break-system-packages
+  hash -r
+  python3 -m pip install --user pipx --break-system-packages
+  # todo: periodically run this:
+  # Upgrade pipx with python3 -m pip install --user --upgrade pipx
+fi
 
 
 # run appimages without manually extracting.
@@ -1739,7 +1767,9 @@ esac
 # s sed -ri "s/^([[:space:]]*ui.print_\('Playing)/#\1/" /usr/share/beets/beetsplug/play.py
 
 
+# I ran this initially to make sure things were working, but don't need it again.
 pipx ensurepath -v
+#
 # in brackets are nondefault plugins
 pipx install 'beets[lyrics,discogs,mbsync]'
 
diff --git a/filesystem/etc/i3/config b/filesystem/etc/i3/config
new file mode 100644 (file)
index 0000000..55ebe22
--- /dev/null
@@ -0,0 +1,303 @@
+####### DO NOT EDIT LIVE CONFIG. generated from /a/bin/distro-setup/i3-sway/gen #######
+
+# random thoughts: what to do with a window I don't have room for?
+# * I could tabify it
+# * I could split an existing window with it
+# * I could send it away to another workspace,
+# * I could resize it to be very small.
+
+
+# todo: think whether this is useful: https://github.com/tmfink/i3-wk-switch
+# todo: see comment by Jakstern551 here for tip about jumping to windows
+# https://old.reddit.com/r/i3wm/comments/k8m4k4/share_your_i3_tips_and_tricks_that_you_have/
+
+# https://i3wm.org/docs/userguide.html#keybindings
+#To get the current mapping of your keys, use xmodmap -pke. To
+#interactively enter a key and see what keysym it is configured to, use
+#xev.
+set $mod Mod4
+
+# for non-gui apps, use this.
+set $ex exec --no-startup-id
+
+bindsym $mod+2 $ex "i3-split-maybe"; exec "pavucontrol"
+# calling without --new-instance makes this to be the instance that links
+# will open in from other applications.
+# unused. todo: consider binding this to some key on the right side of keyboard.
+#bindsym $mod+3 $ex "i3-split-maybe"; exec "abrowser"
+# calling just abrowser mysteriously stopped working,
+# so I figured out this is how to get output, but then
+# it suddenly started working again.
+#bindsym $mod+3 exec "abrowser 2>&1 >/tmp/l"
+#bindsym $mod+3 exec "abrowser --new-instance -P sfw"
+bindsym $mod+4 $ex "i3-abrowser --new-instance -P firefox-main-profile"
+bindsym $mod+5 $ex "/a/bin/ds/stream-interlude"
+bindsym $mod+6 $ex "i3-split-maybe"; exec "/usr/local/bin/start-tor-browser"
+bindsym $mod+7 $ex "/a/bin/ds/myx"
+#bindsym $mod+6 $ex "/a/bin/redshift.sh"
+# bindsym $mod+equal $ex "t s w; t in"
+# bindsym $mod+Home $ex "t out"
+# #bindsym $mod+End $ex "t s x; t in"
+# bindsym $mod+grave $ex "t s lunch; t in; t out -a '45 minutes from now'"
+
+
+bindsym $mod+1 focus parent
+bindsym $mod+shift+1 focus child
+
+# note, i used to have a key: "floating toggle; floating toggle" to
+# as undo split, as suggested here https://github.com/i3/i3/issues/3808
+# but something
+#
+bindsym $mod+grave floating toggle
+bindsym $mod+equal $ex "i3-set-layout splith"
+# move firefox to current workspace.
+# https://i3wm.org/docs/userguide.html#keybindings
+# get class with xprop, example output
+# WM_CLASS(STRING) = "irssi", "URxvt"
+# xprop |& grep WM_CLASS
+bindsym $mod+w $ex "i3-abrowser"
+bindsym $mod+shift+w fullscreen toggle
+
+bindsym $mod+e $ex "i3-emacs"
+# unused
+#bindsym $mod+shift+e
+bindsym $mod+r $ex "/a/bin/ds/xl"
+
+bindsym $mod+backslash $ex "scrot"
+
+bindsym $mod+t $ex "i3-set-layout splitv"
+
+bindsym $mod+g $ex "i3-set-layout tabbed"
+
+
+# Use Mouse+$mod to drag floating windows to their wanted position
+floating_modifier $mod
+
+bindsym $mod+u focus left; $ex "i3-mouse-warp"
+# i dont expect to use this much
+bindsym $mod+shift+u $ex "i3-auto-layout-toggle"
+bindsym $mod+i focus right; $ex "i3-mouse-warp"
+bindsym $mod+o focus up; $ex "i3-mouse-warp"
+bindsym $mod+p focus down; $ex "i3-mouse-warp"
+
+bindsym $mod+Left $ex "i3-split-push left"
+bindsym $mod+Right $ex "i3-split-push right"
+bindsym $mod+Up $ex "i3-split-push up"
+bindsym $mod+Down $ex "i3-split-push down"
+
+# for testing in case there is a problem with above.
+# these could be rebound to other things.
+bindsym $mod+shift+Left move left
+bindsym $mod+shift+Right move right
+bindsym $mod+shift+Up move up
+bindsym $mod+shift+Down move down
+
+bindsym $mod+Shift+a move container to workspace 1
+bindsym $mod+a workspace 1
+
+
+bindsym $mod+Shift+s move container to workspace 4
+bindsym $mod+s workspace 4
+
+bindsym $mod+Shift+d move container to workspace 3
+bindsym $mod+d workspace 3
+
+bindsym $mod+Shift+f move container to workspace 2
+bindsym $mod+f workspace 2
+
+bindsym $mod+Shift+z move container to workspace 5
+bindsym $mod+z workspace 5
+
+bindsym $mod+Shift+x move container to workspace 6
+bindsym $mod+x workspace 6
+
+bindsym $mod+v split vertical
+bindsym $mod+Shift+v move workspace to output MON-LEFT
+
+# 122 = XF86AudioLowerVolume, keyboardio function + t
+bindcode 122 $ex "toggle-mute unmute"; mode "ptt"
+mode "ptt" {
+# normally, if we hold down a button, it will start automatically
+# repeating itself, up and down events.  But this stops that from
+# happening. Based on testing, making mode be 1st or 2nd doesn't matter.
+bindcode --release 122 $ex "toggle-mute mute"; mode "default"
+}
+# 171 = XF86AudioNext, keyboardio function + g
+bindcode 171 $ex "toggle-mute unmute"
+
+## temp for testing, add antying here
+#bindsym $mod+shift+5 $ex "/a/a.sh"
+
+
+bindsym $mod+b $ex "i3-konsole"
+bindsym $mod+shift+b unmark term; mark term
+
+
+# for use to cleanup extra emacs windows
+# https://faq.i3wm.org/question/7662/reverse-perl-matches-in-criteria-in-i3-config.1.html
+# I found their regex slightly wrong. This is a hacky way to
+# ignore my irc emacs instances, their window titles
+# are irc room names. Another way would be to hack on the
+# window title, or xprop stuff, but I figure I'm switching
+# to wayland soon, lets wait and see how things work there.
+bindsym $mod+shift+6 [class="Emacs" title="^(?!#[a-zA-Z][a-zA-Z-]*$)"] move workspace current
+
+bindsym $mod+c kill
+
+bindsym $mod+Home split horizontal
+bindsym $mod+Shift+End move container to workspace 7
+bindsym $mod+End workspace 7
+bindsym $mod+Shift+q move container to workspace 8
+bindsym $mod+q workspace 8
+
+bindsym $mod+Shift+8 move container to workspace 9
+bindsym $mod+8 workspace 9
+bindsym $mod+Shift+9 move container to workspace 10
+bindsym $mod+9 workspace 10
+
+bindsym $mod+m $ex "dunstctl close-all"
+bindsym $mod+Shift+m border toggle
+
+# 65 = space.
+# toggle tiling / floating.
+#
+# The idea here is: when floating a window, make it sticky and 1080p,
+# because the only reason we want to do this is to keep it on screen
+# when doing an obs broacast. When unfloating a window, just act as a
+# normal unfloat. There is a quirk with this: in a layout with 3 windows,
+# 2 stacked, 1 tall, floating and ufloating the tall one will make it
+# another stacked one, but still 1920x1080, you need to move it to the
+# right to get it back into its tall spot. I could automate this,
+# but I'm not bothering right now
+bindcode $mod+65 $ex obs-auto-scene-switch-toggle; floating toggle; sticky enable; resize set 1920 1080; move position 100 ppt 0 ppt
+
+# change focus between tiling / floating windows
+bindcode $mod+shift+65 focus mode_toggle
+
+bindsym $mod+shift+h $ex /b/ds/stream-clip hc
+bindsym $mod+j $ex "i3-split-maybe"; exec emacsclient -c
+bindsym $mod+shift+j $ex /b/ds/stream-clip up
+bindsym $mod+k $ex "i3-split-maybe"; exec konsole
+bindsym $mod+shift+k $ex /b/ds/stream-clip intro
+bindsym $mod+l $ex dmenu_run
+bindsym $mod+shift+l $ex /b/ds/stream-clip steady
+bindsym $mod+shift+semicolon $ex /b/ds/stream-clip sad
+# note default is 27% on my system76. not sure if these
+# keybinds will screw up other laptop brightness keys.
+bindsym XF86MonBrightnessUp $ex brightnessctl s +5%
+bindsym XF86MonBrightnessDown $ex brightnessctl s 5%-
+for_window [class="copyq" instance="copyq" window_type="normal"] floating enable
+# eh, dont really like web page titles + a long browser name string.
+for_window [class="firefox" instance="Navigator" window_role="browser"] title_format "b"
+bindsym $mod+y $ex copyq-restart
+bindsym $mod+shift+y $ex "i3-chat"
+
+# unused
+#bindsym $mod+shift+F1
+
+
+# Font for window titles. Will also be used by the bar unless a different font
+# is used in the bar {} block below.
+font pango:monospace 7
+
+# not helpful when i have split screen from myx
+#hide_edge_borders vertical
+
+#exec --no-startup-id /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
+
+# Start clipster daemon
+#exec --no-startup-id /a/opt/clipster/clipster -d
+
+# title bars but no borders. i tried this out a bit
+#default_border normal 0
+
+# default border is like 2 pixels
+default_border pixel 2
+# for debugging
+#default_border normal 10
+
+# I dont see a way to make processing windows act like normal windows,
+# this does it.
+# https://unix.stackexchange.com/questions/450700/opening-a-programme-in-a-floating-window-in-i3
+#
+# This is the info for a processing window launched from the ide.
+# I'm not sure I want it like this, so commenting it out for now.
+#for_window [class="processing-core-PApplet" instance="processing-core-PApplet"] floating disable
+
+# this is the processing window for my app named focus.
+for_window [class="focus" instance="focus"] floating disable
+
+client.focused          #4c7899 #285577 #ffffff #2e9ef4   #ff4400
+client.focused_inactive #333333 #5f676a #ffffff #484e50   #B8C8CD
+client.unfocused        #333333 #222222 #888888 #292d2e   #B8C8CD
+# exit i3 (logs you out of your X session)
+bindsym $mod+Shift+o 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+i $ex /b/ds/i3-sway/gen
+bindsym $mod+Shift+p restart
+
+
+$ex copyq
+$ex dunst
+# haven't been using it enough to justify automatically running it.]
+#$ex /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
+$ex /usr/local/bin/awatch
+# this dies when we restart i3.
+exec_always --no-startup-id i3-event-hook
+workspace 1 output
+workspace 2 output
+workspace 3 output
+workspace 4 output
+workspace 5 output
+workspace 6 output
+workspace 7 output
+workspace 8 output
+workspace 9 output
+workspace 10 output
+workspace 11 output
+# by default, new workspaces are created on whatever screen doesn't have
+# one active or else the current one. That is annoying, I have one
+# primary monitor, I don't want a new workspace created on secondary
+# monitor just because I happen be focused on it. This fixes that.
+workspace 1 output primary
+workspace 2 output MON-LEFT
+workspace 3 output MON-RIGHT
+workspace 4 output MON-RIGHT
+workspace 5 output MON-RIGHT
+workspace 6 output MON-RIGHT
+workspace 7 output MON-RIGHT
+workspace 8 output MON-RIGHT
+workspace 9 output MON-RIGHT
+workspace 10 output MON-RIGHT
+
+default_orientation vertical
+
+# bar is needed for kde connect
+bar {
+
+# keep it only on secondary monitor to save space and make for less
+# missing pixes in obs live stream. For docs on this, search "output
+# primary" in the i3 guide.
+output primary
+
+# the builtin prog
+#status_command i3status
+
+#for faster testing
+#status_command          /a/bin/ds/filesystem/usr/local/bin/myi3status
+status_command          /usr/local/bin/myi3status
+# note: old wip command: /p/c/myi3life
+
+
+font pango:monospace 18
+
+tray_output primary
+
+# I found I didn't need these.
+# workspace_buttons no
+
+# note /a/c/myx adds the last bit to this file conditionally.
+mode hide
+hidden_state hide
+}
+bindsym $mod+Shift+t move workspace to output
index d851a9b9e8b893ddad8873481c0c2bc2a495b744..f02e1abaf09fbdaec8f1e82b142756ba6c302669 100644 (file)
@@ -9,5 +9,6 @@
 backup_root=/mnt/r2/fsf/kaya
 
 # set if using non-default port as in 'rest-server --listen :PORT'
-# local_port=8000
-remote_port=8777        # some aribtrary port
+local_port=8001
+rest_server_extra="--listen :8001"
+remote_port=8778        # some aribtrary port
index 8fb607200533b6b6cb1ed2a7b8efa1e30d5232a3..5457716990ae560313492e373f44f21203861f26 100644 (file)
@@ -6,28 +6,30 @@
 if [ -f $HOME/path_add-function ]; then
   . $HOME/path_add-function
   path_add /usr/sbin /usr/local/sbin /a/exe /a/opt/bin
+
   # if usr merge, dont need it
   if [[ ! -L /sbin ]]; then
     path_add /sbin
   fi
-  path_add --ifexists --end $HOME/.cabal/bin
-  path_add --end /snap/bin
 
+  # path_add --ifexists --end $HOME/.cabal/bin
+  # path_add --end /snap/bin
 
-  # ~/.local is newer, eg ruby 3.0+
-  path_add --ifexists --end $HOME/.gem/ruby/*/bin $HOME/.local/share/gem/ruby/*/bin
 
-  if [ -r /etc/alternatives/java_sdk ]; then
-    export JAVA_HOME=/etc/alternatives/java_sdk
-    path_add /etc/alternatives/java_sdk
-  fi
+  # # ~/.local is newer, eg ruby 3.0+
+  # path_add --ifexists --end $HOME/.gem/ruby/*/bin $HOME/.local/share/gem/ruby/*/bin
 
-  export GUIX_PROFILE=/root/.config/guix/current
-  if [ -f $GUIX_PROFILE/etc/profile ]; then
-    . $GUIX_PROFILE/etc/profile
-  fi
-  path_add --ifexists $HOME/.guix-profile/bin
-  export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
+  # if [ -r /etc/alternatives/java_sdk ]; then
+  #   export JAVA_HOME=/etc/alternatives/java_sdk
+  #   path_add /etc/alternatives/java_sdk
+  # fi
+
+  # export GUIX_PROFILE=/root/.config/guix/current
+  # if [ -f $GUIX_PROFILE/etc/profile ]; then
+  #   . $GUIX_PROFILE/etc/profile
+  # fi
+  # path_add --ifexists $HOME/.guix-profile/bin
+  # export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
 
 fi
 
index 3bad9c4f1bad7afd0fed9c2d06827c0004c2ff1b..24edb9621673c9b80b6bb5554c4cefa9b652ee0f 100755 (executable)
@@ -541,8 +541,8 @@ if $kd_spread; then
   if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
     die "something went wrong, -k not meant to be run on MAIL_HOST"
   fi
-  if [[ $HOSTNAME != kd ]]; then
-    die "something went wrong, -k only meant to run on kd"
+  if [[ $HOSTNAME != frodo ]]; then
+    die "something went wrong, -k only meant to run on one host, currently frodo"
   fi
   cmd_arg=resume
   preserve_arg=-p
index b7c95f0ded206d23da94ac75a53c9a6ffaa57b4f..695c5cda3031f6685125b888dc39eba14246eb17 100644 (file)
@@ -192,6 +192,10 @@ for_window [class="firefox" instance="Navigator" window_role="browser"] title_fo
 bindsym $mod+y $ex copyq-restart
 bindsym $mod+shift+y $ex "i3-chat"
 
+# unused
+#bindsym $mod+shift+F1
+
+
 # Font for window titles. Will also be used by the bar unless a different font
 # is used in the bar {} block below.
 font pango:monospace 7
index 8a6535c5290223ea6729417ecec075184bcc21c7..67004fa59f34002f8a14f726e819b17f62c9c72c 100755 (executable)
@@ -36,14 +36,18 @@ dir=/a/bin/distro-setup/subdir_files/.config/sway
 mkdir -p $dir
 cat common.conf sway.conf > $dir/config
 
-## do i3 config
-dir=/a/bin/distro-setup/subdir_files/.config/i3
+# I used to put config here per instructions, but then I randomly found
+# i3 additionally using config from /etc/i3/config, so I just use that
+# instead.
+rm -f ~/.config/i3/config
+
+dir=/a/bin/distro-setup/filesystem/etc/i3
 mkdir -p $dir
 cat common.conf i3.conf > $dir/config
 if [[ -s ~/i3-myx.conf ]]; then
   cat ~/i3-myx.conf >>$dir/config
 fi
-
+conflink -f
 if [[ $I3SOCK ]]; then
   echo $0: i3-msg $i3_cmd
   i3-msg $i3_cmd
index dc8d6c284e86b54d5831b03a0f5bc8e9c8eb8cc9..d559f18cea7fd34cae5a23f743ce8ca355a7b0dd 100755 (executable)
@@ -2245,7 +2245,7 @@ EOF
   # more config is for li in distro-end
 
   # coment in this file says this is needed for it to run on startup
-  sed -ri 's/^\s*#+\s*(ENABLE_RADICALE\s*=\s*yes\s*)/\1/' /etc/default/radicale
+  sed -ri 's/^\s*#+\s*(ENABLE_RADICALE\s*=\s*yes\s*)/\1/' /etc/default/radicale
 
   # comments say default is 0.0.0.0:5232
   m setini hosts 10.8.0.4:5232 server
@@ -3339,9 +3339,19 @@ EOF
     ## temporarily running as root. undo nonroot modifications
     ## note: nonroot also exists in
     ## /b/ds/filesystem/usr/local/bin/mailbindwatchdog
-    chown root:root /usr/sbin/exim4
-    chmod g-s /usr/sbin/exim4
-    setcap -r /usr/sbin/exim4
+
+    owners=$(stat -c %U:%G /usr/sbin/exim4)
+    if [[ $owners != root:root ]]; then
+      m chown root:root /usr/sbin/exim4
+      # chown clears setuid
+      m chmod 4755 /usr/sbin/exim4
+    fi
+    m chmod g-s /usr/sbin/exim4
+    caps=$(getcap /usr/sbin/exim4)
+    if [[ $caps ]]; then
+      # this returns an error if it has no capabilities.
+      m setcap -r /usr/sbin/exim4
+    fi
 
     # # make exim be a nonroot setuid program.
     # chown Debian-exim:Debian-exim /usr/sbin/exim4
@@ -3387,7 +3397,8 @@ case $HOSTNAME in
     u /etc/systemd/system/exim4.service.d/nonroot.conf <<EOF
 [Service]
 # see 56.2 Root privilege in exim spec
-AmbientCapabilities=CAP_NET_BIND_SERVICE
+# disabled due to running as root.
+#AmbientCapabilities=CAP_NET_BIND_SERVICE
 
 # https://www.redhat.com/sysadmin/mastering-systemd
 # things that seem good and reasonabl.e
@@ -3409,11 +3420,11 @@ EOF
 
     # temp: running as root
     echo | u /etc/exim4/conf.d/main/000_local-noroot
-#     u /etc/exim4/conf.d/main/000_local-noroot <<'EOF'
-# # see 56.2 Root privilege in exim spec
-# deliver_drop_privilege = true
-# EOF
-#
+    #     u /etc/exim4/conf.d/main/000_local-noroot <<'EOF'
+    # # see 56.2 Root privilege in exim spec
+    # deliver_drop_privilege = true
+    # EOF
+    #
     files=(
       300_exim4-config_real_local
       600_exim4-config_userforward
diff --git a/myx b/myx
index 18a81dff1cc383f202d868663a27d0447e5dfe61..d8d2ed2ffd01d5ad3582c4cffdeea276144ef493 100755 (executable)
--- a/myx
+++ b/myx
@@ -33,6 +33,9 @@ Sets resolution.
 
 Alters i3 config.
 
+note: I used to run it in ~/.xsession, but then I made it sudo which
+doesn't work with that.
+
 -n  Dry run
 
 -f  No split, full resolution, like the screen would be without any
@@ -304,19 +307,19 @@ done
 {
   cat /a/bin/ds/i3-sway/bar.conf
 
-  ## i'm running some automation which auto-unhides the bar constantly
+  ## for when we are temporarily running some automation which auto-unhides the bar constantly
   ## and overlaps the bottom of windows, so for now, i'm unconditionally
   ## displaying it. When that is done, remove the below echo and
   ## uncomment the conditional below.
-  echo "}"
-
-  #   if [[ $secondary_out ]]; then
-    echo "}"
-  else
-    echo 'mode hide
-hidden_state hide
-}'
-  fi
+  #echo "}"
+
+  if [[ $secondary_out ]]; then
+    echo "}"
+  else
+    echo 'mode hide
+hidden_state hide
+}'
+  fi
 
 } >> ~/i3-myx.conf
 
diff --git a/pkgs b/pkgs
index 55f4d41d3c4533d4bd008f43824e76688888dc3e..d088afef9d648aa78c19c78d0d708a91bd39841a 100644 (file)
--- a/pkgs
+++ b/pkgs
@@ -263,7 +263,6 @@ p3=(
   pinentry-gtk2
   pidgin
   pidgin-otr
-  pipx
   pixz
   # unattended-upgrades.log: Please install powermgmt-base package to check power status
   powermgmt-base