From c5ab22b01a275580c9ac98229da8ef4ed8efb43a Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 11:50:34 -0400 Subject: [PATCH 001/142] Initial commit --- dotfiles-old/README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 dotfiles-old/README.md diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md new file mode 100644 index 0000000..cef2c04 --- /dev/null +++ b/dotfiles-old/README.md @@ -0,0 +1,2 @@ +# dotfiles +System config stuff From 487824bb2623e5026204144d2aab73c5d680ed8d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 11:51:07 -0400 Subject: [PATCH 002/142] Add files via upload --- dotfiles-old/config | 267 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 267 insertions(+) create mode 100644 dotfiles-old/config diff --git a/dotfiles-old/config b/dotfiles-old/config new file mode 100644 index 0000000..80ce48c --- /dev/null +++ b/dotfiles-old/config @@ -0,0 +1,267 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# 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! + +set $mod Mod1 + +# 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 8 +#font pango:azuki_font 10 +font pango:unscii 12 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +# exec --no-startup-id nm-applet +# ...But I just use iwctl + +# tint2 status bar +#exec --no-startup-id exec tint2 + +# Use pactl to adjust volume in PulseAudio. +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ +5% #increase sound volume +bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ -5% #decrease sound volume +bindsym XF86AudioMute exec --no-startup-id pactl -- set-sink-mute @DEFAULT_SINK@ toggle # mute sound +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use amixer to adjust volume in PulseAudio. (not as good as pactl) +#bindsym XF86AudioMute exec amixer sset 'Master' toggle +#bindsym XF86AudioLowerVolume exec amixer sset 'Master' 5%- +#bindsym XF86AudioRaiseVolume exec amixer sset 'Master' 5%+ + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal +bindsym XF86Launch1 exec i3-sensible-terminal + +# kill focused window +bindsym $mod+Shift+q kill +bindsym $mod+F4 kill +bindsym --release button2 kill + +# start dmenu (a program launcher) +# bindsym $mod+d exec dmenu_run +bindsym $mod+d exec rofi -show run +# 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+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon 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+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon 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+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle +bindsym $mod+F11 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 + +# 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" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# kanji +#set $ws1 "一" +#set $ws2 "二" +#set $ws3 "三" +#set $ws4 "四" +#set $ws5 "五" +#set $ws6 "六" +#set $ws7 "七" +#set $ws8 "八" +#set $ws9 "九" +#set $ws10 "十" + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +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 + +# 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+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'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # 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 j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 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 + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + status_command i3status + separator_symbol " // " + +# defaults +# colors { +# background #ffffff +# statusline #000000 +# separator #ff0000 +# focused_workspace #4c7899 #285577 #ffffff +# active_workspace #333333 #5f676a #ffffff +# inactive_workspace #333333 #222222 #888888 +# urgent_workspace #2f343a #900000 #ffffff +# binding_mode #2f343a #900000 #ffffff +# } + + colors { + background #ffffff + statusline #000000 + separator #ff0000 + focused_workspace #4c7899 #285577 #ffffff + active_workspace #333333 #5f676a #ffffff + inactive_workspace #333333 #222222 #888888 + urgent_workspace #2f343a #900000 #ff0000 + binding_mode #2f343a #900000 #ffffff + } +} + +# Media player controls +bindsym XF86AudioPlay exec playerctl play +bindsym XF86AudioPause exec playerctl pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous + +# Screenshotting +bindsym Print exec scrot + +# color customization +# class border bg text indicator child_border +client.focused #4c7899 #ffffff #ff0000 #2e9ef4 #285577 +client.focused_inactive #333333 #ffffff #000000 #484e50 #5f676a +client.unfocused #333333 #000000 #ff0000 #292d2e #222222 +client.urgent #2f343a #900000 #ffffff #900000 #900000 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c + +client.background #ffffff + +# Task manager +bindsym Control+Shift+Escape exec xfce4-taskmanager + +# Wallpaper +exec --no-startup-id feh --bg-center /home/ibukimaya/Pictures/Wallpapers/Asuka\ 98.jpg + +# Gaps +gaps inner 10 +gaps outer 10 +gaps horizontal 10 +gaps vertical 10 +gaps top 10 +gaps right 10 +gaps bottom 10 +gaps left 10 \ No newline at end of file From 6c5d65c5c1f67494a120f007d6fc33b77414e460 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 11:52:15 -0400 Subject: [PATCH 003/142] i3wm configuration --- dotfiles-old/{ => .config/i3}/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename dotfiles-old/{ => .config/i3}/config (99%) diff --git a/dotfiles-old/config b/dotfiles-old/.config/i3/config similarity index 99% rename from dotfiles-old/config rename to dotfiles-old/.config/i3/config index 80ce48c..4ecee32 100644 --- a/dotfiles-old/config +++ b/dotfiles-old/.config/i3/config @@ -264,4 +264,4 @@ gaps vertical 10 gaps top 10 gaps right 10 gaps bottom 10 -gaps left 10 \ No newline at end of file +gaps left 10 From 6239e9c9e3091accdf08fd25c2b11ab6a29d294d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 11:52:44 -0400 Subject: [PATCH 004/142] Add files via upload --- dotfiles-old/config | 53 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 dotfiles-old/config diff --git a/dotfiles-old/config b/dotfiles-old/config new file mode 100644 index 0000000..bd2bb4d --- /dev/null +++ b/dotfiles-old/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 = false + 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 = "wlan0: (%quality at %essid) %ip" + format_down = "wlan0 DOWN" +} + +ethernet _first_ { + format_up = "enp0s25: %ip (%speed)" + format_down = "enp0s25 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 = "%Y-%m-%dT%H:%M:%S" +} From 78a69c7b4f8892f63cf70ade4680d1e7729ef014 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 11:53:24 -0400 Subject: [PATCH 005/142] i3status configuration --- dotfiles-old/{ => .config/i3status}/config | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dotfiles-old/{ => .config/i3status}/config (100%) diff --git a/dotfiles-old/config b/dotfiles-old/.config/i3status/config similarity index 100% rename from dotfiles-old/config rename to dotfiles-old/.config/i3status/config From 86abade1455cfda2f06aff6bc66c6493453512ef Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 12:40:50 -0400 Subject: [PATCH 006/142] README --- dotfiles-old/README.md | 56 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index cef2c04..d8a2b87 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -1,2 +1,54 @@ -# dotfiles -System config stuff +# devenblake/dotfiles +Pretty config stuff. + +![This is a screenshot of my desktop.](https://web.archive.org/web/20200926155417if_/https://i.redd.it/jwhsmokcfcp51.png) + +## applications shown (and some unshown) + +### display manager +I use [ly](https://github.com/nullgemm/ly). + +### file manager +[Bash](https://www.gnu.org/software/bash/). My Bash aliases and stuff are all in `.bashrc`. My `PS1` is "> ", which is **bad practice**. I use it like this because I think it looks cool but when pasting in a command you could accidentally `> file` and delete an important file. + +### status bar +[i3status](https://i3wm.org/i3status/). The configuration file is at `.config/i3status/config` in this repo. + +A caveat is that the interface names in the i3status configuration (`wlan0` and `enp0s25`) are specific to my system. A kinda ugly hack but I didn't expect to get [300 upvotes on Reddit](https://www.reddit.com/r/unixporn/comments/izpvwp/i3gaps_basic_but_it_works/) for my desktop! + +### wallpaper +[This 1920x1080 Asuka edit](https://archive.org/details/asuka-98). + +### winamp skin +This [Sailor Moon themed skin](https://archive.org/details/winampskin_Sailor_Moon_Gang) on [Audacious](https://audacious-media-player.org/). + +### window manager +[i3-gaps](https://github.com/Airblader/i3). The configuration file is at `.config/i3/config`. + +### xterm +My xterm config is at .Xresources. I haven't had good luck at getting fonts to work with it but [unscii](http://pelulamu.net/unscii/) works great. The way I "installed" the TTF font is by moving `unscii-16-full.ttf` to `.local/share/fonts` and then running `fc-cache` before checking `fc-list` for unscii (`fc-list | grep unscii`). I use [this terminal color theme](https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/) ([here's a webarchive link just in case](https://web.archive.org/web/20200926160802/https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/fwpludj/?context=3)) because it's pretty to me. + +## get the look + +This is potentially destructive to your current i3wm, i3status, and xterm configurations. I'm leaving this plug-and-chug sequence of commands *for myself* in the future when I inevitably bork my system and have to reinstall - **this isn't contained in a shell script for a reason**, please make sure you understand any commands before you run them. It requires that you already have `audacious`, `coreutils` (`cd`, `mv`, and stuff like that), `curl`, `git`, `i3-gaps`, `i3status`, and an X server installed. These are also all untested. + +`cd $HOME`, `cd `, or `cd ~` + +`git clone https://github.com/devenblake/dotfiles.git` + +`cp dotfiles/.config ../` + +`cp dotfiles/.Xresources ../` + +`curl http://pelulamu.net/unscii/unscii-16-full.ttf -o .local/share/fonts/unscii-16-full.ttf` + +`fc-cache` + +This command installs the Sailor Moon theme for all users: `sudo curl https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Gang.wsz -o /usr/share/audacious/Skins/Sailor_Moon_Gang.wsz` + +`mkdir Pictures/Wallpapers` + +`curl https://ia801502.us.archive.org/3/items/asuka-98/Asuka%2098.jpg -o Pictures/Wallpapers/Asuka\ 98.jpg` + +After this you should be able to open i3 and have the configs the same way I have them. If xterm doesn't have the font, run `xdrb -load .Xresources` and that should fix it. + From 16c366b3bfa5c1d355b9d28ac39c4511088df3dc Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 12:41:24 -0400 Subject: [PATCH 007/142] xterm configuration --- dotfiles-old/.Xresources | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 dotfiles-old/.Xresources diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources new file mode 100644 index 0000000..01729a1 --- /dev/null +++ b/dotfiles-old/.Xresources @@ -0,0 +1,61 @@ +xterm*loginshell: true +xterm*locale: UTF-8 +xterm*titleModes: 16 +xterm*utf8: 1 +xterm*utf8Fonts: 1 +xterm*utf8Title: true +xterm*metaSendsEscape: true +xterm*font: -*-*-*-*-*-*-*-*-*-*-*-*-*-* + +! azuki font +!xterm*faceName: azuki_font:antialias=false +!xterm*faceSize: 10 + +! cordata font +!xterm*faceName: "Px437 Cordata PPC\-400" +!xterm*faceSize: 1 + +! unscii font +xterm*faceName: unscii:antialias=false +xterm*faceSize: 12 + +! white - from alnj/dotfiles +*background: #FFFCFD +*foreground: #250E07 +*cursorColor: #250E07 + +!*Background: #000000 + +! amber +!*Foreground: #FFBF00 +!*cursorColor: #FFBF00 + +! black on white (first uncomment white's stuff) +!*reverseVideo: true + +! "quantified colors" ================= +! black/dark-gray +*.color0: #101010 +*.color8: #454545 +! red/orange +*.color1: #EFA6A2 +*.color9: #E0AF85 +! green/aquamarine +*.color2: #80C990 +*.color10: #5ACCAF +! amber/yellow +*.color3: #A69460 +*.color11: #C8C874 +! blue/violet +*.color4: #A3B8EF +*.color12: #CCACED +! magenta/rose +*.color5: #E6A3DC +*.color13: #F2A1C2 +! cyan/azure +*.color6: #50CACD +*.color14: #74C3E4 +! gray/white +*.color7: #808080 +*.color15: #C0C0C0 +! ===================================== From d27ba25beddb4f6a0986b835c9a813ced298e66b Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 12:42:51 -0400 Subject: [PATCH 008/142] Bash configuration (use at own risk) --- dotfiles-old/.bashrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dotfiles-old/.bashrc diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc new file mode 100644 index 0000000..8881057 --- /dev/null +++ b/dotfiles-old/.bashrc @@ -0,0 +1,15 @@ +complete -c man which +PS1="> " +PS2=">> " +PS3=">>> " +alias cls="clear" +ytfeed() { + cd /home/ibukimaya/github/ytfeed.py + ./ytfeed.py +} +export PATH=$PATH":$HOME/bin" + +partone() { + sudo mount -L "PARTONE" /mnt/partone +} +alias iftoggle="sudo ip link set" \ No newline at end of file From c241786797404bfd52a388a4273dcfd4e973c40a Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 12:43:45 -0400 Subject: [PATCH 009/142] Update .bashrc --- dotfiles-old/.bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc index 8881057..4725208 100644 --- a/dotfiles-old/.bashrc +++ b/dotfiles-old/.bashrc @@ -3,13 +3,15 @@ PS1="> " PS2=">> " PS3=">>> " alias cls="clear" +# this is a thing I work on, it won't be useful to anyone else ytfeed() { cd /home/ibukimaya/github/ytfeed.py ./ytfeed.py } export PATH=$PATH":$HOME/bin" +# again, something specific to me (my media hard drive) partone() { sudo mount -L "PARTONE" /mnt/partone } -alias iftoggle="sudo ip link set" \ No newline at end of file +alias iftoggle="sudo ip link set" From 89ef2e8befc67249abb4eaf774e260fd0f152d17 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 12:46:20 -0400 Subject: [PATCH 010/142] moar information --- dotfiles-old/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index d8a2b87..9800adb 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -23,14 +23,14 @@ A caveat is that the interface names in the i3status configuration (`wlan0` and This [Sailor Moon themed skin](https://archive.org/details/winampskin_Sailor_Moon_Gang) on [Audacious](https://audacious-media-player.org/). ### window manager -[i3-gaps](https://github.com/Airblader/i3). The configuration file is at `.config/i3/config`. +[i3-gaps](https://github.com/Airblader/i3). The configuration file is at `.config/i3/config`. The configuration has the wallpaper at `/home/ibukimaya/Pictures/Wallpapers/Asuka\ 98.jpg`, this may need to be changed. ### xterm My xterm config is at .Xresources. I haven't had good luck at getting fonts to work with it but [unscii](http://pelulamu.net/unscii/) works great. The way I "installed" the TTF font is by moving `unscii-16-full.ttf` to `.local/share/fonts` and then running `fc-cache` before checking `fc-list` for unscii (`fc-list | grep unscii`). I use [this terminal color theme](https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/) ([here's a webarchive link just in case](https://web.archive.org/web/20200926160802/https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/fwpludj/?context=3)) because it's pretty to me. ## get the look -This is potentially destructive to your current i3wm, i3status, and xterm configurations. I'm leaving this plug-and-chug sequence of commands *for myself* in the future when I inevitably bork my system and have to reinstall - **this isn't contained in a shell script for a reason**, please make sure you understand any commands before you run them. It requires that you already have `audacious`, `coreutils` (`cd`, `mv`, and stuff like that), `curl`, `git`, `i3-gaps`, `i3status`, and an X server installed. These are also all untested. +This is potentially destructive to your current i3wm, i3status, and xterm configurations. I'm leaving this plug-and-chug sequence of commands *for myself* in the future when I inevitably bork my system and have to reinstall - **this isn't contained in a shell script for a reason**, please make sure you understand any commands before you run them. It requires that you already have `audacious`, `coreutils` (`cd`, `mv`, and stuff like that), `curl`, `feh`, `git`, `i3-gaps`, `i3status`, PulseAudio, `rofi`, and an X server installed. These are also all untested. `cd $HOME`, `cd `, or `cd ~` From 1d6285656c1354ddbb9f150b1767562e337d608b Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Sep 2020 13:02:47 -0400 Subject: [PATCH 011/142] oops, was copying to the wrong directory --- dotfiles-old/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 9800adb..07c17de 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -36,9 +36,9 @@ This is potentially destructive to your current i3wm, i3status, and xterm config `git clone https://github.com/devenblake/dotfiles.git` -`cp dotfiles/.config ../` +`cp dotfiles/.config ./` -`cp dotfiles/.Xresources ../` +`cp dotfiles/.Xresources ./` `curl http://pelulamu.net/unscii/unscii-16-full.ttf -o .local/share/fonts/unscii-16-full.ttf` From 69586cbc0db7a0a9972b6273328f85ada0dc96a4 Mon Sep 17 00:00:00 2001 From: devenblake Date: Sat, 17 Oct 2020 23:42:43 -0400 Subject: [PATCH 012/142] Updating --- dotfiles-old/.Xresources | 60 +++++++++++++++++++-------- dotfiles-old/.bashrc | 28 ++++++++----- dotfiles-old/.config/i3/config | 75 +++++++++++++++------------------- 3 files changed, 94 insertions(+), 69 deletions(-) diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources index 01729a1..2b705cf 100644 --- a/dotfiles-old/.Xresources +++ b/dotfiles-old/.Xresources @@ -33,29 +33,57 @@ xterm*faceSize: 12 ! black on white (first uncomment white's stuff) !*reverseVideo: true +! "quantified colors" but every nybble +! is decremented ====================== +! black/dark-gray +*.color0: #000000 +*.color8: #343434 +! red/orange +*.color1: #DE9591 +*.color9: #D09E74 +! green/aquamarine +*.color2: #70B880 +*.color10: #49BB9E +! amber/yellow +*.color3: #958350 +*.color11: #B7B763 +! blue/violet +*.color4: #92A7DE +*.color12: #BB9BDC +! magenta/rose +*.color5: #D592CB +*.color13: #E190B1 +! cyan/azure +*.color6: #40B9BC +*.color14: #63B2D3 +! gray/white +*.color7: #707070 +*.color15: #B0B0B0 +! ===================================== + ! "quantified colors" ================= ! black/dark-gray -*.color0: #101010 -*.color8: #454545 +!*.color0: #101010 +!*.color8: #454545 ! red/orange -*.color1: #EFA6A2 -*.color9: #E0AF85 +!*.color1: #EFA6A2 +!*.color9: #E0AF85 ! green/aquamarine -*.color2: #80C990 -*.color10: #5ACCAF +!*.color2: #80C990 +!*.color10: #5ACCAF ! amber/yellow -*.color3: #A69460 -*.color11: #C8C874 +!*.color3: #A69460 +!*.color11: #C8C874 ! blue/violet -*.color4: #A3B8EF -*.color12: #CCACED +!*.color4: #A3B8EF +!*.color12: #CCACED ! magenta/rose -*.color5: #E6A3DC -*.color13: #F2A1C2 +!*.color5: #E6A3DC +!*.color13: #F2A1C2 ! cyan/azure -*.color6: #50CACD -*.color14: #74C3E4 +!*.color6: #50CACD +!*.color14: #74C3E4 ! gray/white -*.color7: #808080 -*.color15: #C0C0C0 +!*.color7: #808080 +!*.color15: #C0C0C0 ! ===================================== diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc index 4725208..2314481 100644 --- a/dotfiles-old/.bashrc +++ b/dotfiles-old/.bashrc @@ -2,16 +2,24 @@ complete -c man which PS1="> " PS2=">> " PS3=">>> " -alias cls="clear" -# this is a thing I work on, it won't be useful to anyone else -ytfeed() { - cd /home/ibukimaya/github/ytfeed.py - ./ytfeed.py -} export PATH=$PATH":$HOME/bin" -# again, something specific to me (my media hard drive) -partone() { - sudo mount -L "PARTONE" /mnt/partone -} +alias 1702off="xrandr --output HDMI1 --off" +alias 1702on="xrandr --output HDMI1 --auto --mode 720x480 --right-of LVDS1" +alias cat="bat --theme=ansi-light" +alias cls="clear" alias iftoggle="sudo ip link set" +alias ifswitch="iftoggle $1 down && iftoggle $1 up" +alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/" +alias p="ping 1.1.1.1" +alias partone="sudo mount -L 'PARTONE' /mnt/partone" +vgaoff() { + xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput LVDS1 + xrandr --output VGA1 --off +} +vgaon() { + xrandr --output VGA1 --auto --left-of LVDS1 + xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput VGA1 +} +alias ytfeed="cd $HOME/github/ytfeed.py && ./cli.py" +eval "$(rbenv init -)" diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index 4ecee32..6b74632 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -51,8 +51,9 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU floating_modifier $mod # start a terminal -bindsym $mod+Return exec i3-sensible-terminal -bindsym XF86Launch1 exec i3-sensible-terminal +#bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec uxterm +bindsym XF86Launch1 exec uxterm # kill focused window bindsym $mod+Shift+q kill @@ -68,31 +69,19 @@ bindsym $mod+d exec rofi -show run # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop # change focus -bindsym $mod+j focus left -bindsym $mod+k focus down -bindsym $mod+l focus up -bindsym $mod+semicolon 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 +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right # move focused window -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+semicolon 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 +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right # split in horizontal orientation -bindsym $mod+h split h +bindsym $mod+g split h # split in vertical orientation bindsym $mod+v split v @@ -169,34 +158,30 @@ bindsym $mod+Shift+0 move container to workspace number $ws10 # 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+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'" # resize window (you can also use the mouse for that) mode "resize" { - # These bindings trigger as soon as you enter the resize mode + # These bindings trigger as soon as you enter the resize mode - # Pressing left will shrink the window’s width. - # 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 j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt + # Pressing left will shrink the window’s width. + # 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 j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 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 - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" } bindsym $mod+r mode "resize" @@ -256,6 +241,10 @@ bindsym Control+Shift+Escape exec xfce4-taskmanager # Wallpaper exec --no-startup-id feh --bg-center /home/ibukimaya/Pictures/Wallpapers/Asuka\ 98.jpg +# moving workspaces +bindsym $mod+Shift+greater move container to output right +bindsym $mod+Shift+less move container to output left + # Gaps gaps inner 10 gaps outer 10 @@ -264,4 +253,4 @@ gaps vertical 10 gaps top 10 gaps right 10 gaps bottom 10 -gaps left 10 +gaps left 10 \ No newline at end of file From 94a83dd566cae3d06cc675de9226cfc553e02aae Mon Sep 17 00:00:00 2001 From: devenblake Date: Sat, 17 Oct 2020 23:50:05 -0400 Subject: [PATCH 013/142] Commented --- dotfiles-old/.bashrc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc index 2314481..e02a2b7 100644 --- a/dotfiles-old/.bashrc +++ b/dotfiles-old/.bashrc @@ -4,15 +4,28 @@ PS2=">> " PS3=">>> " export PATH=$PATH":$HOME/bin" +# aliases for using my Commodore monitor with my computer alias 1702off="xrandr --output HDMI1 --off" alias 1702on="xrandr --output HDMI1 --auto --mode 720x480 --right-of LVDS1" + +# requires bat alias cat="bat --theme=ansi-light" + alias cls="clear" + +# useful aliases alias iftoggle="sudo ip link set" alias ifswitch="iftoggle $1 down && iftoggle $1 up" + alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/" + +# i always forget this one but it's useful alias p="ping 1.1.1.1" + +# my media hard drive alias partone="sudo mount -L 'PARTONE' /mnt/partone" + +# aliases for using a VGA monitor, i use these at home and at school vgaoff() { xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput LVDS1 xrandr --output VGA1 --off @@ -21,5 +34,9 @@ vgaon() { xrandr --output VGA1 --auto --left-of LVDS1 xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput VGA1 } + +# project i'm working on alias ytfeed="cd $HOME/github/ytfeed.py && ./cli.py" + +# for ruby working eval "$(rbenv init -)" From fa82848a3e17247e1ef8cbe5c92338a1447eb5ec Mon Sep 17 00:00:00 2001 From: devenblake Date: Sat, 17 Oct 2020 23:51:28 -0400 Subject: [PATCH 014/142] Needs to copy recursively --- dotfiles-old/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 07c17de..09a96b0 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -36,7 +36,7 @@ This is potentially destructive to your current i3wm, i3status, and xterm config `git clone https://github.com/devenblake/dotfiles.git` -`cp dotfiles/.config ./` +`cp -R dotfiles/.config ./` `cp dotfiles/.Xresources ./` From 74f8c1a4f58472e533eb48a0bdf13c947aea7346 Mon Sep 17 00:00:00 2001 From: devenblake Date: Sat, 31 Oct 2020 18:01:02 -0400 Subject: [PATCH 015/142] windows aliases --- dotfiles-old/.bash_profile | 3 +++ dotfiles-old/.bashrc | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 dotfiles-old/.bash_profile mode change 100644 => 100755 dotfiles-old/.bashrc diff --git a/dotfiles-old/.bash_profile b/dotfiles-old/.bash_profile new file mode 100644 index 0000000..9dc1ec5 --- /dev/null +++ b/dotfiles-old/.bash_profile @@ -0,0 +1,3 @@ +if [ -f ~/.bashrc ]; then + ./bashrc +fi \ No newline at end of file diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc old mode 100644 new mode 100755 index e02a2b7..bddca9f --- a/dotfiles-old/.bashrc +++ b/dotfiles-old/.bashrc @@ -1,3 +1,5 @@ +#!/bin/bash + complete -c man which PS1="> " PS2=">> " @@ -19,11 +21,21 @@ alias ifswitch="iftoggle $1 down && iftoggle $1 up" alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/" +# windows +alias ipconfig="ifconfig" +alias tracert="tracepath" + # i always forget this one but it's useful alias p="ping 1.1.1.1" # my media hard drive alias partone="sudo mount -L 'PARTONE' /mnt/partone" +# sd card with music on it +alias audio="sudo mount -L 'AUDIO' /mnt/audio" +# other volumes +mnt() { + sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1 +} # aliases for using a VGA monitor, i use these at home and at school vgaoff() { From 0bec3874dd5d9dfcea94558015a965801acb1366 Mon Sep 17 00:00:00 2001 From: devenblake Date: Wed, 25 Nov 2020 22:58:30 -0500 Subject: [PATCH 016/142] idk --- dotfiles-old/.bash_profile | 3 --- dotfiles-old/.bashrc | 11 ++++++++--- dotfiles-old/.config/i3/config | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 dotfiles-old/.bash_profile diff --git a/dotfiles-old/.bash_profile b/dotfiles-old/.bash_profile deleted file mode 100644 index 9dc1ec5..0000000 --- a/dotfiles-old/.bash_profile +++ /dev/null @@ -1,3 +0,0 @@ -if [ -f ~/.bashrc ]; then - ./bashrc -fi \ No newline at end of file diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc index bddca9f..5c094af 100755 --- a/dotfiles-old/.bashrc +++ b/dotfiles-old/.bashrc @@ -1,9 +1,9 @@ #!/bin/bash complete -c man which -PS1="> " -PS2=">> " -PS3=">>> " +PS1="; " +PS2=">; " +PS3=">>; " export PATH=$PATH":$HOME/bin" # aliases for using my Commodore monitor with my computer @@ -28,6 +28,11 @@ alias tracert="tracepath" # i always forget this one but it's useful alias p="ping 1.1.1.1" +# copy web-browser path to file to clipboard +path() { + echo 'file://'$(realpath $1) | xclip +} + # my media hard drive alias partone="sudo mount -L 'PARTONE' /mnt/partone" # sd card with music on it diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index 6b74632..f8e3943 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -239,7 +239,7 @@ client.background #ffffff bindsym Control+Shift+Escape exec xfce4-taskmanager # Wallpaper -exec --no-startup-id feh --bg-center /home/ibukimaya/Pictures/Wallpapers/Asuka\ 98.jpg +exec --no-startup-id feh --bg-center /home/trinity/Pictures/Wallpapers/Asuka\ 98.jpg # moving workspaces bindsym $mod+Shift+greater move container to output right From 53b1c5e17ba894670d331be252584b8abc936aa5 Mon Sep 17 00:00:00 2001 From: devenblake Date: Thu, 26 Nov 2020 22:33:22 -0500 Subject: [PATCH 017/142] dmenu --- dotfiles-old/src/dmenu/config.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 dotfiles-old/src/dmenu/config.h diff --git a/dotfiles-old/src/dmenu/config.h b/dotfiles-old/src/dmenu/config.h new file mode 100644 index 0000000..146832b --- /dev/null +++ b/dotfiles-old/src/dmenu/config.h @@ -0,0 +1,23 @@ +/* See LICENSE file for copyright and license details. */ +/* Default settings; can be overriden by command line. */ + +static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ +/* -fn option overrides fonts[0]; default X11 font or font set */ +static const char *fonts[] = { + "unscii:antialias=false:size=12", "monospace:size=10" +}; +static const char *prompt = NULL; /* -p option; prompt to the left of input field */ +static const char *colors[SchemeLast][2] = { + /* fg bg */ + [SchemeNorm] = { "#ff0000", "#000000" }, + [SchemeSel] = { "#ff0000", "#ffffff" }, + [SchemeOut] = { "#000000", "#ffffff" }, +}; +/* -l option; if nonzero, dmenu uses vertical list with given number of lines */ +static unsigned int lines = 0; + +/* + * Characters not considered part of a word while deleting words + * for example: " /?\"&[]" + */ +static const char worddelimiters[] = " "; From 3672b077b86358af6720211ec21d3e106dd66ae7 Mon Sep 17 00:00:00 2001 From: devenblake Date: Sun, 29 Nov 2020 00:29:07 -0500 Subject: [PATCH 018/142] Better exit prompt --- dotfiles-old/.config/i3/config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index f8e3943..fba03ec 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -61,8 +61,8 @@ bindsym $mod+F4 kill bindsym --release button2 kill # start dmenu (a program launcher) -# bindsym $mod+d exec dmenu_run -bindsym $mod+d exec rofi -show run +bindsym $mod+d exec dmenu_run +# bindsym $mod+d exec rofi -show run # 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. @@ -163,7 +163,8 @@ bindsym $mod+Shift+c reload bindsym $mod+Shift+r restart # 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'" +# 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'" +bindsym $mod+Shift+e exec [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.") ] && i3-msg exit # resize window (you can also use the mouse for that) mode "resize" { From a3e9ee1a015fc2c4cc93591b65c0f9abc2557b9e Mon Sep 17 00:00:00 2001 From: devenblake Date: Mon, 14 Dec 2020 09:59:40 -0500 Subject: [PATCH 019/142] YOU FINALLY DON'T HAVE TO BE IN THE YTFEED DIRECTORY TO RUN THE CLI! --- dotfiles-old/.bashrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc index 5c094af..8f8301f 100755 --- a/dotfiles-old/.bashrc +++ b/dotfiles-old/.bashrc @@ -33,6 +33,8 @@ path() { echo 'file://'$(realpath $1) | xclip } +alias sudo="doas" + # my media hard drive alias partone="sudo mount -L 'PARTONE' /mnt/partone" # sd card with music on it @@ -43,17 +45,19 @@ mnt() { } # aliases for using a VGA monitor, i use these at home and at school -vgaoff() { +deskoff() { xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput LVDS1 xrandr --output VGA1 --off } -vgaon() { +deskon() { xrandr --output VGA1 --auto --left-of LVDS1 xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput VGA1 } +alias bedoff="xrandr --output VGA1 --off" +alias bedon="xrandr --output VGA1 --auto --right-of LVDS1" # project i'm working on -alias ytfeed="cd $HOME/github/ytfeed.py && ./cli.py" +alias ytfeed="$HOME/github/ytfeed.py/cli.py" # for ruby working eval "$(rbenv init -)" From f8f61c62e9e922c263d913b8043fbc39ec5c30fd Mon Sep 17 00:00:00 2001 From: devenblake Date: Fri, 25 Dec 2020 09:16:19 -0500 Subject: [PATCH 020/142] unscii fix? --- dotfiles-old/.Xresources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources index 2b705cf..f010bf3 100644 --- a/dotfiles-old/.Xresources +++ b/dotfiles-old/.Xresources @@ -17,7 +17,7 @@ xterm*font: -*-*-*-*-*-*-*-*-*-*-*-*-*-* ! unscii font xterm*faceName: unscii:antialias=false -xterm*faceSize: 12 +xterm*faceSize: 11 ! white - from alnj/dotfiles *background: #FFFCFD From 954ad10b9f63024e0f4ccd06d3887d396bc921ae Mon Sep 17 00:00:00 2001 From: devenblake Date: Fri, 25 Dec 2020 09:24:49 -0500 Subject: [PATCH 021/142] I have no idea what I'm doing --- dotfiles-old/.bashrc | 64 +------------------------------------------ dotfiles-old/.profile | 12 ++++++++ 2 files changed, 13 insertions(+), 63 deletions(-) mode change 100755 => 100644 dotfiles-old/.bashrc create mode 100644 dotfiles-old/.profile diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc old mode 100755 new mode 100644 index 8f8301f..8ed0ede --- a/dotfiles-old/.bashrc +++ b/dotfiles-old/.bashrc @@ -1,63 +1 @@ -#!/bin/bash - -complete -c man which -PS1="; " -PS2=">; " -PS3=">>; " -export PATH=$PATH":$HOME/bin" - -# aliases for using my Commodore monitor with my computer -alias 1702off="xrandr --output HDMI1 --off" -alias 1702on="xrandr --output HDMI1 --auto --mode 720x480 --right-of LVDS1" - -# requires bat -alias cat="bat --theme=ansi-light" - -alias cls="clear" - -# useful aliases -alias iftoggle="sudo ip link set" -alias ifswitch="iftoggle $1 down && iftoggle $1 up" - -alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/" - -# windows -alias ipconfig="ifconfig" -alias tracert="tracepath" - -# i always forget this one but it's useful -alias p="ping 1.1.1.1" - -# copy web-browser path to file to clipboard -path() { - echo 'file://'$(realpath $1) | xclip -} - -alias sudo="doas" - -# my media hard drive -alias partone="sudo mount -L 'PARTONE' /mnt/partone" -# sd card with music on it -alias audio="sudo mount -L 'AUDIO' /mnt/audio" -# other volumes -mnt() { - sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1 -} - -# aliases for using a VGA monitor, i use these at home and at school -deskoff() { - xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput LVDS1 - xrandr --output VGA1 --off -} -deskon() { - xrandr --output VGA1 --auto --left-of LVDS1 - xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput VGA1 -} -alias bedoff="xrandr --output VGA1 --off" -alias bedon="xrandr --output VGA1 --auto --right-of LVDS1" - -# project i'm working on -alias ytfeed="$HOME/github/ytfeed.py/cli.py" - -# for ruby working -eval "$(rbenv init -)" +source .profile \ No newline at end of file diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile new file mode 100644 index 0000000..d487c50 --- /dev/null +++ b/dotfiles-old/.profile @@ -0,0 +1,12 @@ +#!/bin/sh + +complete -c man which +PS1="; " +PS2=">; " +PS3=">>; " +export PATH=$PATH":$HOME/bin" + +source .aliases + +# for ruby working +eval "$(rbenv init -)" From b40de8e2764a949a8d2fe8041030082c69f6c2c0 Mon Sep 17 00:00:00 2001 From: devenblake Date: Fri, 25 Dec 2020 16:55:21 -0500 Subject: [PATCH 022/142] More fix --- dotfiles-old/src/dmenu/config.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dotfiles-old/src/dmenu/config.h b/dotfiles-old/src/dmenu/config.h index 146832b..f465458 100644 --- a/dotfiles-old/src/dmenu/config.h +++ b/dotfiles-old/src/dmenu/config.h @@ -4,11 +4,10 @@ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ /* -fn option overrides fonts[0]; default X11 font or font set */ static const char *fonts[] = { - "unscii:antialias=false:size=12", "monospace:size=10" + "unscii:antialias=false:size=11", "monospace:size=10" }; static const char *prompt = NULL; /* -p option; prompt to the left of input field */ -static const char *colors[SchemeLast][2] = { - /* fg bg */ +static const char *colors[SchemeLast][2] = { // fg, bg [SchemeNorm] = { "#ff0000", "#000000" }, [SchemeSel] = { "#ff0000", "#ffffff" }, [SchemeOut] = { "#000000", "#ffffff" }, From 5ab60441cc1b192deb1818dca68a217ec7f75814 Mon Sep 17 00:00:00 2001 From: devenblake Date: Mon, 28 Dec 2020 11:40:23 -0500 Subject: [PATCH 023/142] wtf? it works again? --- dotfiles-old/.Xresources | 2 +- dotfiles-old/src/dmenu/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources index f010bf3..2b705cf 100644 --- a/dotfiles-old/.Xresources +++ b/dotfiles-old/.Xresources @@ -17,7 +17,7 @@ xterm*font: -*-*-*-*-*-*-*-*-*-*-*-*-*-* ! unscii font xterm*faceName: unscii:antialias=false -xterm*faceSize: 11 +xterm*faceSize: 12 ! white - from alnj/dotfiles *background: #FFFCFD diff --git a/dotfiles-old/src/dmenu/config.h b/dotfiles-old/src/dmenu/config.h index f465458..40e30f0 100644 --- a/dotfiles-old/src/dmenu/config.h +++ b/dotfiles-old/src/dmenu/config.h @@ -4,7 +4,7 @@ static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ /* -fn option overrides fonts[0]; default X11 font or font set */ static const char *fonts[] = { - "unscii:antialias=false:size=11", "monospace:size=10" + "unscii:antialias=false:size=12", "monospace:size=10" }; static const char *prompt = NULL; /* -p option; prompt to the left of input field */ static const char *colors[SchemeLast][2] = { // fg, bg From 9fa534adef359db75306dbcb0fe8139b340b4b3c Mon Sep 17 00:00:00 2001 From: devenblake Date: Wed, 30 Dec 2020 20:10:11 -0500 Subject: [PATCH 024/142] forgot these --- dotfiles-old/.aliases | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 dotfiles-old/.aliases diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases new file mode 100755 index 0000000..103a2f2 --- /dev/null +++ b/dotfiles-old/.aliases @@ -0,0 +1,55 @@ +# aliases for using my Commodore monitor with my computer +alias 1702off="xrandr --output HDMI1 --off" +alias 1702on="xrandr --output HDMI1 --auto --mode 720x480 --right-of LVDS1" + +# requires bat +alias cat="bat --theme=ansi-light" + +alias cls="clear" + +# useful aliases +alias iftoggle="sudo ip link set" +alias ifswitch="iftoggle $1 down && iftoggle $1 up" + +alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/" + +# windows +alias ipconfig="ifconfig" +alias tracert="tracepath" + +# i always forget this one but it's useful +alias p="ping 1.1.1.1" + +# copy web-browser path to file to clipboard +path() { + echo 'file://'$(realpath $1) | xclip +} + +alias sudo="doas" + +# my media hard drive +alias partone="sudo mount -L 'PARTONE' /mnt/partone" +# sd card with music on it +alias audio="sudo mount -L 'AUDIO' /mnt/audio" +# other volumes +mnt() { + sudo test -d /mnt/$1 || sudo mkdir /mnt/$1 + sudo mount /dev/$1 /mnt/$1 && sudo cd /mnt/$1 +} + +# aliases for using a VGA monitor, i use these at home and at school +deskoff() { + xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput LVDS1 + xrandr --output VGA1 --off +} +deskon() { + xrandr --output VGA1 --auto --left-of LVDS1 + xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput VGA1 +} +alias bedoff="xrandr --output VGA1 --off" +alias bedon="xrandr --output VGA1 --auto --right-of LVDS1" + +# project i'm working on +alias ytfeed="python $HOME/github/ytfeed.py/cli.py" + +alias bmarks="firefox file:///home/trinity/bookmarks.html" \ No newline at end of file From 007180b5681ea46d59bf336de7bbc63250857557 Mon Sep 17 00:00:00 2001 From: devenblake Date: Wed, 30 Dec 2020 20:20:43 -0500 Subject: [PATCH 025/142] ytfeed configuration --- dotfiles-old/.config/.ytfeed-config.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 dotfiles-old/.config/.ytfeed-config.txt diff --git a/dotfiles-old/.config/.ytfeed-config.txt b/dotfiles-old/.config/.ytfeed-config.txt new file mode 100644 index 0000000..d9d28aa --- /dev/null +++ b/dotfiles-old/.config/.ytfeed-config.txt @@ -0,0 +1,5 @@ +auto_refresh_feeds: 1 +consumption_file_name: /home/trinity/.ytfeed/consumption.txt +xml_storage_directory: /home/trinity/.ytfeed/feeds/ +video_downloader: youtube-dl --add-metadata -i -f "bestvideo[vcodec=vp9]+bestaudio[acodec=opus]" -o "\"/home/trinity/%(upload_date)s %(title)s.%(ext)s\"" +viewer: mpv From 0528f163ff1bd793ee3be1a1a92ff28357d39b53 Mon Sep 17 00:00:00 2001 From: devenblake Date: Wed, 30 Dec 2020 20:28:46 -0500 Subject: [PATCH 026/142] Install scripts --- dotfiles-old/scripts/README.txt | 21 ++++++++++ dotfiles-old/scripts/bootstrap.txt | 7 ++++ dotfiles-old/scripts/cdecho.sh | 4 ++ dotfiles-old/scripts/dotfiles.sh | 42 +++++++++++++++++++ dotfiles-old/scripts/packages-arch-pacman.txt | 7 ++++ dotfiles-old/scripts/packages-arch-yay.txt | 11 +++++ dotfiles-old/scripts/packages-debian-apt.txt | 1 + dotfiles-old/scripts/packages-pip.txt | 1 + dotfiles-old/scripts/packages.txt | 35 ++++++++++++++++ dotfiles-old/scripts/yay.sh | 10 +++++ 10 files changed, 139 insertions(+) create mode 100644 dotfiles-old/scripts/README.txt create mode 100644 dotfiles-old/scripts/bootstrap.txt create mode 100644 dotfiles-old/scripts/cdecho.sh create mode 100644 dotfiles-old/scripts/dotfiles.sh create mode 100644 dotfiles-old/scripts/packages-arch-pacman.txt create mode 100644 dotfiles-old/scripts/packages-arch-yay.txt create mode 100644 dotfiles-old/scripts/packages-debian-apt.txt create mode 100644 dotfiles-old/scripts/packages-pip.txt create mode 100644 dotfiles-old/scripts/packages.txt create mode 100644 dotfiles-old/scripts/yay.sh diff --git a/dotfiles-old/scripts/README.txt b/dotfiles-old/scripts/README.txt new file mode 100644 index 0000000..236e975 --- /dev/null +++ b/dotfiles-old/scripts/README.txt @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +# dotfiles/scripts +# Basic scripts to rebuild a system. +# Usage: +# bash README.txt arch + +# bootstrap.txt - bare minimum programs. Necessary for system use. +# Install these before running this script. +# packages.txt - packages available in most package managers. +# packages-distro-manager.txt - packages not available in every manager. + +if [ $1 = "arch" ]; then + sudo pacman -S $(cat packages.txt packages-arch-pacman.txt) + bash yay.sh # builds yay for use with Arch Linux. + yay -S $(cat packages-arch-yay) +fi + +bash dotfiles.sh diff --git a/dotfiles-old/scripts/bootstrap.txt b/dotfiles-old/scripts/bootstrap.txt new file mode 100644 index 0000000..9c9e342 --- /dev/null +++ b/dotfiles-old/scripts/bootstrap.txt @@ -0,0 +1,7 @@ +bash +coreutils +gcc +git +less +make +nano diff --git a/dotfiles-old/scripts/cdecho.sh b/dotfiles-old/scripts/cdecho.sh new file mode 100644 index 0000000..7aeac50 --- /dev/null +++ b/dotfiles-old/scripts/cdecho.sh @@ -0,0 +1,4 @@ +cde() { + cd $1 + printf "Entered %s.\n" $(pwd) +} diff --git a/dotfiles-old/scripts/dotfiles.sh b/dotfiles-old/scripts/dotfiles.sh new file mode 100644 index 0000000..cccf002 --- /dev/null +++ b/dotfiles-old/scripts/dotfiles.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# could be more succinct in places but it works + +source ./cdecho.sh + +# retrieve dotfiles +cde $HOME/src +git clone https://github.com/devenblake/dotfiles.git +cde dotfiles + +# unscii +curl http://pelulamu.net/unscii/unscii-16-full.ttf -o $HOME/.local/share/fonts/unscii-16-full.ttf +fc-cache + +# basic configs +cp {.Xresources,.aliases,.bashrc,.profile} $HOME/ + +# dmenu +cde $HOME/src +git clone https://git.suckless.org/dmenu +cde dmenu +cp $HOME/dotfiles/src/dmenu/config.h ./ +make +[ "Yes." = $(printf "No.\nYes." | ./dmenu -p "Install dmenu?") ] && sudo make install + +# i3wm +mkdir $HOME/.config/i3 +mkdir $HOME/.config/i3status +cde $HOME/.config/ +cp $HOME/src/dotfiles/.config/i3/config i3/ +cp $HOME/src/dotfiles/.config/i3status/config i3status/ + +# winamp skin (checks to see if audacious is installed first) +sudo mkdir -p /usr/share/audacious/Skins/ +which audacious && sudo curl https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Gang.wsz -o /usr/share/audacious/Skins/Sailor_Moon_Gang.wsz + +# wallpaper +mkdir -p $HOME/Pictures/Wallpapers +curl https://ia801502.us.archive.org/3/items/asuka-98/Asuka%2098.jpg -o Pictures/Wallpapers/Asuka\ 98.jpg + +xrdb -load .Xresources diff --git a/dotfiles-old/scripts/packages-arch-pacman.txt b/dotfiles-old/scripts/packages-arch-pacman.txt new file mode 100644 index 0000000..859f9d9 --- /dev/null +++ b/dotfiles-old/scripts/packages-arch-pacman.txt @@ -0,0 +1,7 @@ +iw +iwd +iwgtk +jre11-openjdk +jre8-openjdk +lastpass-cli +python-pip diff --git a/dotfiles-old/scripts/packages-arch-yay.txt b/dotfiles-old/scripts/packages-arch-yay.txt new file mode 100644 index 0000000..51ad36f --- /dev/null +++ b/dotfiles-old/scripts/packages-arch-yay.txt @@ -0,0 +1,11 @@ +doas +google-chrome +gzdoom +i3-gaps +i3-swallow +minecraft-launcher +moon-buggy +spotify +steam +tor-browser +zoom diff --git a/dotfiles-old/scripts/packages-debian-apt.txt b/dotfiles-old/scripts/packages-debian-apt.txt new file mode 100644 index 0000000..cd3cf3e --- /dev/null +++ b/dotfiles-old/scripts/packages-debian-apt.txt @@ -0,0 +1 @@ +build-essential diff --git a/dotfiles-old/scripts/packages-pip.txt b/dotfiles-old/scripts/packages-pip.txt new file mode 100644 index 0000000..12570ed --- /dev/null +++ b/dotfiles-old/scripts/packages-pip.txt @@ -0,0 +1 @@ +youtube-dl diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt new file mode 100644 index 0000000..081dc9e --- /dev/null +++ b/dotfiles-old/scripts/packages.txt @@ -0,0 +1,35 @@ +audacious +blender +curl +dhcpd +dvdbackup +feh +ffmpeg +firefox +gparted +gwenview +htop +iptables +iputils +k3b +kate +kdenlive +krita +lynx +macchanger +moreutils +mpv +python3 +qbittorrent +s-tui +sed +vi +virtualbox +vlc +wget +which +wireshark-cli +xclip +xpdf +xscreensaver +xterm diff --git a/dotfiles-old/scripts/yay.sh b/dotfiles-old/scripts/yay.sh new file mode 100644 index 0000000..69bdc7f --- /dev/null +++ b/dotfiles-old/scripts/yay.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e +source ./cdecho.sh + +cde $HOME/src +git clone https://aur.archlinux.org/yay.git +cde yay +makepkg -Si +yay -V From 9616b76b50f756fc2598625e1ba8817e421b7380 Mon Sep 17 00:00:00 2001 From: devenblake Date: Wed, 30 Dec 2020 20:29:59 -0500 Subject: [PATCH 027/142] Readme --- dotfiles-old/README.md | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 09a96b0..4fce8eb 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -9,7 +9,7 @@ Pretty config stuff. I use [ly](https://github.com/nullgemm/ly). ### file manager -[Bash](https://www.gnu.org/software/bash/). My Bash aliases and stuff are all in `.bashrc`. My `PS1` is "> ", which is **bad practice**. I use it like this because I think it looks cool but when pasting in a command you could accidentally `> file` and delete an important file. +[Bash](https://www.gnu.org/software/bash/). My Bash aliases and stuff are all in `.bashrc`. ### status bar [i3status](https://i3wm.org/i3status/). The configuration file is at `.config/i3status/config` in this repo. @@ -23,32 +23,11 @@ A caveat is that the interface names in the i3status configuration (`wlan0` and This [Sailor Moon themed skin](https://archive.org/details/winampskin_Sailor_Moon_Gang) on [Audacious](https://audacious-media-player.org/). ### window manager -[i3-gaps](https://github.com/Airblader/i3). The configuration file is at `.config/i3/config`. The configuration has the wallpaper at `/home/ibukimaya/Pictures/Wallpapers/Asuka\ 98.jpg`, this may need to be changed. +[i3-gaps](https://github.com/Airblader/i3). The configuration file is at `.config/i3/config`. The configuration has the wallpaper at `/home/trinity/Pictures/Wallpapers/Asuka\ 98.jpg`, this may need to be changed. ### xterm My xterm config is at .Xresources. I haven't had good luck at getting fonts to work with it but [unscii](http://pelulamu.net/unscii/) works great. The way I "installed" the TTF font is by moving `unscii-16-full.ttf` to `.local/share/fonts` and then running `fc-cache` before checking `fc-list` for unscii (`fc-list | grep unscii`). I use [this terminal color theme](https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/) ([here's a webarchive link just in case](https://web.archive.org/web/20200926160802/https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/fwpludj/?context=3)) because it's pretty to me. ## get the look -This is potentially destructive to your current i3wm, i3status, and xterm configurations. I'm leaving this plug-and-chug sequence of commands *for myself* in the future when I inevitably bork my system and have to reinstall - **this isn't contained in a shell script for a reason**, please make sure you understand any commands before you run them. It requires that you already have `audacious`, `coreutils` (`cd`, `mv`, and stuff like that), `curl`, `feh`, `git`, `i3-gaps`, `i3status`, PulseAudio, `rofi`, and an X server installed. These are also all untested. - -`cd $HOME`, `cd `, or `cd ~` - -`git clone https://github.com/devenblake/dotfiles.git` - -`cp -R dotfiles/.config ./` - -`cp dotfiles/.Xresources ./` - -`curl http://pelulamu.net/unscii/unscii-16-full.ttf -o .local/share/fonts/unscii-16-full.ttf` - -`fc-cache` - -This command installs the Sailor Moon theme for all users: `sudo curl https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Gang.wsz -o /usr/share/audacious/Skins/Sailor_Moon_Gang.wsz` - -`mkdir Pictures/Wallpapers` - -`curl https://ia801502.us.archive.org/3/items/asuka-98/Asuka%2098.jpg -o Pictures/Wallpapers/Asuka\ 98.jpg` - -After this you should be able to open i3 and have the configs the same way I have them. If xterm doesn't have the font, run `xdrb -load .Xresources` and that should fix it. - +Refer to the scripts/ directory. From 124f325974317761bd6ce5b9b8da438e056afa5f Mon Sep 17 00:00:00 2001 From: devenblake Date: Wed, 30 Dec 2020 20:33:13 -0500 Subject: [PATCH 028/142] Fixed some stuff --- dotfiles-old/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 4fce8eb..50d3a10 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -26,8 +26,11 @@ This [Sailor Moon themed skin](https://archive.org/details/winampskin_Sailor_Moo [i3-gaps](https://github.com/Airblader/i3). The configuration file is at `.config/i3/config`. The configuration has the wallpaper at `/home/trinity/Pictures/Wallpapers/Asuka\ 98.jpg`, this may need to be changed. ### xterm -My xterm config is at .Xresources. I haven't had good luck at getting fonts to work with it but [unscii](http://pelulamu.net/unscii/) works great. The way I "installed" the TTF font is by moving `unscii-16-full.ttf` to `.local/share/fonts` and then running `fc-cache` before checking `fc-list` for unscii (`fc-list | grep unscii`). I use [this terminal color theme](https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/) ([here's a webarchive link just in case](https://web.archive.org/web/20200926160802/https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/fwpludj/?context=3)) because it's pretty to me. +My xterm config is at .Xresources. I haven't had good luck at getting fonts to work with it but [unscii](http://pelulamu.net/unscii/)-16-full works great. +I use +[this terminal color theme](https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/) +([here's a webarchive link just in case](https://web.archive.org/web/20200926160802/https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/fwpludj/?context=3)) +because it's pretty to me. ## get the look - Refer to the scripts/ directory. From 701f8cb55688ed195c48058070ea989830c86de5 Mon Sep 17 00:00:00 2001 From: devenblake Date: Wed, 30 Dec 2020 20:35:27 -0500 Subject: [PATCH 029/142] more readme --- dotfiles-old/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 50d3a10..91596fe 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -9,7 +9,10 @@ Pretty config stuff. I use [ly](https://github.com/nullgemm/ly). ### file manager -[Bash](https://www.gnu.org/software/bash/). My Bash aliases and stuff are all in `.bashrc`. +[Bash](https://www.gnu.org/software/bash/). + +My shell aliases are in `.aliases` and my general shell configuration is in `.profile`. +I don't know if my configuration is perfect but it works. ### status bar [i3status](https://i3wm.org/i3status/). The configuration file is at `.config/i3status/config` in this repo. From 484765dc18935d1debd565b709e0be895f9cf81a Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 4 Jan 2021 23:50:52 -0500 Subject: [PATCH 030/142] battle tested --- dotfiles-old/scripts/packages-arch-pacman.txt | 3 ++- dotfiles-old/scripts/packages-arch-yay.txt | 2 +- dotfiles-old/scripts/packages.txt | 16 +++++++++++++++- dotfiles-old/scripts/yay.sh | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/dotfiles-old/scripts/packages-arch-pacman.txt b/dotfiles-old/scripts/packages-arch-pacman.txt index 859f9d9..faca3cf 100644 --- a/dotfiles-old/scripts/packages-arch-pacman.txt +++ b/dotfiles-old/scripts/packages-arch-pacman.txt @@ -1,7 +1,8 @@ +i3status iw iwd -iwgtk jre11-openjdk jre8-openjdk lastpass-cli python-pip +base-devel diff --git a/dotfiles-old/scripts/packages-arch-yay.txt b/dotfiles-old/scripts/packages-arch-yay.txt index 51ad36f..8b136f0 100644 --- a/dotfiles-old/scripts/packages-arch-yay.txt +++ b/dotfiles-old/scripts/packages-arch-yay.txt @@ -6,6 +6,6 @@ i3-swallow minecraft-launcher moon-buggy spotify -steam tor-browser zoom +ne diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index 081dc9e..5dd0351 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -1,12 +1,14 @@ audacious +bat blender curl -dhcpd +dhcpcd dvdbackup feh ffmpeg firefox gparted +gvim gwenview htop iptables @@ -17,12 +19,20 @@ kdenlive krita lynx macchanger +moc moreutils mpv +neofetch +pulseaudio +pulseaudio-alsa +pulseaudio-bluetooth +pulsemixer python3 qbittorrent s-tui sed +thunar +thunderbird vi virtualbox vlc @@ -33,3 +43,7 @@ xclip xpdf xscreensaver xterm +xorg-server +xorg-xauth +xorg-xinit +xorg-xrdb diff --git a/dotfiles-old/scripts/yay.sh b/dotfiles-old/scripts/yay.sh index 69bdc7f..30ee055 100644 --- a/dotfiles-old/scripts/yay.sh +++ b/dotfiles-old/scripts/yay.sh @@ -6,5 +6,5 @@ source ./cdecho.sh cde $HOME/src git clone https://aur.archlinux.org/yay.git cde yay -makepkg -Si +makepkg -si yay -V From e67b084eb58cb46d5393c993fcd4bf84a1ec8d15 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 5 Jan 2021 08:27:25 -0500 Subject: [PATCH 031/142] more packages --- dotfiles-old/scripts/packages-arch-pacman.txt | 2 +- dotfiles-old/scripts/packages-arch-yay.txt | 3 ++- dotfiles-old/scripts/packages-debian-apt.txt | 2 ++ dotfiles-old/scripts/packages.txt | 8 +++++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dotfiles-old/scripts/packages-arch-pacman.txt b/dotfiles-old/scripts/packages-arch-pacman.txt index faca3cf..d4a7619 100644 --- a/dotfiles-old/scripts/packages-arch-pacman.txt +++ b/dotfiles-old/scripts/packages-arch-pacman.txt @@ -1,3 +1,4 @@ +base-devel i3status iw iwd @@ -5,4 +6,3 @@ jre11-openjdk jre8-openjdk lastpass-cli python-pip -base-devel diff --git a/dotfiles-old/scripts/packages-arch-yay.txt b/dotfiles-old/scripts/packages-arch-yay.txt index 8b136f0..768abbe 100644 --- a/dotfiles-old/scripts/packages-arch-yay.txt +++ b/dotfiles-old/scripts/packages-arch-yay.txt @@ -1,3 +1,4 @@ +discord_arch_electron doas google-chrome gzdoom @@ -5,7 +6,7 @@ i3-gaps i3-swallow minecraft-launcher moon-buggy +ne spotify tor-browser zoom -ne diff --git a/dotfiles-old/scripts/packages-debian-apt.txt b/dotfiles-old/scripts/packages-debian-apt.txt index cd3cf3e..de6da64 100644 --- a/dotfiles-old/scripts/packages-debian-apt.txt +++ b/dotfiles-old/scripts/packages-debian-apt.txt @@ -1 +1,3 @@ build-essential +moon-buggy +ne diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index 5dd0351..19e4325 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -16,6 +16,7 @@ iputils k3b kate kdenlive +kimageformats krita lynx macchanger @@ -29,6 +30,7 @@ pulseaudio-bluetooth pulsemixer python3 qbittorrent +qt5-imageformats s-tui sed thunar @@ -40,10 +42,10 @@ wget which wireshark-cli xclip -xpdf -xscreensaver -xterm xorg-server xorg-xauth xorg-xinit xorg-xrdb +xpdf +xscreensaver +xterm From 34f1df3396b45bf3f2d58c4950b55946400101a3 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 5 Jan 2021 08:30:00 -0500 Subject: [PATCH 032/142] profile changes --- dotfiles-old/.aliases | 10 +++++++--- dotfiles-old/.profile | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 103a2f2..1b15e5c 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -34,7 +34,7 @@ alias audio="sudo mount -L 'AUDIO' /mnt/audio" # other volumes mnt() { sudo test -d /mnt/$1 || sudo mkdir /mnt/$1 - sudo mount /dev/$1 /mnt/$1 && sudo cd /mnt/$1 + sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1 } # aliases for using a VGA monitor, i use these at home and at school @@ -50,6 +50,10 @@ alias bedoff="xrandr --output VGA1 --off" alias bedon="xrandr --output VGA1 --auto --right-of LVDS1" # project i'm working on -alias ytfeed="python $HOME/github/ytfeed.py/cli.py" +ytfeed() { + cd $HOME/src/ytfeed.py/ + source ./bin/activate + python ./cli.py +} -alias bmarks="firefox file:///home/trinity/bookmarks.html" \ No newline at end of file +alias bmarks="firefox file:///home/trinity/bookmarks.html" diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index d487c50..42dc9af 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -4,9 +4,9 @@ complete -c man which PS1="; " PS2=">; " PS3=">>; " -export PATH=$PATH":$HOME/bin" +export PATH=$PATH":$HOME/bin:$HOME/.local/bin" -source .aliases +source $HOME/.aliases # for ruby working eval "$(rbenv init -)" From 8e565758f68b4ecbacd4b2e7343c9fd1a28a768c Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 6 Jan 2021 08:36:01 -0500 Subject: [PATCH 033/142] more stuff --- dotfiles-old/scripts/packages-arch-pacman.txt | 1 + dotfiles-old/scripts/packages.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dotfiles-old/scripts/packages-arch-pacman.txt b/dotfiles-old/scripts/packages-arch-pacman.txt index d4a7619..c0def88 100644 --- a/dotfiles-old/scripts/packages-arch-pacman.txt +++ b/dotfiles-old/scripts/packages-arch-pacman.txt @@ -5,4 +5,5 @@ iwd jre11-openjdk jre8-openjdk lastpass-cli +light python-pip diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index 19e4325..da93c02 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -6,7 +6,7 @@ dhcpcd dvdbackup feh ffmpeg -firefox +firefox-developer-edition gparted gvim gwenview @@ -32,6 +32,7 @@ python3 qbittorrent qt5-imageformats s-tui +scrot sed thunar thunderbird From d51376b95388e4d5f5e3b8feed182f363d509af9 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 6 Jan 2021 08:37:00 -0500 Subject: [PATCH 034/142] i3 workarounds for busted keyboard keys --- dotfiles-old/.config/i3/config | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index fba03ec..ce767b2 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -37,16 +37,31 @@ font pango:unscii 12 #exec --no-startup-id exec tint2 # Use pactl to adjust volume in PulseAudio. -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ +5% #increase sound volume -bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ -5% #decrease sound volume -bindsym XF86AudioMute exec --no-startup-id pactl -- set-sink-mute @DEFAULT_SINK@ toggle # mute sound + +## increase sound volume +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ +5% + +## decrease sound volume +bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ -5% + +## mute output +bindsym XF86AudioMute exec --no-startup-id pactl -- set-sink-mute @DEFAULT_SINK@ toggle +bindsym $mod+m exec --no-startup-id pactl -- set-sink-mute @DEFAULT_SINK@ toggle + +## mute input bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status +bindsym $mod+Shift+m exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status # Use amixer to adjust volume in PulseAudio. (not as good as pactl) #bindsym XF86AudioMute exec amixer sset 'Master' toggle #bindsym XF86AudioLowerVolume exec amixer sset 'Master' 5%- #bindsym XF86AudioRaiseVolume exec amixer sset 'Master' 5%+ +# Screen brightness +# cred 4 https://github.com/patrickbolle/dotfiles/ +bindsym $mod+equal exec light -A 5 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" +bindsym $mod+minus exec light -U 5 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" + # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -254,4 +269,4 @@ gaps vertical 10 gaps top 10 gaps right 10 gaps bottom 10 -gaps left 10 \ No newline at end of file +gaps left 10 From 3147d849e6c45432220527fe82f29f9cbf0baa53 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 6 Jan 2021 21:59:02 -0500 Subject: [PATCH 035/142] better aliases, more packages --- dotfiles-old/.aliases | 70 +++++++++++-------- dotfiles-old/scripts/dotfiles.sh | 16 +++-- dotfiles-old/scripts/packages-arch-pacman.txt | 1 + dotfiles-old/scripts/packages-arch-yay.txt | 1 + dotfiles-old/scripts/packages.txt | 2 + 5 files changed, 52 insertions(+), 38 deletions(-) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 1b15e5c..2c41342 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -1,59 +1,67 @@ -# aliases for using my Commodore monitor with my computer -alias 1702off="xrandr --output HDMI1 --off" -alias 1702on="xrandr --output HDMI1 --auto --mode 720x480 --right-of LVDS1" +# settings for specific monitors +alias 1702="xrandr --output HDMI1 --auto --mode 720x480 --right-of LVDS1" +alias mv720="xrandr --output VGA1 --auto --right-of LVDS1" + +# audio drive +alias audio="sudo mount -L 'AUDIO' /mnt/audio" + +# private bookmarks +alias bmarks="firefox file:///home/trinity/bookmarks.html" # requires bat alias cat="bat --theme=ansi-light" alias cls="clear" +alias firefox="firefox-developer-edition" + +alias hdmioff="xrandr --output HDMI1 --off" + # useful aliases alias iftoggle="sudo ip link set" alias ifswitch="iftoggle $1 down && iftoggle $1 up" alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/" -# windows alias ipconfig="ifconfig" -alias tracert="tracepath" + +# other volumes +mnt() { + test -d /mnt/$1 || sudo mkdir /mnt/$1 + sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1 +} # i always forget this one but it's useful alias p="ping 1.1.1.1" +# my media hard drive +alias partone="sudo mount -L 'PARTONE' /mnt/partone" + # copy web-browser path to file to clipboard path() { - echo 'file://'$(realpath $1) | xclip + printf "file://%s" $(realpath $1) | xclip +} + +pyenv() { + source $1/bin/activate } alias sudo="doas" -# my media hard drive -alias partone="sudo mount -L 'PARTONE' /mnt/partone" -# sd card with music on it -alias audio="sudo mount -L 'AUDIO' /mnt/audio" -# other volumes -mnt() { - sudo test -d /mnt/$1 || sudo mkdir /mnt/$1 - sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1 -} +# Wacom Intuos 2 +alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS1" +alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA1" -# aliases for using a VGA monitor, i use these at home and at school -deskoff() { - xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput LVDS1 - xrandr --output VGA1 --off -} -deskon() { - xrandr --output VGA1 --auto --left-of LVDS1 - xsetwacom set "Wacom Intuos2 6x8 Pen stylus" MapToOutput VGA1 -} -alias bedoff="xrandr --output VGA1 --off" -alias bedon="xrandr --output VGA1 --auto --right-of LVDS1" +alias tracert="tracepath" + +alias vgaoff="xrandr --output VGA1 --off" # project i'm working on ytfeed() { - cd $HOME/src/ytfeed.py/ - source ./bin/activate - python ./cli.py + pyenv $HOME/src/ytfeed.py/ + python $HOME/src/ytfeed.py/cli.py +} +ytfeedsh() { + pyenv $HOME/src/ytfeed.py/ + python $HOME/src/ytfeed.py/shell.py } - -alias bmarks="firefox file:///home/trinity/bookmarks.html" diff --git a/dotfiles-old/scripts/dotfiles.sh b/dotfiles-old/scripts/dotfiles.sh index cccf002..c965924 100644 --- a/dotfiles-old/scripts/dotfiles.sh +++ b/dotfiles-old/scripts/dotfiles.sh @@ -18,14 +18,15 @@ cp {.Xresources,.aliases,.bashrc,.profile} $HOME/ # dmenu cde $HOME/src -git clone https://git.suckless.org/dmenu -cde dmenu -cp $HOME/dotfiles/src/dmenu/config.h ./ -make -[ "Yes." = $(printf "No.\nYes." | ./dmenu -p "Install dmenu?") ] && sudo make install +if [ git clone https://git.suckless.org/dmenu ]; then + cde dmenu + cp $HOME/dotfiles/src/dmenu/config.h ./ + make + [ "Yes." = $(printf "No.\nYes." | ./dmenu -p "Install dmenu?") ] && sudo make install +fi # i3wm -mkdir $HOME/.config/i3 +mkdir -p $HOME/.config/i3 mkdir $HOME/.config/i3status cde $HOME/.config/ cp $HOME/src/dotfiles/.config/i3/config i3/ @@ -36,7 +37,8 @@ sudo mkdir -p /usr/share/audacious/Skins/ which audacious && sudo curl https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Gang.wsz -o /usr/share/audacious/Skins/Sailor_Moon_Gang.wsz # wallpaper +cde $HOME mkdir -p $HOME/Pictures/Wallpapers -curl https://ia801502.us.archive.org/3/items/asuka-98/Asuka%2098.jpg -o Pictures/Wallpapers/Asuka\ 98.jpg +curl https://ia801502.us.archive.org/3/items/asuka-98/Asuka%2098.jpg -o Pictures/Wallpapers/Asuka\ 98.jpg || printf "[ERROR] Could not curl wallpaper.\n" xrdb -load .Xresources diff --git a/dotfiles-old/scripts/packages-arch-pacman.txt b/dotfiles-old/scripts/packages-arch-pacman.txt index c0def88..c7d1816 100644 --- a/dotfiles-old/scripts/packages-arch-pacman.txt +++ b/dotfiles-old/scripts/packages-arch-pacman.txt @@ -1,3 +1,4 @@ +asp base-devel i3status iw diff --git a/dotfiles-old/scripts/packages-arch-yay.txt b/dotfiles-old/scripts/packages-arch-yay.txt index 768abbe..b910c56 100644 --- a/dotfiles-old/scripts/packages-arch-yay.txt +++ b/dotfiles-old/scripts/packages-arch-yay.txt @@ -4,6 +4,7 @@ google-chrome gzdoom i3-gaps i3-swallow +iwgtk minecraft-launcher moon-buggy ne diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index da93c02..ffbc66a 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -7,6 +7,7 @@ dvdbackup feh ffmpeg firefox-developer-edition +gnome-disk-utility gparted gvim gwenview @@ -36,6 +37,7 @@ scrot sed thunar thunderbird +units vi virtualbox vlc From 40612a0e10f252dcdae2b9b53b0efdec6464b7f6 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 6 Jan 2021 22:32:48 -0500 Subject: [PATCH 036/142] finer brightness control --- dotfiles-old/.config/i3/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index ce767b2..b11afb7 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -60,7 +60,9 @@ bindsym $mod+Shift+m exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ # Screen brightness # cred 4 https://github.com/patrickbolle/dotfiles/ bindsym $mod+equal exec light -A 5 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" +bindsym $mod+Shift+equal exec light -A 1 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" bindsym $mod+minus exec light -U 5 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" +bindsym $mod+Shift+minus exec light -U 1 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod From 57e07eb7b7a1a7c09266bccf4fa835970e6c7452 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 9 Jan 2021 23:12:46 -0500 Subject: [PATCH 037/142] nmap --- dotfiles-old/.config/{.ytfeed-config.txt => ytfeed-config.txt} | 0 dotfiles-old/scripts/packages.txt | 1 + 2 files changed, 1 insertion(+) rename dotfiles-old/.config/{.ytfeed-config.txt => ytfeed-config.txt} (100%) diff --git a/dotfiles-old/.config/.ytfeed-config.txt b/dotfiles-old/.config/ytfeed-config.txt similarity index 100% rename from dotfiles-old/.config/.ytfeed-config.txt rename to dotfiles-old/.config/ytfeed-config.txt diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index ffbc66a..6e19f9e 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -25,6 +25,7 @@ moc moreutils mpv neofetch +nmap pulseaudio pulseaudio-alsa pulseaudio-bluetooth From e0affcf7f33d91eaac474c9e74408210a7f306b1 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 12 Jan 2021 09:19:03 -0500 Subject: [PATCH 038/142] aliases and disabling titlebars --- dotfiles-old/.aliases | 6 +++++- dotfiles-old/.config/i3/config | 28 +++++----------------------- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 2c41342..6970fec 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -43,7 +43,11 @@ path() { } pyenv() { - source $1/bin/activate + if [ $# -eq 0 ]; then + source ./bin/activate + else + source $1/bin/activate + fi } alias sudo="doas" diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index b11afb7..ba4aad0 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -1,18 +1,9 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# 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! set $mod Mod1 -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. +# Font for window titles #font pango:monospace 8 #font pango:azuki_font 10 font pango:unscii 12 @@ -28,11 +19,6 @@ font pango:unscii 12 # screen before suspend. Use loginctl lock-session to lock your screen. #exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork -# NetworkManager is the most popular way to manage wireless networks on Linux, -# and nm-applet is a desktop environment-independent system tray GUI for it. -# exec --no-startup-id nm-applet -# ...But I just use iwctl - # tint2 status bar #exec --no-startup-id exec tint2 @@ -73,17 +59,11 @@ bindsym $mod+Return exec uxterm bindsym XF86Launch1 exec uxterm # kill focused window -bindsym $mod+Shift+q kill bindsym $mod+F4 kill bindsym --release button2 kill -# start dmenu (a program launcher) +# start dmenu bindsym $mod+d exec dmenu_run -# bindsym $mod+d exec rofi -show run -# 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 @@ -180,7 +160,6 @@ bindsym $mod+Shift+c reload bindsym $mod+Shift+r restart # 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'" bindsym $mod+Shift+e exec [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.") ] && i3-msg exit # resize window (you can also use the mouse for that) @@ -272,3 +251,6 @@ gaps top 10 gaps right 10 gaps bottom 10 gaps left 10 + +# disables titlebars +new_window 1pixel From a828ffa483a5faa488815bdff150c2b5b8adbf1a Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 14 Jan 2021 10:20:52 -0500 Subject: [PATCH 039/142] a bunch of stuff --- dotfiles-old/.aliases | 28 ++++++++++++++---- dotfiles-old/.config/i3/config | 17 ++++++----- dotfiles-old/scripts/appimagelauncher.py | 37 ++++++++++++++++++++++++ dotfiles-old/scripts/packages.txt | 1 + 4 files changed, 69 insertions(+), 14 deletions(-) create mode 100644 dotfiles-old/scripts/appimagelauncher.py diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 6970fec..265cc5a 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -1,6 +1,17 @@ # settings for specific monitors -alias 1702="xrandr --output HDMI1 --auto --mode 720x480 --right-of LVDS1" -alias mv720="xrandr --output VGA1 --auto --right-of LVDS1" +alias 1702="xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1" +alias mv720="xrandr --output VGA-1 --auto --right-of LVDS-1" + +# convenient music play +# tons of repeated code, should be fixed +album() { + selection="$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l 50)" + [ $selection = $(echo -e "\n") ] 2>/dev/null || i3-swallow audacious "$selection" +} +song() { + selection="$(find /mnt/audio -type f | sort | dmenu -l 50)" + [ $selection = $(echo -e "\n") ] 2>/dev/null || i3-swallow audacious "$selection" +} # audio drive alias audio="sudo mount -L 'AUDIO' /mnt/audio" @@ -15,7 +26,7 @@ alias cls="clear" alias firefox="firefox-developer-edition" -alias hdmioff="xrandr --output HDMI1 --off" +alias hdmioff="xrandr --output HDMI-1 --off" # useful aliases alias iftoggle="sudo ip link set" @@ -31,6 +42,9 @@ mnt() { sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1 } +# music player +alias mu="audacious" + # i always forget this one but it's useful alias p="ping 1.1.1.1" @@ -53,12 +67,14 @@ pyenv() { alias sudo="doas" # Wacom Intuos 2 -alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS1" -alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA1" +alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1" +alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" alias tracert="tracepath" -alias vgaoff="xrandr --output VGA1 --off" +alias vgaoff="xrandr --output VGA-1 --off" + +alias yta="youtube-dl -f bestaudio" # project i'm working on ytfeed() { diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index ba4aad0..1f9ee85 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -205,9 +205,10 @@ bar { background #ffffff statusline #000000 separator #ff0000 - focused_workspace #4c7899 #285577 #ffffff - active_workspace #333333 #5f676a #ffffff - inactive_workspace #333333 #222222 #888888 + # border bg text + focused_workspace #ff0000 #ff0000 #ffffff + active_workspace #ffffff #ffffff #000000 + inactive_workspace #000000 #000000 #ffffff urgent_workspace #2f343a #900000 #ff0000 binding_mode #2f343a #900000 #ffffff } @@ -224,10 +225,10 @@ bindsym Print exec scrot # color customization # class border bg text indicator child_border -client.focused #4c7899 #ffffff #ff0000 #2e9ef4 #285577 -client.focused_inactive #333333 #ffffff #000000 #484e50 #5f676a -client.unfocused #333333 #000000 #ff0000 #292d2e #222222 -client.urgent #2f343a #900000 #ffffff #900000 #900000 +client.focused #ff0000 #ffffff #ff0000 #2e9ef4 #ff0000 +client.focused_inactive #ffffff #ffffff #000000 #484e50 #000000 +client.unfocused #000000 #000000 #ff0000 #292d2e #ffffff +client.urgent #900000 #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff @@ -236,7 +237,7 @@ client.background #ffffff bindsym Control+Shift+Escape exec xfce4-taskmanager # Wallpaper -exec --no-startup-id feh --bg-center /home/trinity/Pictures/Wallpapers/Asuka\ 98.jpg +exec --no-startup-id feh --bg-center /home/trinity/Pictures/Wallpapers/akirablast.jpg # moving workspaces bindsym $mod+Shift+greater move container to output right diff --git a/dotfiles-old/scripts/appimagelauncher.py b/dotfiles-old/scripts/appimagelauncher.py new file mode 100644 index 0000000..beca553 --- /dev/null +++ b/dotfiles-old/scripts/appimagelauncher.py @@ -0,0 +1,37 @@ +#!/usr/bin/python +# ABHORRENT hack. DO NOT USE IN IMPORTANT PLACES. +# probably linux-only, definitely POSIX(-like)-only +# PUBLIC DOMAIN (why would i copyright this?) + +import os +import subprocess +import sys + +# breaks if dmenu isn't installed +if os.system("which dmenu >/dev/null"): + print("Error: dmenu not available?", file=sys.stderr) + sys.exit(2) # 2 - missing dependency + +# for me this becomes /home/trinity/apps/ +app_path = os.path.expanduser("~") + "/apps/" + +names = {} +namekeys = "" +if not(os.isatty(0)): file_object = sys.stdin +else: file_object = open(app_path + "names.txt") +while True: + line = file_object.readline() + if line == '': break + line = line.rstrip().split("\t") + key = line[(len(line) > 1)] + names[key] = line[0] + namekeys += key + "\\n" +if not(os.isatty(0)): file_object.close() + +# get user input through dmenu +p = subprocess.Popen(("printf", namekeys), stdout=subprocess.PIPE) +output = subprocess.check_output(("dmenu"), stdin=p.stdout).strip().decode() +p.wait() + +# run program +sys.exit(os.system(app_path + names[output])) diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index 6e19f9e..96aa89b 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -7,6 +7,7 @@ dvdbackup feh ffmpeg firefox-developer-edition +fuse2 gnome-disk-utility gparted gvim From af11cd7fdd13bed2195869dee8cf37753e4bec36 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 15 Jan 2021 13:28:23 -0500 Subject: [PATCH 040/142] more packages and some other stuff --- dotfiles-old/scripts/oneliners.sh | 22 +++++++++++++++++++ dotfiles-old/scripts/packages-arch-pacman.txt | 3 +++ dotfiles-old/scripts/packages-debian-apt.txt | 1 + dotfiles-old/scripts/packages.txt | 2 ++ 4 files changed, 28 insertions(+) create mode 100755 dotfiles-old/scripts/oneliners.sh diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh new file mode 100755 index 0000000..2cb4c95 --- /dev/null +++ b/dotfiles-old/scripts/oneliners.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# a bunch of one-line programs i want in my dmenu +# these have use outside the terminal and thus are generated here + +source ./cdecho.sh + +mkdir -p $HOME/bin/oneliners || exit +cde $HOME/bin/oneliners + +# appimage launcher +printf "python $HOME/apps/appimagelauncher.py\n" >appimgs + +# settings for specific monitors +printf "xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702 +printf "xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720 + +# more monitor settings +printf "xrandr --output HDMI-1 --off\n" >hdmioff +printf "xrandr --output VGA-1 --off\n" >vgaoff + +ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * diff --git a/dotfiles-old/scripts/packages-arch-pacman.txt b/dotfiles-old/scripts/packages-arch-pacman.txt index c7d1816..2523be0 100644 --- a/dotfiles-old/scripts/packages-arch-pacman.txt +++ b/dotfiles-old/scripts/packages-arch-pacman.txt @@ -6,5 +6,8 @@ iwd jre11-openjdk jre8-openjdk lastpass-cli +libreoffice-fresh light +ntfs-3g python-pip +virtualbox-host-modules-arch diff --git a/dotfiles-old/scripts/packages-debian-apt.txt b/dotfiles-old/scripts/packages-debian-apt.txt index de6da64..30623c2 100644 --- a/dotfiles-old/scripts/packages-debian-apt.txt +++ b/dotfiles-old/scripts/packages-debian-apt.txt @@ -1,3 +1,4 @@ build-essential +libreoffice moon-buggy ne diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index 96aa89b..25d84ad 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -27,6 +27,7 @@ moreutils mpv neofetch nmap +progress pulseaudio pulseaudio-alsa pulseaudio-bluetooth @@ -40,6 +41,7 @@ sed thunar thunderbird units +unzip vi virtualbox vlc From b81a1fe476e34ae4d6d9f54c17044aa182a0f109 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 15 Jan 2021 13:35:48 -0500 Subject: [PATCH 041/142] ubuntu fixes --- dotfiles-old/scripts/packages-arch-pacman.txt | 17 +++++++++++++++++ dotfiles-old/scripts/packages.txt | 16 ---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/dotfiles-old/scripts/packages-arch-pacman.txt b/dotfiles-old/scripts/packages-arch-pacman.txt index 2523be0..2ac7cde 100644 --- a/dotfiles-old/scripts/packages-arch-pacman.txt +++ b/dotfiles-old/scripts/packages-arch-pacman.txt @@ -1,13 +1,30 @@ asp base-devel +dhcpcd +firefox-developer-edition +fuse2 +gvim i3status +iputils iw iwd jre11-openjdk jre8-openjdk +kimageformats lastpass-cli libreoffice-fresh light ntfs-3g +pulseaudio-alsa +pulseaudio-bluetooth python-pip +qt5-imageformats +vi virtualbox-host-modules-arch +which +wireshark-cli +xorg-server +xorg-xauth +xorg-xinit +xorg-xrdb +xpdf diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index 25d84ad..ee2fc1a 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -2,23 +2,17 @@ audacious bat blender curl -dhcpcd dvdbackup feh ffmpeg -firefox-developer-edition -fuse2 gnome-disk-utility gparted -gvim gwenview htop iptables -iputils k3b kate kdenlive -kimageformats krita lynx macchanger @@ -29,12 +23,9 @@ neofetch nmap progress pulseaudio -pulseaudio-alsa -pulseaudio-bluetooth pulsemixer python3 qbittorrent -qt5-imageformats s-tui scrot sed @@ -42,17 +33,10 @@ thunar thunderbird units unzip -vi virtualbox vlc wget -which wireshark-cli xclip -xorg-server -xorg-xauth -xorg-xinit -xorg-xrdb -xpdf xscreensaver xterm From fb7443428e40beadd2117aeabe687f9f62e4f8cd Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 15 Jan 2021 13:36:50 -0500 Subject: [PATCH 042/142] more ubuntu --- dotfiles-old/scripts/packages.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index ee2fc1a..45c5ed0 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -36,7 +36,6 @@ unzip virtualbox vlc wget -wireshark-cli xclip xscreensaver xterm From ca9fe7f6ae785777e2dd402327528ee8a985876d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 15 Jan 2021 18:14:34 -0500 Subject: [PATCH 043/142] don't need that on a guest OS --- dotfiles-old/scripts/packages.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages.txt index 45c5ed0..6142a86 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages.txt @@ -33,7 +33,6 @@ thunar thunderbird units unzip -virtualbox vlc wget xclip From ec6ae63c9cf7f8b2f3d23d58f1c709f07c7b7a55 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 17 Jan 2021 13:51:12 -0500 Subject: [PATCH 044/142] organizizing --- dotfiles-old/scripts/{packages.txt => packages/all} | 2 ++ .../scripts/{packages-arch-pacman.txt => packages/arch_pacman} | 1 + .../scripts/{packages-arch-yay.txt => packages/arch_yay} | 1 + .../scripts/{packages-debian-apt.txt => packages/debian_apt} | 1 + dotfiles-old/scripts/{packages-pip.txt => packages/pip} | 0 5 files changed, 5 insertions(+) rename dotfiles-old/scripts/{packages.txt => packages/all} (96%) rename dotfiles-old/scripts/{packages-arch-pacman.txt => packages/arch_pacman} (96%) rename dotfiles-old/scripts/{packages-arch-yay.txt => packages/arch_yay} (87%) rename dotfiles-old/scripts/{packages-debian-apt.txt => packages/debian_apt} (76%) rename dotfiles-old/scripts/{packages-pip.txt => packages/pip} (100%) diff --git a/dotfiles-old/scripts/packages.txt b/dotfiles-old/scripts/packages/all similarity index 96% rename from dotfiles-old/scripts/packages.txt rename to dotfiles-old/scripts/packages/all index 6142a86..99b90b8 100644 --- a/dotfiles-old/scripts/packages.txt +++ b/dotfiles-old/scripts/packages/all @@ -7,6 +7,7 @@ feh ffmpeg gnome-disk-utility gparted +gperf gwenview htop iptables @@ -26,6 +27,7 @@ pulseaudio pulsemixer python3 qbittorrent +rsync s-tui scrot sed diff --git a/dotfiles-old/scripts/packages-arch-pacman.txt b/dotfiles-old/scripts/packages/arch_pacman similarity index 96% rename from dotfiles-old/scripts/packages-arch-pacman.txt rename to dotfiles-old/scripts/packages/arch_pacman index 2ac7cde..8cb276e 100644 --- a/dotfiles-old/scripts/packages-arch-pacman.txt +++ b/dotfiles-old/scripts/packages/arch_pacman @@ -19,6 +19,7 @@ pulseaudio-alsa pulseaudio-bluetooth python-pip qt5-imageformats +ttf-dejavu vi virtualbox-host-modules-arch which diff --git a/dotfiles-old/scripts/packages-arch-yay.txt b/dotfiles-old/scripts/packages/arch_yay similarity index 87% rename from dotfiles-old/scripts/packages-arch-yay.txt rename to dotfiles-old/scripts/packages/arch_yay index b910c56..d4b9692 100644 --- a/dotfiles-old/scripts/packages-arch-yay.txt +++ b/dotfiles-old/scripts/packages/arch_yay @@ -4,6 +4,7 @@ google-chrome gzdoom i3-gaps i3-swallow +instagram-scraper iwgtk minecraft-launcher moon-buggy diff --git a/dotfiles-old/scripts/packages-debian-apt.txt b/dotfiles-old/scripts/packages/debian_apt similarity index 76% rename from dotfiles-old/scripts/packages-debian-apt.txt rename to dotfiles-old/scripts/packages/debian_apt index 30623c2..d802c6a 100644 --- a/dotfiles-old/scripts/packages-debian-apt.txt +++ b/dotfiles-old/scripts/packages/debian_apt @@ -1,4 +1,5 @@ build-essential +fonts-dejavu libreoffice moon-buggy ne diff --git a/dotfiles-old/scripts/packages-pip.txt b/dotfiles-old/scripts/packages/pip similarity index 100% rename from dotfiles-old/scripts/packages-pip.txt rename to dotfiles-old/scripts/packages/pip From ae3ef5f18245f188f62fab88948747a6dc4a534a Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 19 Jan 2021 11:48:13 -0500 Subject: [PATCH 045/142] changes --- dotfiles-old/.Xresources | 44 +++++++++++++++---------------- dotfiles-old/.aliases | 15 ++++------- dotfiles-old/.profile | 11 ++++++-- dotfiles-old/scripts/oneliners.sh | 11 +++++--- 4 files changed, 44 insertions(+), 37 deletions(-) diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources index 2b705cf..fbcf3bd 100644 --- a/dotfiles-old/.Xresources +++ b/dotfiles-old/.Xresources @@ -20,15 +20,15 @@ xterm*faceName: unscii:antialias=false xterm*faceSize: 12 ! white - from alnj/dotfiles -*background: #FFFCFD -*foreground: #250E07 -*cursorColor: #250E07 +!*background: #FFFCFD +!*foreground: #250E07 +!*cursorColor: #250E07 -!*Background: #000000 +*Background: #000000 ! amber -!*Foreground: #FFBF00 -!*cursorColor: #FFBF00 +*Foreground: #FFBF00 +*cursorColor: #FFBF00 ! black on white (first uncomment white's stuff) !*reverseVideo: true @@ -36,29 +36,29 @@ xterm*faceSize: 12 ! "quantified colors" but every nybble ! is decremented ====================== ! black/dark-gray -*.color0: #000000 -*.color8: #343434 +!*.color0: #000000 +!*.color8: #343434 ! red/orange -*.color1: #DE9591 -*.color9: #D09E74 +!*.color1: #DE9591 +!*.color9: #D09E74 ! green/aquamarine -*.color2: #70B880 -*.color10: #49BB9E +!*.color2: #70B880 +!*.color10: #49BB9E ! amber/yellow -*.color3: #958350 -*.color11: #B7B763 +!*.color3: #958350 +!*.color11: #B7B763 ! blue/violet -*.color4: #92A7DE -*.color12: #BB9BDC +!*.color4: #92A7DE +!*.color12: #BB9BDC ! magenta/rose -*.color5: #D592CB -*.color13: #E190B1 +!*.color5: #D592CB +!*.color13: #E190B1 ! cyan/azure -*.color6: #40B9BC -*.color14: #63B2D3 +!*.color6: #40B9BC +!*.color14: #63B2D3 ! gray/white -*.color7: #707070 -*.color15: #B0B0B0 +!*.color7: #707070 +!*.color15: #B0B0B0 ! ===================================== ! "quantified colors" ================= diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 265cc5a..80dae78 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -1,7 +1,3 @@ -# settings for specific monitors -alias 1702="xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1" -alias mv720="xrandr --output VGA-1 --auto --right-of LVDS-1" - # convenient music play # tons of repeated code, should be fixed album() { @@ -17,17 +13,14 @@ song() { alias audio="sudo mount -L 'AUDIO' /mnt/audio" # private bookmarks -alias bmarks="firefox file:///home/trinity/bookmarks.html" +alias bmarks="firefox file://"$HOME"/bookmarks.html" -# requires bat -alias cat="bat --theme=ansi-light" +alias cat="9 cat" alias cls="clear" alias firefox="firefox-developer-edition" -alias hdmioff="xrandr --output HDMI-1 --off" - # useful aliases alias iftoggle="sudo ip link set" alias ifswitch="iftoggle $1 down && iftoggle $1 up" @@ -72,7 +65,9 @@ alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" alias tracert="tracepath" -alias vgaoff="xrandr --output VGA-1 --off" +webm() { + ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis $(printf "$1" | asplit - . 0).webm +} alias yta="youtube-dl -f bestaudio" diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index 42dc9af..1453a36 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -1,12 +1,19 @@ #!/bin/sh -complete -c man which +EDITOR=vim PS1="; " PS2=">; " PS3=">>; " -export PATH=$PATH":$HOME/bin:$HOME/.local/bin" source $HOME/.aliases +complete -c man which + # for ruby working eval "$(rbenv init -)" + +PLAN9=/usr/local/plan9 +export PLAN9 + +PATH=$PATH":$HOME/bin/:$HOME/bin/oneliners/:$PLAN9/bin" +export PATH diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh index 2cb4c95..e60ec43 100755 --- a/dotfiles-old/scripts/oneliners.sh +++ b/dotfiles-old/scripts/oneliners.sh @@ -1,15 +1,16 @@ #!/bin/sh -# a bunch of one-line programs i want in my dmenu +# a bunch of one-line programs i want in my dmenu (and sometimes elsewhere) # these have use outside the terminal and thus are generated here +# - because why make fifty files when i can make one file that does that for me? source ./cdecho.sh mkdir -p $HOME/bin/oneliners || exit cde $HOME/bin/oneliners -# appimage launcher -printf "python $HOME/apps/appimagelauncher.py\n" >appimgs +# deemix +printf "python $HOME/src/deemix-pyweb/deemix-pyweb.py\n" >deemix # settings for specific monitors printf "xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702 @@ -19,4 +20,8 @@ printf "xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720 printf "xrandr --output HDMI-1 --off\n" >hdmioff printf "xrandr --output VGA-1 --off\n" >vgaoff +# youtube-dl stuff +printf "youtube-dl -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 10 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive +printf "youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv + ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * From 2a3c820810f68642118875ff48a7456ed017fd81 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 19 Jan 2021 11:48:59 -0500 Subject: [PATCH 046/142] i3 changes --- dotfiles-old/.config/i3/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index 1f9ee85..f8294f3 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -202,7 +202,7 @@ bar { # } colors { - background #ffffff + background #ffdbdb statusline #000000 separator #ff0000 # border bg text From 437ec2716e11e32a5f70892fc025772785c8379e Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 26 Jan 2021 17:41:30 -0500 Subject: [PATCH 047/142] doas-sudo etc --- dotfiles-old/scripts/PKGBUILD_doas-sudo | 17 +++++++++ dotfiles-old/scripts/README.txt | 19 +++++++--- dotfiles-old/scripts/appimagelauncher.py | 37 ------------------- dotfiles-old/scripts/arch_doas-sudo.sh | 10 +++++ dotfiles-old/scripts/{yay.sh => arch_yay.sh} | 0 dotfiles-old/scripts/oneliners.sh | 28 ++++++++++---- dotfiles-old/scripts/packages/all | 3 ++ dotfiles-old/scripts/packages/arch_pacman | 1 + dotfiles-old/scripts/packages/arch_yay | 4 ++ .../{bootstrap.txt => packages/bootstrap} | 0 10 files changed, 69 insertions(+), 50 deletions(-) create mode 100644 dotfiles-old/scripts/PKGBUILD_doas-sudo delete mode 100644 dotfiles-old/scripts/appimagelauncher.py create mode 100644 dotfiles-old/scripts/arch_doas-sudo.sh rename dotfiles-old/scripts/{yay.sh => arch_yay.sh} (100%) rename dotfiles-old/scripts/{bootstrap.txt => packages/bootstrap} (100%) diff --git a/dotfiles-old/scripts/PKGBUILD_doas-sudo b/dotfiles-old/scripts/PKGBUILD_doas-sudo new file mode 100644 index 0000000..2cba10e --- /dev/null +++ b/dotfiles-old/scripts/PKGBUILD_doas-sudo @@ -0,0 +1,17 @@ +# Maintainer: deven +# VERY LIGHTLY modified version of the AUR package opendoas-sudo +pkgname=doas-sudo +pkgver=1 +pkgrel=1 +pkgdesc="A symlink for using the port of BSD's doas(1) as a drop-in replacement to sudo" +arch=('any') +url="https://github.com/slicer69/doas" +license=('MIT') +depends=('doas') +provides=('sudo') +conflicts=('sudo') + +package() { + install -d "$pkgdir"/usr/bin + ln -s $(which doas) "$pkgdir"/usr/bin/sudo +} diff --git a/dotfiles-old/scripts/README.txt b/dotfiles-old/scripts/README.txt index 236e975..d69fdde 100644 --- a/dotfiles-old/scripts/README.txt +++ b/dotfiles-old/scripts/README.txt @@ -7,15 +7,22 @@ set -e # Usage: # bash README.txt arch -# bootstrap.txt - bare minimum programs. Necessary for system use. +# packages/bootstrap - bare minimum programs. Necessary for system use. # Install these before running this script. -# packages.txt - packages available in most package managers. -# packages-distro-manager.txt - packages not available in every manager. + +mkdir -p $HOME/bin # executables +mkdir -p $HOME/src # source code if [ $1 = "arch" ]; then - sudo pacman -S $(cat packages.txt packages-arch-pacman.txt) - bash yay.sh # builds yay for use with Arch Linux. - yay -S $(cat packages-arch-yay) + # this enables the multilib repo. may fuck shit up. + sudo printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >/etc/pacman.conf + + sudo pacman -S $(cat packages/all packages/arch_pacman) + bash arch_yay.sh # builds yay for use with Arch Linux. + yay -S $(cat packages/arch_yay) + + # PKGBUILD to symlink sudo to doas + bash arch_doas-sudo.sh fi bash dotfiles.sh diff --git a/dotfiles-old/scripts/appimagelauncher.py b/dotfiles-old/scripts/appimagelauncher.py deleted file mode 100644 index beca553..0000000 --- a/dotfiles-old/scripts/appimagelauncher.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/python -# ABHORRENT hack. DO NOT USE IN IMPORTANT PLACES. -# probably linux-only, definitely POSIX(-like)-only -# PUBLIC DOMAIN (why would i copyright this?) - -import os -import subprocess -import sys - -# breaks if dmenu isn't installed -if os.system("which dmenu >/dev/null"): - print("Error: dmenu not available?", file=sys.stderr) - sys.exit(2) # 2 - missing dependency - -# for me this becomes /home/trinity/apps/ -app_path = os.path.expanduser("~") + "/apps/" - -names = {} -namekeys = "" -if not(os.isatty(0)): file_object = sys.stdin -else: file_object = open(app_path + "names.txt") -while True: - line = file_object.readline() - if line == '': break - line = line.rstrip().split("\t") - key = line[(len(line) > 1)] - names[key] = line[0] - namekeys += key + "\\n" -if not(os.isatty(0)): file_object.close() - -# get user input through dmenu -p = subprocess.Popen(("printf", namekeys), stdout=subprocess.PIPE) -output = subprocess.check_output(("dmenu"), stdin=p.stdout).strip().decode() -p.wait() - -# run program -sys.exit(os.system(app_path + names[output])) diff --git a/dotfiles-old/scripts/arch_doas-sudo.sh b/dotfiles-old/scripts/arch_doas-sudo.sh new file mode 100644 index 0000000..70976be --- /dev/null +++ b/dotfiles-old/scripts/arch_doas-sudo.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e +source ./cdecho.sh + +mkdir -p $HOME/src/doas-sudo +cp PKGBUILD_doas-sudo $HOME/src/doas-sudo/PKGBUILD + +cde $HOME/src/doas-sudo +makepkg -si diff --git a/dotfiles-old/scripts/yay.sh b/dotfiles-old/scripts/arch_yay.sh similarity index 100% rename from dotfiles-old/scripts/yay.sh rename to dotfiles-old/scripts/arch_yay.sh diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh index e60ec43..f3312f3 100755 --- a/dotfiles-old/scripts/oneliners.sh +++ b/dotfiles-old/scripts/oneliners.sh @@ -9,19 +9,33 @@ source ./cdecho.sh mkdir -p $HOME/bin/oneliners || exit cde $HOME/bin/oneliners +SHABANG="#!/bin/sh\n" + +# music stuff +printf "selection=\"\$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l 50)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album +printf "selection=\"\$(find /mnt/audio -type f | sort | dmenu -l 50)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song + +# private bookmarks +printf $SHABANG"firefox file://"$HOME"/bookmarks.html\n" >bmarks + # deemix -printf "python $HOME/src/deemix-pyweb/deemix-pyweb.py\n" >deemix +printf $SHABANG"python $HOME/src/deemix-pyweb/deemix-pyweb.py\n" >deemix + +# firefox (launches firefox-developer-edition) +printf $SHABANG"firefox-developer-edition \"\$@\"\n" >firefox # settings for specific monitors -printf "xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702 -printf "xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720 +printf $SHABANG"xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702 +printf $SHABANG"xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720 # more monitor settings -printf "xrandr --output HDMI-1 --off\n" >hdmioff -printf "xrandr --output VGA-1 --off\n" >vgaoff +printf $SHABANG"xrandr --output HDMI-1 --off\n" >hdmioff +printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff # youtube-dl stuff -printf "youtube-dl -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 10 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive -printf "youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv +printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo +printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp +printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 10 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive +printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index 99b90b8..5416374 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -10,6 +10,7 @@ gparted gperf gwenview htop +inetutils iptables k3b kate @@ -21,6 +22,7 @@ moc moreutils mpv neofetch +net-tools nmap progress pulseaudio @@ -29,6 +31,7 @@ python3 qbittorrent rsync s-tui +screen scrot sed thunar diff --git a/dotfiles-old/scripts/packages/arch_pacman b/dotfiles-old/scripts/packages/arch_pacman index 8cb276e..b4ce328 100644 --- a/dotfiles-old/scripts/packages/arch_pacman +++ b/dotfiles-old/scripts/packages/arch_pacman @@ -15,6 +15,7 @@ lastpass-cli libreoffice-fresh light ntfs-3g +otf-ipafont pulseaudio-alsa pulseaudio-bluetooth python-pip diff --git a/dotfiles-old/scripts/packages/arch_yay b/dotfiles-old/scripts/packages/arch_yay index d4b9692..2b35bd9 100644 --- a/dotfiles-old/scripts/packages/arch_yay +++ b/dotfiles-old/scripts/packages/arch_yay @@ -1,5 +1,7 @@ +aic94xx-firmware discord_arch_electron doas +wd719x-firmware google-chrome gzdoom i3-gaps @@ -8,7 +10,9 @@ instagram-scraper iwgtk minecraft-launcher moon-buggy +mullvad-vpn-beta ne spotify +steam tor-browser zoom diff --git a/dotfiles-old/scripts/bootstrap.txt b/dotfiles-old/scripts/packages/bootstrap similarity index 100% rename from dotfiles-old/scripts/bootstrap.txt rename to dotfiles-old/scripts/packages/bootstrap From 4d7c6188f3896a5bf04af77aecf9cbd41c551d3d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 29 Jan 2021 07:59:56 -0500 Subject: [PATCH 048/142] fix dangerous typo --- dotfiles-old/scripts/README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/scripts/README.txt b/dotfiles-old/scripts/README.txt index d69fdde..8d13bb2 100644 --- a/dotfiles-old/scripts/README.txt +++ b/dotfiles-old/scripts/README.txt @@ -15,7 +15,7 @@ mkdir -p $HOME/src # source code if [ $1 = "arch" ]; then # this enables the multilib repo. may fuck shit up. - sudo printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >/etc/pacman.conf + sudo printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf sudo pacman -S $(cat packages/all packages/arch_pacman) bash arch_yay.sh # builds yay for use with Arch Linux. From e843519bc6f68238f58ca005952884a1cd10040c Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 29 Jan 2021 08:00:15 -0500 Subject: [PATCH 049/142] various config --- dotfiles-old/scripts/oneliners.sh | 2 +- dotfiles-old/scripts/packages/all | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh index f3312f3..60233c7 100755 --- a/dotfiles-old/scripts/oneliners.sh +++ b/dotfiles-old/scripts/oneliners.sh @@ -35,7 +35,7 @@ printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff # youtube-dl stuff printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp -printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 10 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive +printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 20 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index 5416374..90f853f 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -1,5 +1,4 @@ audacious -bat blender curl dvdbackup @@ -37,6 +36,7 @@ sed thunar thunderbird units +unrar unzip vlc wget From 69879056a8ebffa5b45c106039b89742e51ee9a5 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 29 Jan 2021 08:09:45 -0500 Subject: [PATCH 050/142] moar readme and youtube-dl with pacman --- dotfiles-old/scripts/README.txt | 13 ++++++++++++- dotfiles-old/scripts/packages/arch_pacman | 1 + dotfiles-old/scripts/packages/pip | 1 - 3 files changed, 13 insertions(+), 2 deletions(-) delete mode 100644 dotfiles-old/scripts/packages/pip diff --git a/dotfiles-old/scripts/README.txt b/dotfiles-old/scripts/README.txt index 8d13bb2..6644790 100644 --- a/dotfiles-old/scripts/README.txt +++ b/dotfiles-old/scripts/README.txt @@ -17,12 +17,23 @@ if [ $1 = "arch" ]; then # this enables the multilib repo. may fuck shit up. sudo printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf + # because of this right here packages/all should have a trailing + # newline sudo pacman -S $(cat packages/all packages/arch_pacman) - bash arch_yay.sh # builds yay for use with Arch Linux. + + bash arch_yay.sh yay -S $(cat packages/arch_yay) # PKGBUILD to symlink sudo to doas + # sudo is provided by base-devel so this has to be done after the + # pacman stuff. however, it might be beneficial to do this before the + # yay stuff so it doesn't constantly prompt for the sudo password. + # all depends on how careful you wanna be. bash arch_doas-sudo.sh + # btw, you can undo this with pacman -S sudo + +elif [ $1 = "debian" ]; then + fi bash dotfiles.sh diff --git a/dotfiles-old/scripts/packages/arch_pacman b/dotfiles-old/scripts/packages/arch_pacman index b4ce328..466396a 100644 --- a/dotfiles-old/scripts/packages/arch_pacman +++ b/dotfiles-old/scripts/packages/arch_pacman @@ -30,3 +30,4 @@ xorg-xauth xorg-xinit xorg-xrdb xpdf +youtube-dl diff --git a/dotfiles-old/scripts/packages/pip b/dotfiles-old/scripts/packages/pip deleted file mode 100644 index 12570ed..0000000 --- a/dotfiles-old/scripts/packages/pip +++ /dev/null @@ -1 +0,0 @@ -youtube-dl From abad8486de998ccac18d0b8eb0906a3fc3fe2474 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 6 Feb 2021 20:52:07 -0500 Subject: [PATCH 051/142] artix packages --- dotfiles-old/scripts/packages/all | 2 ++ dotfiles-old/scripts/packages/artix_pacman | 1 + .../{arch_pacman => common-arch_pacman-artix_pacman} | 0 .../scripts/packages/{arch_yay => common-arch_yay-artix_yay} | 5 ++--- .../scripts/packages/common-arch_yay-artix_yay-debian_apt | 2 ++ dotfiles-old/scripts/packages/debian_apt | 2 -- 6 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 dotfiles-old/scripts/packages/artix_pacman rename dotfiles-old/scripts/packages/{arch_pacman => common-arch_pacman-artix_pacman} (100%) rename dotfiles-old/scripts/packages/{arch_yay => common-arch_yay-artix_yay} (90%) create mode 100644 dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index 90f853f..a443e1f 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -1,3 +1,4 @@ +adb audacious blender curl @@ -23,6 +24,7 @@ mpv neofetch net-tools nmap +pkgfile progress pulseaudio pulsemixer diff --git a/dotfiles-old/scripts/packages/artix_pacman b/dotfiles-old/scripts/packages/artix_pacman new file mode 100644 index 0000000..3ce2d96 --- /dev/null +++ b/dotfiles-old/scripts/packages/artix_pacman @@ -0,0 +1 @@ +iwd-openrc diff --git a/dotfiles-old/scripts/packages/arch_pacman b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman similarity index 100% rename from dotfiles-old/scripts/packages/arch_pacman rename to dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman diff --git a/dotfiles-old/scripts/packages/arch_yay b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay similarity index 90% rename from dotfiles-old/scripts/packages/arch_yay rename to dotfiles-old/scripts/packages/common-arch_yay-artix_yay index 2b35bd9..74df12e 100644 --- a/dotfiles-old/scripts/packages/arch_yay +++ b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay @@ -1,7 +1,7 @@ aic94xx-firmware discord_arch_electron doas -wd719x-firmware +freedownloadmanager google-chrome gzdoom i3-gaps @@ -9,10 +9,9 @@ i3-swallow instagram-scraper iwgtk minecraft-launcher -moon-buggy mullvad-vpn-beta -ne spotify steam tor-browser +wd719x-firmware zoom diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt new file mode 100644 index 0000000..6664e1f --- /dev/null +++ b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt @@ -0,0 +1,2 @@ +moon-buggy +ne diff --git a/dotfiles-old/scripts/packages/debian_apt b/dotfiles-old/scripts/packages/debian_apt index d802c6a..db63ff4 100644 --- a/dotfiles-old/scripts/packages/debian_apt +++ b/dotfiles-old/scripts/packages/debian_apt @@ -1,5 +1,3 @@ build-essential fonts-dejavu libreoffice -moon-buggy -ne From 8f11fc9500c8914cd5afaa8b55e4c06e6b852ded Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 6 Feb 2021 20:53:16 -0500 Subject: [PATCH 052/142] artix changes plus other things --- dotfiles-old/scripts/README.txt | 29 +++++++++++--------- dotfiles-old/scripts/arch_doas-sudo.sh | 10 ------- dotfiles-old/scripts/arch_enable-multilib.sh | 9 ++++++ dotfiles-old/scripts/arch_yay.sh | 2 +- dotfiles-old/scripts/doas-sudo.sh | 12 ++++++++ dotfiles-old/scripts/oneliners.sh | 2 +- 6 files changed, 39 insertions(+), 25 deletions(-) delete mode 100644 dotfiles-old/scripts/arch_doas-sudo.sh create mode 100755 dotfiles-old/scripts/arch_enable-multilib.sh mode change 100644 => 100755 dotfiles-old/scripts/arch_yay.sh create mode 100755 dotfiles-old/scripts/doas-sudo.sh diff --git a/dotfiles-old/scripts/README.txt b/dotfiles-old/scripts/README.txt index 6644790..10d3232 100644 --- a/dotfiles-old/scripts/README.txt +++ b/dotfiles-old/scripts/README.txt @@ -14,23 +14,26 @@ mkdir -p $HOME/bin # executables mkdir -p $HOME/src # source code if [ $1 = "arch" ]; then - # this enables the multilib repo. may fuck shit up. - sudo printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf + sudo bash arch_enable-multilib.sh - # because of this right here packages/all should have a trailing - # newline - sudo pacman -S $(cat packages/all packages/arch_pacman) + sudo pacman -S $(cat packages/all packages/*arch_pacman*) bash arch_yay.sh - yay -S $(cat packages/arch_yay) + yay -S $(cat packages/*arch_yay*) - # PKGBUILD to symlink sudo to doas - # sudo is provided by base-devel so this has to be done after the - # pacman stuff. however, it might be beneficial to do this before the - # yay stuff so it doesn't constantly prompt for the sudo password. - # all depends on how careful you wanna be. - bash arch_doas-sudo.sh - # btw, you can undo this with pacman -S sudo + bash doas-sudo.sh arch + # you can undo this with pacman -S sudo + +elif [ $1 = "artix" ]; then + sudo bash arch_enable-multilib.sh + + sudo pacman -S $(cat packages/all packages/*artix_pacman*) + + bash arch_yay.sh + yay -S $(cat packages/*artix_yay*) + + bash doas-sudo.sh arch + # you can undo this with pacman -S sudo elif [ $1 = "debian" ]; then diff --git a/dotfiles-old/scripts/arch_doas-sudo.sh b/dotfiles-old/scripts/arch_doas-sudo.sh deleted file mode 100644 index 70976be..0000000 --- a/dotfiles-old/scripts/arch_doas-sudo.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -e -source ./cdecho.sh - -mkdir -p $HOME/src/doas-sudo -cp PKGBUILD_doas-sudo $HOME/src/doas-sudo/PKGBUILD - -cde $HOME/src/doas-sudo -makepkg -si diff --git a/dotfiles-old/scripts/arch_enable-multilib.sh b/dotfiles-old/scripts/arch_enable-multilib.sh new file mode 100755 index 0000000..4dcb70a --- /dev/null +++ b/dotfiles-old/scripts/arch_enable-multilib.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# must be run as root + +if [ $1 = "artix" ]; then + printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist-arch\n' >>/etc/pacman.conf +else + printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf +fi diff --git a/dotfiles-old/scripts/arch_yay.sh b/dotfiles-old/scripts/arch_yay.sh old mode 100644 new mode 100755 index 30ee055..625fa2e --- a/dotfiles-old/scripts/arch_yay.sh +++ b/dotfiles-old/scripts/arch_yay.sh @@ -4,7 +4,7 @@ set -e source ./cdecho.sh cde $HOME/src -git clone https://aur.archlinux.org/yay.git +git clone https://aur.archlinux.org/yay.git || git pull cde yay makepkg -si yay -V diff --git a/dotfiles-old/scripts/doas-sudo.sh b/dotfiles-old/scripts/doas-sudo.sh new file mode 100755 index 0000000..83c9b60 --- /dev/null +++ b/dotfiles-old/scripts/doas-sudo.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e +source ./cdecho.sh + +if [ $1 = "arch" ]; then + mkdir -p $HOME/src/doas-sudo + cp PKGBUILD_doas-sudo $HOME/src/doas-sudo/PKGBUILD + + cde $HOME/src/doas-sudo + makepkg -si +fi diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh index 60233c7..e515928 100755 --- a/dotfiles-old/scripts/oneliners.sh +++ b/dotfiles-old/scripts/oneliners.sh @@ -36,6 +36,6 @@ printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 20 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive -printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv +printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * From 67b39ed46da04685dd7ae1e738ef096f737a5eec Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 8 Feb 2021 20:14:18 -0500 Subject: [PATCH 053/142] packages --- dotfiles-old/scripts/packages/all | 2 ++ dotfiles-old/scripts/packages/arch_pacman | 1 + dotfiles-old/scripts/packages/artix_pacman | 3 +++ dotfiles-old/scripts/packages/bootstrap | 1 + dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman | 1 - dotfiles-old/scripts/packages/common-arch_yay-artix_yay | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 dotfiles-old/scripts/packages/arch_pacman diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index a443e1f..c4f2a3d 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -16,6 +16,7 @@ k3b kate kdenlive krita +linux-headers lynx macchanger moc @@ -25,6 +26,7 @@ neofetch net-tools nmap pkgfile +powertop progress pulseaudio pulsemixer diff --git a/dotfiles-old/scripts/packages/arch_pacman b/dotfiles-old/scripts/packages/arch_pacman new file mode 100644 index 0000000..20340f3 --- /dev/null +++ b/dotfiles-old/scripts/packages/arch_pacman @@ -0,0 +1 @@ +virtualbox-host-modules-arch diff --git a/dotfiles-old/scripts/packages/artix_pacman b/dotfiles-old/scripts/packages/artix_pacman index 3ce2d96..74b6027 100644 --- a/dotfiles-old/scripts/packages/artix_pacman +++ b/dotfiles-old/scripts/packages/artix_pacman @@ -1 +1,4 @@ +acpid +acpid-openrc iwd-openrc +virtualbox-host-modules-artix diff --git a/dotfiles-old/scripts/packages/bootstrap b/dotfiles-old/scripts/packages/bootstrap index 9c9e342..7cb3f21 100644 --- a/dotfiles-old/scripts/packages/bootstrap +++ b/dotfiles-old/scripts/packages/bootstrap @@ -3,5 +3,6 @@ coreutils gcc git less +linux make nano diff --git a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman index 466396a..9733548 100644 --- a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman +++ b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman @@ -22,7 +22,6 @@ python-pip qt5-imageformats ttf-dejavu vi -virtualbox-host-modules-arch which wireshark-cli xorg-server diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay index 74df12e..bb25fc4 100644 --- a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay +++ b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay @@ -10,6 +10,7 @@ instagram-scraper iwgtk minecraft-launcher mullvad-vpn-beta +multimc5 spotify steam tor-browser From 98dee73710944a92982a35b1b2e3e9f63d5562bc Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 10 Feb 2021 22:33:44 -0500 Subject: [PATCH 054/142] more oneliners and stuff --- dotfiles-old/scripts/oneliners.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh index e515928..265752e 100755 --- a/dotfiles-old/scripts/oneliners.sh +++ b/dotfiles-old/scripts/oneliners.sh @@ -9,11 +9,15 @@ source ./cdecho.sh mkdir -p $HOME/bin/oneliners || exit cde $HOME/bin/oneliners +DMENU_LINES="40" SHABANG="#!/bin/sh\n" # music stuff -printf "selection=\"\$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l 50)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album -printf "selection=\"\$(find /mnt/audio -type f | sort | dmenu -l 50)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song +printf $SHABANG"selection=\"\$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album +printf $SHABANG"selection=\"\$(find /mnt/audio -type f | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song + +# reading +printf $SHABANG"SELECTION=\"\$(find /mnt/partone/texts/ -type f | sort | dmenu -l $DMENU_LINES)\"\nEXTENSION=\"\$(echo \$SELECTION | asplit - . 1)\"\n[ \"\$EXTENSION\" = \"pdf\" ] && xpdf \"\$SELECTION\"\n" >read_book # private bookmarks printf $SHABANG"firefox file://"$HOME"/bookmarks.html\n" >bmarks @@ -32,10 +36,13 @@ printf $SHABANG"xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720 printf $SHABANG"xrandr --output HDMI-1 --off\n" >hdmioff printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff +# project i'm working on +printf $SHABANG"xterm -e \"source $HOME/src/ytfeed.py/bin/activate && python $HOME/src/ytfeed.py/cli.py\"\n" >ytfeed + # youtube-dl stuff printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp -printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 20 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive +printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * From da72cde02893b20fc18ce2070b158813a6176ac3 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 13 Feb 2021 23:58:56 -0500 Subject: [PATCH 055/142] acpi handled by elogind --- dotfiles-old/scripts/packages/artix_pacman | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/scripts/packages/artix_pacman b/dotfiles-old/scripts/packages/artix_pacman index 74b6027..845843c 100644 --- a/dotfiles-old/scripts/packages/artix_pacman +++ b/dotfiles-old/scripts/packages/artix_pacman @@ -1,4 +1,4 @@ -acpid -acpid-openrc iwd-openrc +openresolv +wireguard-openrc virtualbox-host-modules-artix From d528d42aa072e5c8d4bec00abae03ebf566aaf88 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 21 Feb 2021 18:30:55 -0500 Subject: [PATCH 056/142] mc --- dotfiles-old/scripts/packages/all | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index c4f2a3d..3fd9009 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -1,4 +1,5 @@ adb +anki audacious blender curl @@ -16,9 +17,11 @@ k3b kate kdenlive krita +lame linux-headers lynx macchanger +mc moc moreutils mpv @@ -44,6 +47,7 @@ unrar unzip vlc wget +wireguard-tools xclip xscreensaver xterm From 5368c97ea113a5d6a8c2777b3c581b69154535bc Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 1 Mar 2021 08:45:32 -0500 Subject: [PATCH 057/142] UNLICENSE --- dotfiles-old/LICENSE | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dotfiles-old/LICENSE diff --git a/dotfiles-old/LICENSE b/dotfiles-old/LICENSE new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/dotfiles-old/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to From 63765d7033f9cac5b194d36bbd89d77270d56870 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 17 Mar 2021 10:47:36 -0400 Subject: [PATCH 058/142] software --- dotfiles-old/scripts/packages/all | 8 ++++++++ dotfiles-old/scripts/packages/artix_pacman | 3 +++ .../scripts/packages/common-arch_pacman-artix_pacman | 3 +++ dotfiles-old/scripts/packages/common-arch_yay-artix_yay | 3 +++ dotfiles-old/scripts/packages/debian_apt | 2 ++ 5 files changed, 19 insertions(+) diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index 3fd9009..eb1f028 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -21,13 +21,17 @@ lame linux-headers lynx macchanger +man-pages mc +mercurial moc moreutils mpv neofetch net-tools +ninja nmap +p7zip pkgfile powertop progress @@ -35,16 +39,20 @@ pulseaudio pulsemixer python3 qbittorrent +qemu rsync s-tui screen scrot sed +smartmontools thunar thunderbird +tlp units unrar unzip +virt-manager vlc wget wireguard-tools diff --git a/dotfiles-old/scripts/packages/artix_pacman b/dotfiles-old/scripts/packages/artix_pacman index 845843c..8c0b389 100644 --- a/dotfiles-old/scripts/packages/artix_pacman +++ b/dotfiles-old/scripts/packages/artix_pacman @@ -1,4 +1,7 @@ +acpid +acpid-openrc iwd-openrc +libvirt-openrc openresolv wireguard-openrc virtualbox-host-modules-artix diff --git a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman index 9733548..92371d4 100644 --- a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman +++ b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman @@ -1,5 +1,7 @@ asp base-devel +clisp +cpupower dhcpcd firefox-developer-edition fuse2 @@ -19,6 +21,7 @@ otf-ipafont pulseaudio-alsa pulseaudio-bluetooth python-pip +qemu-arch-extra qt5-imageformats ttf-dejavu vi diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay index bb25fc4..c439be0 100644 --- a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay +++ b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay @@ -1,4 +1,7 @@ aic94xx-firmware +bitwarden +bitwarden-cli +bitwarden-dmenu discord_arch_electron doas freedownloadmanager diff --git a/dotfiles-old/scripts/packages/debian_apt b/dotfiles-old/scripts/packages/debian_apt index db63ff4..6febc2e 100644 --- a/dotfiles-old/scripts/packages/debian_apt +++ b/dotfiles-old/scripts/packages/debian_apt @@ -1,3 +1,5 @@ build-essential fonts-dejavu libreoffice +linux-tools-common +linux-tools-generic From 56d17f5fab3c64c3012a87821a4faaa3f7721371 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 19 Mar 2021 11:37:46 -0400 Subject: [PATCH 059/142] no more xpdf, zathura is the future --- dotfiles-old/scripts/packages/all | 5 +++++ .../scripts/packages/common-arch_pacman-artix_pacman | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index eb1f028..136a2b1 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -59,3 +59,8 @@ wireguard-tools xclip xscreensaver xterm +zathura +zathura-cb +zathura-djvu +zathura-mupdf +zathura-ps diff --git a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman index 92371d4..5040b0f 100644 --- a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman +++ b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman @@ -31,5 +31,4 @@ xorg-server xorg-xauth xorg-xinit xorg-xrdb -xpdf youtube-dl From 121c225f033ea4f31e98edfafa0b2c5f7cb2a5ac Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 26 Mar 2021 10:41:52 -0400 Subject: [PATCH 060/142] spacer gen --- dotfiles-old/scripts/spacer.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 dotfiles-old/scripts/spacer.sh diff --git a/dotfiles-old/scripts/spacer.sh b/dotfiles-old/scripts/spacer.sh new file mode 100755 index 0000000..07f31a0 --- /dev/null +++ b/dotfiles-old/scripts/spacer.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# creates an 8GB empty file in the root dir +# that way when the alarm bells go off you can delete it to save a couple +# minutes before the system really runs out of disk +! [ -e /spacer.img ] || return 1 || exit 1 +dd if=/dev/zero bs=1K count=8M >spacer.img +sudo mv ./spacer.img /spacer.img From 9e70ae4b66c98a39b841598ad97607a3e3589403 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 28 Mar 2021 17:03:18 -0400 Subject: [PATCH 061/142] backup --- dotfiles-old/.Xresources | 47 +++---- dotfiles-old/.aliases | 59 +++------ dotfiles-old/.bashrc | 2 +- dotfiles-old/.config/i3/config | 121 +----------------- dotfiles-old/.config/i3status/config | 4 +- dotfiles-old/.config/ytfeed-config.txt | 9 +- dotfiles-old/.env | 19 +++ dotfiles-old/.profile | 20 +-- dotfiles-old/clone.sh | 10 ++ dotfiles-old/scripts/arch_yay.sh | 5 +- dotfiles-old/scripts/dotfiles.sh | 3 +- dotfiles-old/scripts/oneliners.sh | 51 ++++++-- dotfiles-old/scripts/packages/all | 1 + .../packages/common-arch_yay-artix_yay | 1 + 14 files changed, 127 insertions(+), 225 deletions(-) create mode 100644 dotfiles-old/.env create mode 100644 dotfiles-old/clone.sh mode change 100644 => 100755 dotfiles-old/scripts/dotfiles.sh diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources index fbcf3bd..395b406 100644 --- a/dotfiles-old/.Xresources +++ b/dotfiles-old/.Xresources @@ -1,38 +1,22 @@ -xterm*loginshell: true -xterm*locale: UTF-8 -xterm*titleModes: 16 -xterm*utf8: 1 -xterm*utf8Fonts: 1 -xterm*utf8Title: true -xterm*metaSendsEscape: true -xterm*font: -*-*-*-*-*-*-*-*-*-*-*-*-*-* - -! azuki font -!xterm*faceName: azuki_font:antialias=false -!xterm*faceSize: 10 - -! cordata font -!xterm*faceName: "Px437 Cordata PPC\-400" -!xterm*faceSize: 1 - ! unscii font -xterm*faceName: unscii:antialias=false -xterm*faceSize: 12 - -! white - from alnj/dotfiles -!*background: #FFFCFD -!*foreground: #250E07 -!*cursorColor: #250E07 +*faceName: unscii:antialias=false +*faceSize: 12 *Background: #000000 ! amber -*Foreground: #FFBF00 -*cursorColor: #FFBF00 +!*Foreground: #FFBF00 +!*cursorColor: #FFBF00 + +! pink +*Foreground: #FFDBDB +*cursorColor: #FFDBDB ! black on white (first uncomment white's stuff) !*reverseVideo: true +! I used to use these but they make it really hard to see default Lynx. + ! "quantified colors" but every nybble ! is decremented ====================== ! black/dark-gray @@ -87,3 +71,14 @@ xterm*faceSize: 12 !*.color7: #808080 !*.color15: #C0C0C0 ! ===================================== + +! xterm specific stuff + +xterm*font: -*-*-*-*-*-*-*-*-*-*-*-*-*-* +xterm*loginshell: true +xterm*locale: UTF-8 +xterm*titleModes: 16 +xterm*metaSendsEscape: true +xterm*utf8: 1 +xterm*utf8Fonts: 1 +xterm*utf8Title: true diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 80dae78..4e85692 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -1,33 +1,14 @@ -# convenient music play -# tons of repeated code, should be fixed -album() { - selection="$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l 50)" - [ $selection = $(echo -e "\n") ] 2>/dev/null || i3-swallow audacious "$selection" -} -song() { - selection="$(find /mnt/audio -type f | sort | dmenu -l 50)" - [ $selection = $(echo -e "\n") ] 2>/dev/null || i3-swallow audacious "$selection" -} - # audio drive alias audio="sudo mount -L 'AUDIO' /mnt/audio" -# private bookmarks -alias bmarks="firefox file://"$HOME"/bookmarks.html" - +alias awk="nawk" alias cat="9 cat" - alias cls="clear" - -alias firefox="firefox-developer-edition" - -# useful aliases -alias iftoggle="sudo ip link set" -alias ifswitch="iftoggle $1 down && iftoggle $1 up" - +alias cp="cp -iv" +alias emacs="vi" # that'll freak people out alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/" - alias ipconfig="ifconfig" +alias ls="9 ls" # other volumes mnt() { @@ -35,10 +16,7 @@ mnt() { sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1 } -# music player -alias mu="audacious" - -# i always forget this one but it's useful +alias mv="mv -iv" alias p="ping 1.1.1.1" # my media hard drive @@ -51,13 +29,13 @@ path() { pyenv() { if [ $# -eq 0 ]; then - source ./bin/activate + . ./bin/activate else - source $1/bin/activate + . $1/bin/activate fi } -alias sudo="doas" +alias sensors="watch sensors" # Wacom Intuos 2 alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1" @@ -65,18 +43,13 @@ alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" alias tracert="tracepath" +# dirtbag aliases to get myself to use vim more +alias emacs="vim" +alias ne="vim" +alias vi="vim" + +alias weather="curl wttr.in/lewiston+maine?m" + webm() { - ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis $(printf "$1" | asplit - . 0).webm -} - -alias yta="youtube-dl -f bestaudio" - -# project i'm working on -ytfeed() { - pyenv $HOME/src/ytfeed.py/ - python $HOME/src/ytfeed.py/cli.py -} -ytfeedsh() { - pyenv $HOME/src/ytfeed.py/ - python $HOME/src/ytfeed.py/shell.py + ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis $(printf "$1" | asplit . 0).webm } diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc index 8ed0ede..a498dd6 100644 --- a/dotfiles-old/.bashrc +++ b/dotfiles-old/.bashrc @@ -1 +1 @@ -source .profile \ No newline at end of file +source .env diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index f8294f3..f9dac6a 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -4,105 +4,16 @@ set $mod Mod1 # Font for window titles -#font pango:monospace 8 -#font pango:azuki_font 10 font pango:unscii 12 -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -#font pango:DejaVu Sans Mono 8 - -# The combination of xss-lock, nm-applet and pactl is a popular choice, so -# they are included here as an example. Modify as you see fit. - -# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the -# screen before suspend. Use loginctl lock-session to lock your screen. -#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork - -# tint2 status bar -#exec --no-startup-id exec tint2 - -# Use pactl to adjust volume in PulseAudio. - -## increase sound volume -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ +5% - -## decrease sound volume -bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ -5% - -## mute output -bindsym XF86AudioMute exec --no-startup-id pactl -- set-sink-mute @DEFAULT_SINK@ toggle -bindsym $mod+m exec --no-startup-id pactl -- set-sink-mute @DEFAULT_SINK@ toggle - -## mute input -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status -bindsym $mod+Shift+m exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status - -# Use amixer to adjust volume in PulseAudio. (not as good as pactl) -#bindsym XF86AudioMute exec amixer sset 'Master' toggle -#bindsym XF86AudioLowerVolume exec amixer sset 'Master' 5%- -#bindsym XF86AudioRaiseVolume exec amixer sset 'Master' 5%+ - -# Screen brightness -# cred 4 https://github.com/patrickbolle/dotfiles/ -bindsym $mod+equal exec light -A 5 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" -bindsym $mod+Shift+equal exec light -A 1 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" -bindsym $mod+minus exec light -U 5 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" -bindsym $mod+Shift+minus exec light -U 1 && notify-send --expire-time=20 "LCD Backlight $(printf %.0f%% $(light -G))" +# keybindings +exec_always --no-startup-id sxhkd # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod -# start a terminal -#bindsym $mod+Return exec i3-sensible-terminal -bindsym $mod+Return exec uxterm -bindsym XF86Launch1 exec uxterm - -# kill focused window -bindsym $mod+F4 kill -bindsym --release button2 kill - -# start dmenu -bindsym $mod+d exec dmenu_run - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l 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 - -# split in horizontal orientation -bindsym $mod+g split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle -bindsym $mod+F11 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 +# start pulseaudio +exec --no-startup-id pulseaudio --start # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. @@ -117,18 +28,6 @@ set $ws8 "8" set $ws9 "9" set $ws10 "10" -# kanji -#set $ws1 "一" -#set $ws2 "二" -#set $ws3 "三" -#set $ws4 "四" -#set $ws5 "五" -#set $ws6 "六" -#set $ws7 "七" -#set $ws8 "八" -#set $ws9 "九" -#set $ws10 "十" - # switch to workspace bindsym $mod+1 workspace number $ws1 bindsym $mod+2 workspace number $ws2 @@ -214,15 +113,6 @@ bar { } } -# Media player controls -bindsym XF86AudioPlay exec playerctl play -bindsym XF86AudioPause exec playerctl pause -bindsym XF86AudioNext exec playerctl next -bindsym XF86AudioPrev exec playerctl previous - -# Screenshotting -bindsym Print exec scrot - # color customization # class border bg text indicator child_border client.focused #ff0000 #ffffff #ff0000 #2e9ef4 #ff0000 @@ -233,9 +123,6 @@ client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c client.background #ffffff -# Task manager -bindsym Control+Shift+Escape exec xfce4-taskmanager - # Wallpaper exec --no-startup-id feh --bg-center /home/trinity/Pictures/Wallpapers/akirablast.jpg diff --git a/dotfiles-old/.config/i3status/config b/dotfiles-old/.config/i3status/config index bd2bb4d..8429036 100644 --- a/dotfiles-old/.config/i3status/config +++ b/dotfiles-old/.config/i3status/config @@ -26,8 +26,8 @@ wireless _first_ { } ethernet _first_ { - format_up = "enp0s25: %ip (%speed)" - format_down = "enp0s25 DOWN" + format_up = "eth0: %ip (%speed)" + format_down = "eth0 DOWN" } battery all { diff --git a/dotfiles-old/.config/ytfeed-config.txt b/dotfiles-old/.config/ytfeed-config.txt index d9d28aa..5cc802f 100644 --- a/dotfiles-old/.config/ytfeed-config.txt +++ b/dotfiles-old/.config/ytfeed-config.txt @@ -1,5 +1,8 @@ -auto_refresh_feeds: 1 +auto_refresh_feeds: -1 +cap: 200 consumption_file_name: /home/trinity/.ytfeed/consumption.txt +feed_directory: /home/trinity/.ytfeed/feeds/ xml_storage_directory: /home/trinity/.ytfeed/feeds/ -video_downloader: youtube-dl --add-metadata -i -f "bestvideo[vcodec=vp9]+bestaudio[acodec=opus]" -o "\"/home/trinity/%(upload_date)s %(title)s.%(ext)s\"" -viewer: mpv +video_downloader: youtube-dlp +viewer: youtube-dl-mpv +web_browser: firefox-developer-edition diff --git a/dotfiles-old/.env b/dotfiles-old/.env new file mode 100644 index 0000000..44448fe --- /dev/null +++ b/dotfiles-old/.env @@ -0,0 +1,19 @@ +DOOMWADDIR=/mnt/partone/misc/doomwads/; export DOOMWADDIR +EDITOR=vim; export EDITOR +PAGER="less"; export PAGER + +PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH +PATH=$PATH":$PLAN9/bin" +export PATH + +PLAN9=/usr/local/plan9; export PLAN9 + +PS1="; " +PS2="; " +PS3="; " + +if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi + +set -o vi + +. $HOME/.aliases diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index 1453a36..083fe5e 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -1,19 +1 @@ -#!/bin/sh - -EDITOR=vim -PS1="; " -PS2=">; " -PS3=">>; " - -source $HOME/.aliases - -complete -c man which - -# for ruby working -eval "$(rbenv init -)" - -PLAN9=/usr/local/plan9 -export PLAN9 - -PATH=$PATH":$HOME/bin/:$HOME/bin/oneliners/:$PLAN9/bin" -export PATH +ENV="$HOME"/.env; export ENV diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh new file mode 100644 index 0000000..47f2818 --- /dev/null +++ b/dotfiles-old/clone.sh @@ -0,0 +1,10 @@ +cp $HOME/.Xresources ./ +cp $HOME/.aliases ./ +cp $HOME/.bashrc ./ +cp $HOME/.env ./ +cp $HOME/.profile ./ +mkdir -p ./.config/ +cp $HOME/.config/ytfeed-config.txt ./.config/ +mkdir -p ./.config/i3 +cp $HOME/.config/i3/config ./.config/i3/config +mkdir -p ./.config/i3status diff --git a/dotfiles-old/scripts/arch_yay.sh b/dotfiles-old/scripts/arch_yay.sh index 625fa2e..1cb5269 100755 --- a/dotfiles-old/scripts/arch_yay.sh +++ b/dotfiles-old/scripts/arch_yay.sh @@ -3,8 +3,11 @@ set -e source ./cdecho.sh +YAYURL="https://aur.archlinux.org/yay.git" + cde $HOME/src -git clone https://aur.archlinux.org/yay.git || git pull +git clone $YAYURL || printf "yay already downloaded\n" cde yay +git pull makepkg -si yay -V diff --git a/dotfiles-old/scripts/dotfiles.sh b/dotfiles-old/scripts/dotfiles.sh old mode 100644 new mode 100755 index c965924..37802b5 --- a/dotfiles-old/scripts/dotfiles.sh +++ b/dotfiles-old/scripts/dotfiles.sh @@ -15,6 +15,7 @@ fc-cache # basic configs cp {.Xresources,.aliases,.bashrc,.profile} $HOME/ +ln -s $HOME/.Xresources $HOME/.Xdefaults # dmenu cde $HOME/src @@ -34,7 +35,7 @@ cp $HOME/src/dotfiles/.config/i3status/config i3status/ # winamp skin (checks to see if audacious is installed first) sudo mkdir -p /usr/share/audacious/Skins/ -which audacious && sudo curl https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Gang.wsz -o /usr/share/audacious/Skins/Sailor_Moon_Gang.wsz +which audacious && sudo curl https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Gang.wsz -o /usr/share/audacious/Skins/Sailor_Moon_Gang.wsz || printf "[ERROR] Could not curl audacious skin.\n" # wallpaper cde $HOME diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh index 265752e..b73c222 100755 --- a/dotfiles-old/scripts/oneliners.sh +++ b/dotfiles-old/scripts/oneliners.sh @@ -4,29 +4,46 @@ # these have use outside the terminal and thus are generated here # - because why make fifty files when i can make one file that does that for me? -source ./cdecho.sh +cde() { + cd $1 + printf "Entered %s.\n" $(pwd) +} mkdir -p $HOME/bin/oneliners || exit cde $HOME/bin/oneliners -DMENU_LINES="40" SHABANG="#!/bin/sh\n" +BASH_SHABANG="#!/bin/bash\n" + +DMENU_LINES="40" + +TEXTS_LIBRARY="/mnt/partone/texts/" +MUSIC_LIBRARY="/mnt/audio/" # music stuff -printf $SHABANG"selection=\"\$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album -printf $SHABANG"selection=\"\$(find /mnt/audio -type f | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song +printf $SHABANG"selection=\"\$(find $MUSIC_LIBRARY -type d -mindepth 2 2>/dev/null | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album +printf $SHABANG"selection=\"\$(find $MUSIC_LIBRARY -type f | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song # reading -printf $SHABANG"SELECTION=\"\$(find /mnt/partone/texts/ -type f | sort | dmenu -l $DMENU_LINES)\"\nEXTENSION=\"\$(echo \$SELECTION | asplit - . 1)\"\n[ \"\$EXTENSION\" = \"pdf\" ] && xpdf \"\$SELECTION\"\n" >read_book +printf $SHABANG"SELECTION=\"\$(find $TEXTS_LIBRARY -type f | sort | dmenu -l $DMENU_LINES)\" +EXTENSION=\"\$(echo \$SELECTION | asplit . 1)\" +case \$EXTENSION in + (djvu) zathura \"\$SELECTION\" ;; + (epub) zathura \"\$SELECTION\" ;; + (html) firefox \"\$SELECTION\" ;; + (pdf) zathura \"\$SELECTION\" ;; + (*) xterm -e \"cat \"\"\$SELECTION\"\" | nl | less\" ;; +esac +" >read_book # broken, xterm things flash and exit 0. # private bookmarks -printf $SHABANG"firefox file://"$HOME"/bookmarks.html\n" >bmarks +printf $SHABANG"firefox file://$HOME/bookmarks.html\n" >bmarks # deemix printf $SHABANG"python $HOME/src/deemix-pyweb/deemix-pyweb.py\n" >deemix # firefox (launches firefox-developer-edition) -printf $SHABANG"firefox-developer-edition \"\$@\"\n" >firefox +printf $BASH_SHABANG"firefox-developer-edition \"\$@\"\n" >firefox # settings for specific monitors printf $SHABANG"xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702 @@ -36,13 +53,23 @@ printf $SHABANG"xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720 printf $SHABANG"xrandr --output HDMI-1 --off\n" >hdmioff printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff +# wireguard vpn stuff +printf $BASH_SHABANG"sudo wg-quick up \"\$@\"\n" >vpn-connect +printf $BASH_SHABANG"sudo wg-quick down \"\$@\"\n" >vpn-disconnect +printf $SHABANG"sudo ls /etc/wireguard/ | grep \"conf$\" | asplit .conf 0\n" >vpn-list +printf $SHABANG"xterm -e \"vpn-connect \$(vpn-list | dmenu); read -s -n 1\"\n" >vpn-quick # not to be confused with wg-quick + +# i always forget to use multimc +printf $SHABANG"multimc\n" >minecraft + # project i'm working on -printf $SHABANG"xterm -e \"source $HOME/src/ytfeed.py/bin/activate && python $HOME/src/ytfeed.py/cli.py\"\n" >ytfeed +printf $SHABANG"xterm -e \". $HOME/src/ytfeed.py/bin/activate && python $HOME/src/ytfeed.py/cli.py\"\n" >ytfeed +printf $BASH_SHABANG"cd $HOME/src/ytfeed.sh/\n./renew.sh \"\$@\"\n" >ytfeed-renew # youtube-dl stuff -printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo -printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp -printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive -printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv +printf $BASH_SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo +printf $BASH_SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp +printf $BASH_SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | awk '{ print \$1 }') \"\$@\"\n" >youtube-dl-interactive +printf $BASH_SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index 136a2b1..a192c18 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -49,6 +49,7 @@ smartmontools thunar thunderbird tlp +twin units unrar unzip diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay index c439be0..0990b3c 100644 --- a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay +++ b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay @@ -2,6 +2,7 @@ aic94xx-firmware bitwarden bitwarden-cli bitwarden-dmenu +dashbinsh discord_arch_electron doas freedownloadmanager From 49bd9e9c904bca5c0be10ac26b21aa0f6a36e880 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 28 Mar 2021 18:25:37 -0400 Subject: [PATCH 062/142] better clone, adding a couple things --- dotfiles-old/.config/sxhkd/sxhkdrc | 66 ++++++++++++++++++++++++++++++ dotfiles-old/.vimrc | 3 ++ dotfiles-old/README.md | 37 +++-------------- dotfiles-old/clone.sh | 7 ++++ 4 files changed, 82 insertions(+), 31 deletions(-) create mode 100755 dotfiles-old/.config/sxhkd/sxhkdrc create mode 100644 dotfiles-old/.vimrc mode change 100644 => 100755 dotfiles-old/clone.sh diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc b/dotfiles-old/.config/sxhkd/sxhkdrc new file mode 100755 index 0000000..1dff564 --- /dev/null +++ b/dotfiles-old/.config/sxhkd/sxhkdrc @@ -0,0 +1,66 @@ +#!/bin/sh + +control + shift + Escape + uxterm -e htop + +mod1 + d + dmenu_run + +# cred 4 https://github.com/patrickbolle/dotfiles/ +mod1 + equal + light -A 5 +mod1 + shift + equal + light -A 1 +mod1 + minus + light -U 5 +mod1 + shift + minus + light -U 1 + +mod1 + F4 + i3-msg kill + +mod1 + {h,j,k,l} + i3-msg focus {left,down,up,right} + +mod1 + f + i3-msg fullscreen toggle +mod1 + F11 + i3-msg fullscreen toggle + +mod1 + {s,w} + i3-msg layout {stacking,tabbed} +mod1 + e + i3-msg layout toggle split + +mod1 + space + i3-msg focus mode_toggle + +mod1 + shift + space + i3-msg floating toggle + +mod1 + shift + {h,j,k,l} + i3-msg move {left,down,up,right} + +mod1 + shift + e + [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && i3-msg exit + +mod1 + m + pactl -- set-sink-mute @DEFAULT_SINK@ toggle +mod1 + shift + m + pactl set-source-mute @DEFAULT_SOURCE@ toggle +mod1 + Return + uxterm + +Print + scrot + +XF86AudioMicMute + pactl set-source-mute @DEFAULT_SOURCE@ toggle +XF86AudioMute + pactl -- set-sink-mute @DEFAULT_SINK@ toggle +XF86Audio{Lower,Raise}Volume + pactl set-sink-volume @DEFAULT_SINK@ {"-5%","+5%"} +XF86Audio{Play,Pause,Next,Prev} + playerctl {play,pause,next,previous} +XF86Launch1 + uxterm diff --git a/dotfiles-old/.vimrc b/dotfiles-old/.vimrc new file mode 100644 index 0000000..1b2a329 --- /dev/null +++ b/dotfiles-old/.vimrc @@ -0,0 +1,3 @@ +set nowrap +set relativenumber +syntax on diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 91596fe..255d76b 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -2,38 +2,13 @@ Pretty config stuff. ![This is a screenshot of my desktop.](https://web.archive.org/web/20200926155417if_/https://i.redd.it/jwhsmokcfcp51.png) +For this configuration, posted on r/unixporn on 2020-09-25, refer to the state of the repository around [2020-09-26](https://github.com/devenblake/dotfiles/tree/7d0a35b6d06c2bb46990087c6a6c4b2a2685d49c) or so. -## applications shown (and some unshown) +My setup has changed drastically since then. -### display manager -I use [ly](https://github.com/nullgemm/ly). +My shell aliases are in `.aliases` and my general shell configuration is in `.env` +I use `dash` as my shell. I sort of miss tab-completion but it's worth it so I know everything I do is reproducible. -### file manager -[Bash](https://www.gnu.org/software/bash/). +Refer to `scripts/` for scripts that help me keep everything organized, except for `clone.sh` (which clones all my dotfiles to `~/src/dotfiles/`, where I keep my local copy of this repo). -My shell aliases are in `.aliases` and my general shell configuration is in `.profile`. -I don't know if my configuration is perfect but it works. - -### status bar -[i3status](https://i3wm.org/i3status/). The configuration file is at `.config/i3status/config` in this repo. - -A caveat is that the interface names in the i3status configuration (`wlan0` and `enp0s25`) are specific to my system. A kinda ugly hack but I didn't expect to get [300 upvotes on Reddit](https://www.reddit.com/r/unixporn/comments/izpvwp/i3gaps_basic_but_it_works/) for my desktop! - -### wallpaper -[This 1920x1080 Asuka edit](https://archive.org/details/asuka-98). - -### winamp skin -This [Sailor Moon themed skin](https://archive.org/details/winampskin_Sailor_Moon_Gang) on [Audacious](https://audacious-media-player.org/). - -### window manager -[i3-gaps](https://github.com/Airblader/i3). The configuration file is at `.config/i3/config`. The configuration has the wallpaper at `/home/trinity/Pictures/Wallpapers/Asuka\ 98.jpg`, this may need to be changed. - -### xterm -My xterm config is at .Xresources. I haven't had good luck at getting fonts to work with it but [unscii](http://pelulamu.net/unscii/)-16-full works great. -I use -[this terminal color theme](https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/) -([here's a webarchive link just in case](https://web.archive.org/web/20200926160802/https://www.reddit.com/r/unixporn/comments/hjzw5f/oc_qualitative_color_palette_for_ansi_terminal/fwpludj/?context=3)) -because it's pretty to me. - -## get the look -Refer to the scripts/ directory. +A list of all the packages I use is available in `scripts/packages/`, organized by repository availability. diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh old mode 100644 new mode 100755 index 47f2818..d2639d4 --- a/dotfiles-old/clone.sh +++ b/dotfiles-old/clone.sh @@ -1,10 +1,17 @@ +#!/bin/sh +[ "$(printf "Abort.\nContinue.\n" | dmenu -p "Current path is '$(pwd)'. Continue?")" = "Continue." ] || return || exit +set -x cp $HOME/.Xresources ./ cp $HOME/.aliases ./ cp $HOME/.bashrc ./ cp $HOME/.env ./ cp $HOME/.profile ./ +cp $HOME/.vimrc ./ mkdir -p ./.config/ cp $HOME/.config/ytfeed-config.txt ./.config/ mkdir -p ./.config/i3 cp $HOME/.config/i3/config ./.config/i3/config mkdir -p ./.config/i3status +cp $HOME/.config/i3status/config ./.config/i3status/config +mkdir -p ./.config/sxhkd +cp $HOME/.config/sxhkd/sxhkdrc ./.config/sxhkd/sxhkdrc From c75de201a0146ff73906d123c3c6b0746e7fd7ed Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 28 Mar 2021 18:44:51 -0400 Subject: [PATCH 063/142] license fix (oops!) --- dotfiles-old/README.md | 10 ++++++++-- dotfiles-old/clone.sh | 2 ++ dotfiles-old/licenses/MITX | 30 ++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 dotfiles-old/licenses/MITX diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 255d76b..765345e 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -2,13 +2,19 @@ Pretty config stuff. ![This is a screenshot of my desktop.](https://web.archive.org/web/20200926155417if_/https://i.redd.it/jwhsmokcfcp51.png) -For this configuration, posted on r/unixporn on 2020-09-25, refer to the state of the repository around [2020-09-26](https://github.com/devenblake/dotfiles/tree/7d0a35b6d06c2bb46990087c6a6c4b2a2685d49c) or so. +For this configuration, [posted on r/unixporn on 2020-09-25](https://www.reddit.com/r/unixporn/comments/izpvwp/i3gaps_basic_but_it_works/), refer to the [state of the repository around 2020-09-26](https://github.com/devenblake/dotfiles/tree/7d0a35b6d06c2bb46990087c6a6c4b2a2685d49c) or so. My setup has changed drastically since then. -My shell aliases are in `.aliases` and my general shell configuration is in `.env` +My shell aliases are in `.aliases` and my general shell configuration is in `.env`. I use `dash` as my shell. I sort of miss tab-completion but it's worth it so I know everything I do is reproducible. Refer to `scripts/` for scripts that help me keep everything organized, except for `clone.sh` (which clones all my dotfiles to `~/src/dotfiles/`, where I keep my local copy of this repo). A list of all the packages I use is available in `scripts/packages/`, organized by repository availability. + +## License + +See `LICENSE` for the repository license if you want but basically all code, unless otherwise stated, is released unencumbered into the public domain. +A notable exception to this is `src/dmenu/config.h` which is licensed under the MIT/X Consortium license as is dmenu. +This license can be found in `licenses/MITX`. diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh index d2639d4..2e143ef 100755 --- a/dotfiles-old/clone.sh +++ b/dotfiles-old/clone.sh @@ -15,3 +15,5 @@ mkdir -p ./.config/i3status cp $HOME/.config/i3status/config ./.config/i3status/config mkdir -p ./.config/sxhkd cp $HOME/.config/sxhkd/sxhkdrc ./.config/sxhkd/sxhkdrc +mkdir -p ./src/dmenu +cp $HOME/src/dmenu/config.h ./src/dmenu/config.h diff --git a/dotfiles-old/licenses/MITX b/dotfiles-old/licenses/MITX new file mode 100644 index 0000000..3afd28e --- /dev/null +++ b/dotfiles-old/licenses/MITX @@ -0,0 +1,30 @@ +MIT/X Consortium License + +© 2006-2019 Anselm R Garbe +© 2006-2008 Sander van Dijk +© 2006-2007 Michał Janeczek +© 2007 Kris Maglione +© 2009 Gottox +© 2009 Markus Schnalke +© 2009 Evan Gates +© 2010-2012 Connor Lane Smith +© 2014-2020 Hiltjo Posthuma +© 2015-2019 Quentin Rameau + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. From a2853a5bae235eb450e10c115c844c90c32cfa47 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 28 Mar 2021 18:49:15 -0400 Subject: [PATCH 064/142] license fixed --- dotfiles-old/README.md | 3 +-- dotfiles-old/licenses/{MITX => DMENU} | 0 dotfiles-old/src/dmenu/config.h | 35 +++++++++++++++------------ 3 files changed, 21 insertions(+), 17 deletions(-) rename dotfiles-old/licenses/{MITX => DMENU} (100%) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 765345e..83df5c0 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -16,5 +16,4 @@ A list of all the packages I use is available in `scripts/packages/`, organized ## License See `LICENSE` for the repository license if you want but basically all code, unless otherwise stated, is released unencumbered into the public domain. -A notable exception to this is `src/dmenu/config.h` which is licensed under the MIT/X Consortium license as is dmenu. -This license can be found in `licenses/MITX`. +A notable exception to this is `src/dmenu/config.h` which is licensed under the MIT/X Consortium license as is dmenu; this license can be found in `licenses/DMENU`. diff --git a/dotfiles-old/licenses/MITX b/dotfiles-old/licenses/DMENU similarity index 100% rename from dotfiles-old/licenses/MITX rename to dotfiles-old/licenses/DMENU diff --git a/dotfiles-old/src/dmenu/config.h b/dotfiles-old/src/dmenu/config.h index 40e30f0..8f48cf2 100644 --- a/dotfiles-old/src/dmenu/config.h +++ b/dotfiles-old/src/dmenu/config.h @@ -1,22 +1,27 @@ -/* See LICENSE file for copyright and license details. */ -/* Default settings; can be overriden by command line. */ +/* Licensed under the MIT/X Consortium license. For the full license details + * see the file `licenses/DMENU` in my (Deven Blake's) dotfiles repository or + * the file `LICENSE` in suckless's dmenu repository. */ -static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ -/* -fn option overrides fonts[0]; default X11 font or font set */ -static const char *fonts[] = { - "unscii:antialias=false:size=12", "monospace:size=10" -}; -static const char *prompt = NULL; /* -p option; prompt to the left of input field */ -static const char *colors[SchemeLast][2] = { // fg, bg +static const char *colors[SchemeLast][2] = { /* { foreground, background } */ [SchemeNorm] = { "#ff0000", "#000000" }, [SchemeSel] = { "#ff0000", "#ffffff" }, [SchemeOut] = { "#000000", "#ffffff" }, }; -/* -l option; if nonzero, dmenu uses vertical list with given number of lines */ -static unsigned int lines = 0; -/* - * Characters not considered part of a word while deleting words - * for example: " /?\"&[]" - */ +/* default font */ +static const char *fonts[] = { + "unscii:antialias=false:size=12", + "monospace:size=10" +}; + +/* -l option; if nonzero, dmenu uses vertical list with given number of lines */ +static unsigned int lines = 0; + +static const char *prompt = NULL; + +/* if topbar == 0 it becomes a bottom bar */ +static int topbar = 1; + +/* Characters not considered part of a word while deleting words + * for example: " /?\"&[]" */ static const char worddelimiters[] = " "; From 8562fc3e2995804c8a7fdda0987714f1f89c2c84 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 29 Mar 2021 11:10:07 -0400 Subject: [PATCH 065/142] new package and dsic --- .../scripts/packages/common-arch_yay-artix_yay-debian_apt | 1 + dotfiles-old/scripts/sic.sh | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100755 dotfiles-old/scripts/sic.sh diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt index 6664e1f..ea1c287 100644 --- a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt +++ b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt @@ -1,2 +1,3 @@ moon-buggy ne +syncterm diff --git a/dotfiles-old/scripts/sic.sh b/dotfiles-old/scripts/sic.sh new file mode 100755 index 0000000..43c5ee4 --- /dev/null +++ b/dotfiles-old/scripts/sic.sh @@ -0,0 +1,6 @@ +#!/bin/sh +mkdir -p $HOME/src +cd $HOME/src +git clone https://git.suckless.org/sic +cd $HOME/src/dotfiles/scripts +./dsic.sh # apply patches From b31b49cf108057bee8e5cac8cfe36b490ef3f486 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 29 Mar 2021 11:11:47 -0400 Subject: [PATCH 066/142] dsic --- dotfiles-old/scripts/dsic.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 dotfiles-old/scripts/dsic.sh diff --git a/dotfiles-old/scripts/dsic.sh b/dotfiles-old/scripts/dsic.sh new file mode 100755 index 0000000..e237c5a --- /dev/null +++ b/dotfiles-old/scripts/dsic.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +SIC_C=$HOME/src/sic/sic.c +cp "$SIC_C" ./ + +sed -e 's/No channel to send to/No channel to which to send./' -e '170s/sic/dsic/' dsic.c + +diff sic.c dsic.c +[ "$(printf "No.\nYes.\n" | dmenu -p "Write changes?")" = "Yes." ] && mv "$SIC_C" "$SIC_C".bak && mv dsic.c "$SIC_C" From 3661808a64d28b4f6ea005885b0577534a887665 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 29 Mar 2021 22:51:21 -0400 Subject: [PATCH 067/142] hopefully the last change for a long time --- dotfiles-old/.env | 14 +------------- dotfiles-old/.profile | 13 ++++++++++++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dotfiles-old/.env b/dotfiles-old/.env index 44448fe..950ca4c 100644 --- a/dotfiles-old/.env +++ b/dotfiles-old/.env @@ -1,19 +1,7 @@ -DOOMWADDIR=/mnt/partone/misc/doomwads/; export DOOMWADDIR -EDITOR=vim; export EDITOR -PAGER="less"; export PAGER - -PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH -PATH=$PATH":$PLAN9/bin" -export PATH - -PLAN9=/usr/local/plan9; export PLAN9 +if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi PS1="; " PS2="; " PS3="; " -if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi - -set -o vi - . $HOME/.aliases diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index 083fe5e..44015bd 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -1 +1,12 @@ -ENV="$HOME"/.env; export ENV +DOOMWADDIR=/mnt/partone/misc/doomwads/; export DOOMWADDIR +EDITOR=vim; export EDITOR +PAGER="less"; export PAGER + +PLAN9=/usr/local/plan9; export PLAN9 + +PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH":$PLAN9/bin"; export PATH + +if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi + +ENV=$HOME/.env; export ENV +. $ENV From e82c103fbf94e5f01ae390d23654cd408d38631a Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 29 Mar 2021 22:51:54 -0400 Subject: [PATCH 068/142] no more bash --- dotfiles-old/.bashrc | 1 - 1 file changed, 1 deletion(-) delete mode 100644 dotfiles-old/.bashrc diff --git a/dotfiles-old/.bashrc b/dotfiles-old/.bashrc deleted file mode 100644 index a498dd6..0000000 --- a/dotfiles-old/.bashrc +++ /dev/null @@ -1 +0,0 @@ -source .env From dff263c8200b0abc42a8080b6801a327fa402365 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 30 Mar 2021 09:24:37 -0400 Subject: [PATCH 069/142] stuff --- dotfiles-old/.config/i3/config | 16 ++++++++-------- dotfiles-old/.env | 2 ++ dotfiles-old/clone.sh | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config index f9dac6a..834d743 100644 --- a/dotfiles-old/.config/i3/config +++ b/dotfiles-old/.config/i3/config @@ -131,14 +131,14 @@ bindsym $mod+Shift+greater move container to output right bindsym $mod+Shift+less move container to output left # Gaps -gaps inner 10 -gaps outer 10 -gaps horizontal 10 -gaps vertical 10 -gaps top 10 -gaps right 10 -gaps bottom 10 -gaps left 10 +#gaps inner 10 +#gaps outer 10 +#gaps horizontal 10 +#gaps vertical 10 +#gaps top 10 +#gaps right 10 +#gaps bottom 10 +#gaps left 10 # disables titlebars new_window 1pixel diff --git a/dotfiles-old/.env b/dotfiles-old/.env index 950ca4c..b22342d 100644 --- a/dotfiles-old/.env +++ b/dotfiles-old/.env @@ -4,4 +4,6 @@ PS1="; " PS2="; " PS3="; " +set -o vi + . $HOME/.aliases diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh index 2e143ef..de052c6 100755 --- a/dotfiles-old/clone.sh +++ b/dotfiles-old/clone.sh @@ -3,7 +3,7 @@ set -x cp $HOME/.Xresources ./ cp $HOME/.aliases ./ -cp $HOME/.bashrc ./ +#cp $HOME/.bashrc ./ cp $HOME/.env ./ cp $HOME/.profile ./ cp $HOME/.vimrc ./ From f04c7f1ff5822abf2eb8a3cc1164a8ed88322942 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 30 Mar 2021 20:20:52 -0400 Subject: [PATCH 070/142] my grandmother's website icons --- dotfiles-old/scripts/grammy/icons.sh | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 dotfiles-old/scripts/grammy/icons.sh diff --git a/dotfiles-old/scripts/grammy/icons.sh b/dotfiles-old/scripts/grammy/icons.sh new file mode 100644 index 0000000..2d269a7 --- /dev/null +++ b/dotfiles-old/scripts/grammy/icons.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# icon fetcher +# i made this script to fetch icons for my grandmother and put them in icons/ +# so i wouldn't have to fetch the icons for her desktop when i made her a new +# system. +# i could have downloaded all the icons and put them into a repo for her but +# this uses less space + +# all these icons are on the internet archive so if the local sites change +# they'll still be available + +icons_folder="~/Pictures/icons/" + +! which curl && printf "$0: missing dependency: curl\n" >/dev/stderr && exit 1 + +mkdir -p "$icons_folder" +cd "$icons_folder" + +curl -o "989wclz.com.png" "https://web.archive.org/web/20200629174002if_/https://989wclz.com/wp-content/themes/wclz/img/touch-icon-144.png" +curl -o "amazon.com.ico" "https://web.archive.org/web/20200718050400if_/https://www.amazon.com/favicon.ico" +curl -o "bangordailynews.com.png" "http://web.archive.org/web/20200721195123if_/https://i0.wp.com/bdn-data.s3.amazonaws.com/uploads/2020/06/BDN-logo_green-3-1.png" +curl -o "theguardian.com.png" "https://web.archive.org/web/20200720041457if_/https://assets.guim.co.uk/images/favicons/fee5e2d638d1c35f6d501fa397e53329/152x152.png" +curl -o "centralmaine.com.png" "https://web.archive.org/web/20200720023956if_/https://multifiles.pressherald.com/uploads/sites/2/2014/06/apple-touch-icon-iphone-retina-display.png" +curl -o "dictionary.com.png" "https://web.archive.org/web/20200719135458if_/https://www.dictionary.com/hp-assets/dcom_favicon-1bff2f1b49c077ed504e55c3649f2a4b.png" +curl -o "google.com.jpg" "https://web.archive.org/web/20170621105937if_/https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no/photo.jpg" +curl -o "longfellowsgreenhouses.com.jpg" "https://web.archive.org/web/20200718173559im_/https://longfellowsgreenhouses.com/wp-content/uploads/2020/03/Longfellows-Logo-Light-Green.jpg" +curl -o "mainepublic.org.png" "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/e5/8e/30457/1/c300.png" +curl -o "news.google.com.png" "https://upload.wikimedia.org/wikipedia/commons/0/0b/Google_News_icon.png" +curl -o "newscentermaine.com.png" "https://web.archive.org/web/20200721190548if_/https://www.newscentermaine.com/assets/favicons/WCSH.png?ver=2.4.7.4" +curl -o "pressherald.com.png" "https://multifiles.pressherald.com/uploads/sites/4/2014/06/apple-touch-icon-iphone-retina-display.png" +curl -o "weather.com.png" "https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/The_Weather_Channel_logo_2005-present.svg/1200px-The_Weather_Channel_logo_2005-present.svg.png" From 4b6747671fa5f0b70958181e0e2a40346c1a29cc Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 7 Apr 2021 11:06:59 -0400 Subject: [PATCH 071/142] less --- dotfiles-old/.aliases | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 4e85692..e6807b6 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -1,3 +1,5 @@ +#!/bin/sh + # audio drive alias audio="sudo mount -L 'AUDIO' /mnt/audio" @@ -5,8 +7,6 @@ alias awk="nawk" alias cat="9 cat" alias cls="clear" alias cp="cp -iv" -alias emacs="vi" # that'll freak people out -alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/" alias ipconfig="ifconfig" alias ls="9 ls" @@ -19,20 +19,13 @@ mnt() { alias mv="mv -iv" alias p="ping 1.1.1.1" -# my media hard drive +# media hard drive alias partone="sudo mount -L 'PARTONE' /mnt/partone" -# copy web-browser path to file to clipboard -path() { - printf "file://%s" $(realpath $1) | xclip -} - pyenv() { - if [ $# -eq 0 ]; then - . ./bin/activate - else - . $1/bin/activate - fi + eq $# 0 \ + && . ./bin/activate \ + || . $1/bin/activate } alias sensors="watch sensors" @@ -42,14 +35,10 @@ alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1" alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" alias tracert="tracepath" - -# dirtbag aliases to get myself to use vim more -alias emacs="vim" -alias ne="vim" +alias units="units --history /dev/null" alias vi="vim" - alias weather="curl wttr.in/lewiston+maine?m" webm() { - ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis $(printf "$1" | asplit . 0).webm + ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis "$(printf "$1" | awk -F '.' '{print $1}')".webm } From e16ecf8ac74bb35e043d0416a08cad6b49fd8cba Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 11 Apr 2021 19:06:20 -0400 Subject: [PATCH 072/142] nmap 7.8.0 installer --- dotfiles-old/scripts/nmap.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 dotfiles-old/scripts/nmap.sh diff --git a/dotfiles-old/scripts/nmap.sh b/dotfiles-old/scripts/nmap.sh new file mode 100644 index 0000000..200006f --- /dev/null +++ b/dotfiles-old/scripts/nmap.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# builds and installs nmap 7.80 because the fucking pieces of shit that +# maintain nmap decided to make 7.90+ NONFREE. +# i do like nmap and i have nothing personal against the actual maintainers. +# but come ON. + +# anyway... + +set -e + +FILENAME="nmap-7.80.tar.bz2" +ORIGINAL_DIST_BZ2="https://nmap.org/dist/nmap-7.80.tar.bz2" +ARCHIVED_DIST_BZ2="http://web.archive.org/web/20200922062002/https://nmap.org/dist/nmap-7.80.tar.bz2" + +cd $HOME/src + +curl "$ORIGINAL_DIST_BZ2" >"$FILENAME" || curl "$ARCHIVED_DIST_BZ2" >"$FILENAME" + +bzip2 -cd <"$FILENAME" | tar -x + +# see, i could do complicated math to determine this based on the filename, or +# i could hard-code this and let it error if i've inexplicably grabbed +# nmap-7.8.1 + +cd "nmap-7.8.0" + +./configure +make +sudo make install From 65d47523e1a068e8209d272d57939f04e8ee04ad Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 13 Apr 2021 20:00:16 -0400 Subject: [PATCH 073/142] links cc to tcc --- dotfiles-old/scripts/cc.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dotfiles-old/scripts/cc.sh diff --git a/dotfiles-old/scripts/cc.sh b/dotfiles-old/scripts/cc.sh new file mode 100644 index 0000000..876d255 --- /dev/null +++ b/dotfiles-old/scripts/cc.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +CC="$(which cc)" + +which tcc >/dev/null + +if [ -h "$CC" ]; then + unlink "$CC" + ln -s "$(which tcc)" "$CC" +else + printf "$0: \$(which cc), $(which cc), is not a symbolic link\n" >/dev/stderr + exit 1 +fi From 0d261bd1bd2534d2d005cebeaed70238b981c040 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 10 May 2021 21:19:41 -0400 Subject: [PATCH 074/142] moving to bspwm, using ed, etc --- dotfiles-old/.Xresources | 41 +++++++++---------- dotfiles-old/.aliases | 6 ++- dotfiles-old/.config/bspwm/bspwmrc | 5 +++ .../.config/sxhkd/{sxhkdrc => sxhkdrc-base} | 35 +++------------- dotfiles-old/.config/sxhkd/sxhkdrc-bspwm | 22 ++++++++++ dotfiles-old/.config/sxhkd/sxhkdrc-i3wm | 27 ++++++++++++ dotfiles-old/.profile | 12 +++--- dotfiles-old/clone.sh | 13 ++++-- dotfiles-old/scripts/packages/all | 2 + dotfiles-old/scripts/packages/artix_pacman | 1 + .../packages/common-arch_pacman-artix_pacman | 1 + .../packages/common-arch_yay-artix_yay | 2 + .../common-arch_yay-artix_yay-debian_apt | 1 - 13 files changed, 105 insertions(+), 63 deletions(-) create mode 100755 dotfiles-old/.config/bspwm/bspwmrc rename dotfiles-old/.config/sxhkd/{sxhkdrc => sxhkdrc-base} (53%) create mode 100644 dotfiles-old/.config/sxhkd/sxhkdrc-bspwm create mode 100755 dotfiles-old/.config/sxhkd/sxhkdrc-i3wm diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources index 395b406..a393dc5 100644 --- a/dotfiles-old/.Xresources +++ b/dotfiles-old/.Xresources @@ -1,19 +1,27 @@ +#define AMBER #FFBD00 +#define BLACK #000000 +#define PINK #FFDBDB +#define WHITE #FFFFFF + +#define FOREGROUND BLACK +#define BACKGROUND WHITE + ! unscii font *faceName: unscii:antialias=false *faceSize: 12 -*Background: #000000 +*cursorColor: FOREGROUND +*Foreground: FOREGROUND +*Background: BACKGROUND -! amber -!*Foreground: #FFBF00 -!*cursorColor: #FFBF00 - -! pink -*Foreground: #FFDBDB -*cursorColor: #FFDBDB - -! black on white (first uncomment white's stuff) -!*reverseVideo: true +! xterm specific stuff +xterm*loginshell: true +xterm*locale: UTF-8 +xterm*titleModes: 16 +xterm*metaSendsEscape: true +xterm*utf8: 1 +xterm*utf8Fonts: 1 +xterm*utf8Title: true ! I used to use these but they make it really hard to see default Lynx. @@ -71,14 +79,3 @@ !*.color7: #808080 !*.color15: #C0C0C0 ! ===================================== - -! xterm specific stuff - -xterm*font: -*-*-*-*-*-*-*-*-*-*-*-*-*-* -xterm*loginshell: true -xterm*locale: UTF-8 -xterm*titleModes: 16 -xterm*metaSendsEscape: true -xterm*utf8: 1 -xterm*utf8Fonts: 1 -xterm*utf8Title: true diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index e6807b6..c4e41a5 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -4,11 +4,11 @@ alias audio="sudo mount -L 'AUDIO' /mnt/audio" alias awk="nawk" -alias cat="9 cat" alias cls="clear" alias cp="cp -iv" alias ipconfig="ifconfig" alias ls="9 ls" +alias man="/home/trinity/src/utilities/bin/man" # other volumes mnt() { @@ -21,6 +21,7 @@ alias p="ping 1.1.1.1" # media hard drive alias partone="sudo mount -L 'PARTONE' /mnt/partone" +alias prat="$HOME/src/packrat/prat" pyenv() { eq $# 0 \ @@ -36,9 +37,10 @@ alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" alias tracert="tracepath" alias units="units --history /dev/null" -alias vi="vim" alias weather="curl wttr.in/lewiston+maine?m" webm() { ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis "$(printf "$1" | awk -F '.' '{print $1}')".webm } + +alias yay="paru" diff --git a/dotfiles-old/.config/bspwm/bspwmrc b/dotfiles-old/.config/bspwm/bspwmrc new file mode 100755 index 0000000..66df720 --- /dev/null +++ b/dotfiles-old/.config/bspwm/bspwmrc @@ -0,0 +1,5 @@ +#!/bin/sh +bspc config window_gap 0 +bspc monitor -d 1 2 3 4 5 6 7 8 9 10 +pgrep -x sxhkd >/dev/null || sxhkd & +polybar bar & diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc b/dotfiles-old/.config/sxhkd/sxhkdrc-base similarity index 53% rename from dotfiles-old/.config/sxhkd/sxhkdrc rename to dotfiles-old/.config/sxhkd/sxhkdrc-base index 1dff564..0c4affb 100755 --- a/dotfiles-old/.config/sxhkd/sxhkdrc +++ b/dotfiles-old/.config/sxhkd/sxhkdrc-base @@ -1,7 +1,5 @@ -#!/bin/sh - control + shift + Escape - uxterm -e htop + $TERMINAL -e htop mod1 + d dmenu_run @@ -16,38 +14,15 @@ mod1 + minus mod1 + shift + minus light -U 1 -mod1 + F4 - i3-msg kill - -mod1 + {h,j,k,l} - i3-msg focus {left,down,up,right} - -mod1 + f - i3-msg fullscreen toggle -mod1 + F11 - i3-msg fullscreen toggle - -mod1 + {s,w} - i3-msg layout {stacking,tabbed} -mod1 + e - i3-msg layout toggle split - -mod1 + space - i3-msg focus mode_toggle - -mod1 + shift + space - i3-msg floating toggle - -mod1 + shift + {h,j,k,l} - i3-msg move {left,down,up,right} - -mod1 + shift + e - [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && i3-msg exit mod1 + m pactl -- set-sink-mute @DEFAULT_SINK@ toggle mod1 + shift + m pactl set-source-mute @DEFAULT_SOURCE@ toggle + +mod1 + v + $TERMINAL -e pulsemixer + mod1 + Return uxterm diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc-bspwm b/dotfiles-old/.config/sxhkd/sxhkdrc-bspwm new file mode 100644 index 0000000..237c6eb --- /dev/null +++ b/dotfiles-old/.config/sxhkd/sxhkdrc-bspwm @@ -0,0 +1,22 @@ +# thanks weedsmokingjew + +mod1 + {_,shift + }F4 + bspc node -{c,k} + +mod1 + {_,shift + }{1-9,0} + bspc {desktop -f,node -d} '^{1-9,10}' + +mod1 + shift + e + [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && bspc quit + +mod1 + f + bspc node -t '~fullscreen' + +mod1 + {h,j,k,l} + bspc node -f {west,south,north,east} + +mod1 + shift + {h,j,k,l} + bspc node -s {west,south,north,east} + +mod1 + shift + r + bspc wm -r && pkill -USR1 -x sxhkd diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc-i3wm b/dotfiles-old/.config/sxhkd/sxhkdrc-i3wm new file mode 100755 index 0000000..943fcaa --- /dev/null +++ b/dotfiles-old/.config/sxhkd/sxhkdrc-i3wm @@ -0,0 +1,27 @@ +mod1 + F4 + i3-msg kill + +mod1 + {h,j,k,l} + i3-msg focus {left,down,up,right} + +mod1 + f + i3-msg fullscreen toggle +mod1 + F11 + i3-msg fullscreen toggle + +mod1 + {s,w} + i3-msg layout {stacking,tabbed} +mod1 + e + i3-msg layout toggle split + +mod1 + space + i3-msg focus mode_toggle + +mod1 + shift + space + i3-msg floating toggle + +mod1 + shift + {h,j,k,l} + i3-msg move {left,down,up,right} + +mod1 + shift + e + [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && i3-msg exit diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index 44015bd..4a0c8dc 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -1,12 +1,14 @@ +BROWSER=firefox; export BROWSER DOOMWADDIR=/mnt/partone/misc/doomwads/; export DOOMWADDIR -EDITOR=vim; export EDITOR +EDITOR=ed; export EDITOR PAGER="less"; export PAGER - PLAN9=/usr/local/plan9; export PLAN9 - PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH":$PLAN9/bin"; export PATH - -if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi +TERMINAL="uxterm"; export TERMINAL +UNITS_SYSTEM="si"; export UNITS_SYSTEM ENV=$HOME/.env; export ENV . $ENV + +if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi + diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh index de052c6..7d89fd9 100755 --- a/dotfiles-old/clone.sh +++ b/dotfiles-old/clone.sh @@ -1,19 +1,26 @@ #!/bin/sh -[ "$(printf "Abort.\nContinue.\n" | dmenu -p "Current path is '$(pwd)'. Continue?")" = "Continue." ] || return || exit +[ "$(printf "Abort.\nContinue.\n" | dmenu -p "Current path is '$(pwd)'. Continue?")" = "Continue." ] || exit set -x cp $HOME/.Xresources ./ cp $HOME/.aliases ./ -#cp $HOME/.bashrc ./ cp $HOME/.env ./ cp $HOME/.profile ./ cp $HOME/.vimrc ./ + mkdir -p ./.config/ cp $HOME/.config/ytfeed-config.txt ./.config/ + +mkdir -p ./.config/bspwm +cp $HOME/.config/bspwm/bspwmrc ./.config/bspwm/bspwmrc + mkdir -p ./.config/i3 cp $HOME/.config/i3/config ./.config/i3/config mkdir -p ./.config/i3status cp $HOME/.config/i3status/config ./.config/i3status/config + mkdir -p ./.config/sxhkd -cp $HOME/.config/sxhkd/sxhkdrc ./.config/sxhkd/sxhkdrc +cp $HOME/.config/sxhkd/* ./.config/sxhkd/ +rm ./.config/sxhkd/sxhkdrc + mkdir -p ./src/dmenu cp $HOME/src/dmenu/config.h ./src/dmenu/config.h diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/scripts/packages/all index a192c18..2f49f91 100644 --- a/dotfiles-old/scripts/packages/all +++ b/dotfiles-old/scripts/packages/all @@ -1,4 +1,5 @@ adb +alsa-utils anki audacious blender @@ -58,6 +59,7 @@ vlc wget wireguard-tools xclip +xf86-input-wacom xscreensaver xterm zathura diff --git a/dotfiles-old/scripts/packages/artix_pacman b/dotfiles-old/scripts/packages/artix_pacman index 8c0b389..6e228df 100644 --- a/dotfiles-old/scripts/packages/artix_pacman +++ b/dotfiles-old/scripts/packages/artix_pacman @@ -1,5 +1,6 @@ acpid acpid-openrc +fuse-openrc iwd-openrc libvirt-openrc openresolv diff --git a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman index 5040b0f..28dc6f6 100644 --- a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman +++ b/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman @@ -23,6 +23,7 @@ pulseaudio-bluetooth python-pip qemu-arch-extra qt5-imageformats +stalonetray ttf-dejavu vi which diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay index 0990b3c..1e994b2 100644 --- a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay +++ b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay @@ -12,6 +12,8 @@ i3-gaps i3-swallow instagram-scraper iwgtk +lemonbar-git +makebootfat minecraft-launcher mullvad-vpn-beta multimc5 diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt index ea1c287..af6e452 100644 --- a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt +++ b/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt @@ -1,3 +1,2 @@ moon-buggy -ne syncterm From 35945122913a0ac1606b2d8ac1b452bf9956f13a Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 10 May 2021 21:35:55 -0400 Subject: [PATCH 075/142] better cloning --- dotfiles-old/clone.sh | 29 ++++++----------------------- dotfiles-old/manifest | 13 +++++++++++++ 2 files changed, 19 insertions(+), 23 deletions(-) create mode 100644 dotfiles-old/manifest diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh index 7d89fd9..1039bf5 100755 --- a/dotfiles-old/clone.sh +++ b/dotfiles-old/clone.sh @@ -1,26 +1,9 @@ #!/bin/sh -[ "$(printf "Abort.\nContinue.\n" | dmenu -p "Current path is '$(pwd)'. Continue?")" = "Continue." ] || exit +SRC="$HOME" +DEST="$(pwd)" +[ "$(printf "Abort.\nContinue.\n" | dmenu -p "Copying from '$SRC' to '$DEST'. Continue?")" = "Continue." ] || exit set -x -cp $HOME/.Xresources ./ -cp $HOME/.aliases ./ -cp $HOME/.env ./ -cp $HOME/.profile ./ -cp $HOME/.vimrc ./ -mkdir -p ./.config/ -cp $HOME/.config/ytfeed-config.txt ./.config/ - -mkdir -p ./.config/bspwm -cp $HOME/.config/bspwm/bspwmrc ./.config/bspwm/bspwmrc - -mkdir -p ./.config/i3 -cp $HOME/.config/i3/config ./.config/i3/config -mkdir -p ./.config/i3status -cp $HOME/.config/i3status/config ./.config/i3status/config - -mkdir -p ./.config/sxhkd -cp $HOME/.config/sxhkd/* ./.config/sxhkd/ -rm ./.config/sxhkd/sxhkdrc - -mkdir -p ./src/dmenu -cp $HOME/src/dmenu/config.h ./src/dmenu/config.h +for file in $(cat manifest); do + cp "$SRC/$file" "$DEST/$file" +done diff --git a/dotfiles-old/manifest b/dotfiles-old/manifest new file mode 100644 index 0000000..c42a082 --- /dev/null +++ b/dotfiles-old/manifest @@ -0,0 +1,13 @@ +.Xresources +.aliases +.env +.profile +.vimrc +.config/ytfeed-config.txt +.config/bspwm/bspwmrc +.config/i3/config +.config/i3status/config +.config/sxhkd/sxhkdrc-base +.config/sxhkd/sxhkdrc-bspwm +.config/sxhkd/sxhkdrc-i3wm +src/dmenu/config.h From 4ef0ca5e2d39461be958f67d023b98375e1bb4a0 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 10 May 2021 22:06:25 -0400 Subject: [PATCH 076/142] mkdir in cloning --- dotfiles-old/clone.sh | 20 +++++++++++++++++--- dotfiles-old/manifest_dir | 8 ++++++++ dotfiles-old/{manifest => manifest_file} | 0 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 dotfiles-old/manifest_dir rename dotfiles-old/{manifest => manifest_file} (100%) diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh index 1039bf5..0be3a4b 100755 --- a/dotfiles-old/clone.sh +++ b/dotfiles-old/clone.sh @@ -2,8 +2,22 @@ SRC="$HOME" DEST="$(pwd)" [ "$(printf "Abort.\nContinue.\n" | dmenu -p "Copying from '$SRC' to '$DEST'. Continue?")" = "Continue." ] || exit -set -x +set -ex -for file in $(cat manifest); do - cp "$SRC/$file" "$DEST/$file" +for dir in $(cat manifest_dir); do + if ! [ -d "$SRC/$dir" ]; then + printf "Directory missing from SRC: %b\n" "$dir" + false + else + mkdir -p "$DEST/$dir" + fi +done + +for file in $(cat manifest_file); do + if ! [ -e "$SRC/$file" ]; then + printf "File missing from SRC: %b\n" "$file" + false + else + cp "$SRC/$file" "$DEST/$file" + fi done diff --git a/dotfiles-old/manifest_dir b/dotfiles-old/manifest_dir new file mode 100644 index 0000000..5eb7e3b --- /dev/null +++ b/dotfiles-old/manifest_dir @@ -0,0 +1,8 @@ +.config/ +.config/bspwm/ +.config/i3/ +.config/i3status/ +.config/sxhkd/ +.config/sxhkd/ +.config/sxhkd/ +src/dmenu/ diff --git a/dotfiles-old/manifest b/dotfiles-old/manifest_file similarity index 100% rename from dotfiles-old/manifest rename to dotfiles-old/manifest_file From 6d349011caf44ae5a528a52dd0d92316e70c3234 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 14 May 2021 18:54:54 -0400 Subject: [PATCH 077/142] no more multilib --- dotfiles-old/scripts/README.txt | 4 ---- dotfiles-old/scripts/arch_enable-multilib.sh | 9 --------- 2 files changed, 13 deletions(-) delete mode 100755 dotfiles-old/scripts/arch_enable-multilib.sh diff --git a/dotfiles-old/scripts/README.txt b/dotfiles-old/scripts/README.txt index 10d3232..a05ba3e 100644 --- a/dotfiles-old/scripts/README.txt +++ b/dotfiles-old/scripts/README.txt @@ -14,8 +14,6 @@ mkdir -p $HOME/bin # executables mkdir -p $HOME/src # source code if [ $1 = "arch" ]; then - sudo bash arch_enable-multilib.sh - sudo pacman -S $(cat packages/all packages/*arch_pacman*) bash arch_yay.sh @@ -25,8 +23,6 @@ if [ $1 = "arch" ]; then # you can undo this with pacman -S sudo elif [ $1 = "artix" ]; then - sudo bash arch_enable-multilib.sh - sudo pacman -S $(cat packages/all packages/*artix_pacman*) bash arch_yay.sh diff --git a/dotfiles-old/scripts/arch_enable-multilib.sh b/dotfiles-old/scripts/arch_enable-multilib.sh deleted file mode 100755 index 4dcb70a..0000000 --- a/dotfiles-old/scripts/arch_enable-multilib.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# must be run as root - -if [ $1 = "artix" ]; then - printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist-arch\n' >>/etc/pacman.conf -else - printf '[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf -fi From cd4d4616dbf02c199b613fd8276cc16dda804c90 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 16 May 2021 20:27:54 -0400 Subject: [PATCH 078/142] basic system imaging --- dotfiles-old/scripts/grammy/image.sh | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 dotfiles-old/scripts/grammy/image.sh diff --git a/dotfiles-old/scripts/grammy/image.sh b/dotfiles-old/scripts/grammy/image.sh new file mode 100755 index 0000000..a0db885 --- /dev/null +++ b/dotfiles-old/scripts/grammy/image.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +argv0="$0" +argv1="$1" +argv2="$2" + +FILE_NAME="image.img.gz" +COMPACT="gzip -c" +EXTRACT="gzip -cd" + +usage() { + printf "Usage: $argv0 {save,deploy} [device] + +Examples: + $argv0 save /dev/sda1 # images installation at /dev/sda1 + $argv0 deploy /dev/sda # deploys saved image to /dev/sda + +In-program constants (edit this script to change them): + \$FILE_NAME - where to save/read the image + \$COMPACT - command to compact the image (such as \"gzip -c\" to + compress with gzip) + \$EXTRACT - command to extract the image (such as \"gzip -cd\" to + extract gzip)\n" + exit 1 +} + +[ -n "$argv2" ] || usage + +set -x + +case "$argv1" in +(save) $COMPACT <"$argv2" >"$FILE_NAME" ;; +(deploy) $EXTRACT <"$FILE_NAME" >"$argv2" ;; +esac + +exit 0 From 65b4f9b494aefb6c49949fcdb0e8068c23ad44a8 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 4 Jun 2021 17:54:58 -0400 Subject: [PATCH 079/142] bugfix --- dotfiles-old/knowledge/pacman | 32 +++++++++++++++++++ dotfiles-old/{scripts => }/packages/all | 0 .../{scripts => }/packages/arch_pacman | 0 .../{scripts => }/packages/artix_pacman | 0 dotfiles-old/{scripts => }/packages/bootstrap | 0 .../packages/common-arch_pacman-artix_pacman | 0 .../packages/common-arch_yay-artix_yay | 0 .../common-arch_yay-artix_yay-debian_apt | 0 .../{scripts => }/packages/debian_apt | 0 9 files changed, 32 insertions(+) create mode 100644 dotfiles-old/knowledge/pacman rename dotfiles-old/{scripts => }/packages/all (100%) rename dotfiles-old/{scripts => }/packages/arch_pacman (100%) rename dotfiles-old/{scripts => }/packages/artix_pacman (100%) rename dotfiles-old/{scripts => }/packages/bootstrap (100%) rename dotfiles-old/{scripts => }/packages/common-arch_pacman-artix_pacman (100%) rename dotfiles-old/{scripts => }/packages/common-arch_yay-artix_yay (100%) rename dotfiles-old/{scripts => }/packages/common-arch_yay-artix_yay-debian_apt (100%) rename dotfiles-old/{scripts => }/packages/debian_apt (100%) diff --git a/dotfiles-old/knowledge/pacman b/dotfiles-old/knowledge/pacman new file mode 100644 index 0000000..53ad9c0 --- /dev/null +++ b/dotfiles-old/knowledge/pacman @@ -0,0 +1,32 @@ +2021-06-04 +Had an issue with pacman missing some ubiquitous packages (esr's `ascii`, xorg-xev, etc). +This fixed it. I don't really know why - maybe some issues with my repos? +This was cleanly installed artix-openrc. + +[5:46 PM] Bassman Leyla: So what I did is I went into /etc/mirrorlist-arch and uncommented a local mirror +[5:46 PM] Bassman Leyla: Then I appended a config block a package maintainer gave me onto /etc/pacman.conf +[5:46 PM] Bassman Leyla: I'll paste it in +[5:47 PM] Bassman Leyla: +``` +# +# ARCHLINUX +# + +#[testing] +#Include = /etc/pacman.d/mirrorlist-arch + +[extra] +Include = /etc/pacman.d/mirrorlist-arch + +#[community-testing] +#Include = /etc/pacman.d/mirrorlist-arch + +[community] +Include = /etc/pacman.d/mirrorlist-arch + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist-arch + +#[multilib] +#Include = /etc/pacman.d/mirrorlist-arch +``` diff --git a/dotfiles-old/scripts/packages/all b/dotfiles-old/packages/all similarity index 100% rename from dotfiles-old/scripts/packages/all rename to dotfiles-old/packages/all diff --git a/dotfiles-old/scripts/packages/arch_pacman b/dotfiles-old/packages/arch_pacman similarity index 100% rename from dotfiles-old/scripts/packages/arch_pacman rename to dotfiles-old/packages/arch_pacman diff --git a/dotfiles-old/scripts/packages/artix_pacman b/dotfiles-old/packages/artix_pacman similarity index 100% rename from dotfiles-old/scripts/packages/artix_pacman rename to dotfiles-old/packages/artix_pacman diff --git a/dotfiles-old/scripts/packages/bootstrap b/dotfiles-old/packages/bootstrap similarity index 100% rename from dotfiles-old/scripts/packages/bootstrap rename to dotfiles-old/packages/bootstrap diff --git a/dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman b/dotfiles-old/packages/common-arch_pacman-artix_pacman similarity index 100% rename from dotfiles-old/scripts/packages/common-arch_pacman-artix_pacman rename to dotfiles-old/packages/common-arch_pacman-artix_pacman diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay b/dotfiles-old/packages/common-arch_yay-artix_yay similarity index 100% rename from dotfiles-old/scripts/packages/common-arch_yay-artix_yay rename to dotfiles-old/packages/common-arch_yay-artix_yay diff --git a/dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt b/dotfiles-old/packages/common-arch_yay-artix_yay-debian_apt similarity index 100% rename from dotfiles-old/scripts/packages/common-arch_yay-artix_yay-debian_apt rename to dotfiles-old/packages/common-arch_yay-artix_yay-debian_apt diff --git a/dotfiles-old/scripts/packages/debian_apt b/dotfiles-old/packages/debian_apt similarity index 100% rename from dotfiles-old/scripts/packages/debian_apt rename to dotfiles-old/packages/debian_apt From 412c6d06f5e16cdd187280de2b3235d8c3579f0b Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 4 Jun 2021 17:57:24 -0400 Subject: [PATCH 080/142] wrong path --- dotfiles-old/knowledge/pacman | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/knowledge/pacman b/dotfiles-old/knowledge/pacman index 53ad9c0..48b511b 100644 --- a/dotfiles-old/knowledge/pacman +++ b/dotfiles-old/knowledge/pacman @@ -3,7 +3,7 @@ Had an issue with pacman missing some ubiquitous packages (esr's `ascii`, xorg-x This fixed it. I don't really know why - maybe some issues with my repos? This was cleanly installed artix-openrc. -[5:46 PM] Bassman Leyla: So what I did is I went into /etc/mirrorlist-arch and uncommented a local mirror +[5:46 PM] Bassman Leyla: So what I did is I went into /etc/pacman.d/mirrorlist-arch and uncommented a local mirror [5:46 PM] Bassman Leyla: Then I appended a config block a package maintainer gave me onto /etc/pacman.conf [5:46 PM] Bassman Leyla: I'll paste it in [5:47 PM] Bassman Leyla: From b39e53ad25d7896a504d6b800b32da8cbadbd0ce Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 4 Jun 2021 19:49:51 -0400 Subject: [PATCH 081/142] audio stuff --- dotfiles-old/knowledge/audio | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 dotfiles-old/knowledge/audio diff --git a/dotfiles-old/knowledge/audio b/dotfiles-old/knowledge/audio new file mode 100644 index 0000000..fed9da0 --- /dev/null +++ b/dotfiles-old/knowledge/audio @@ -0,0 +1,42 @@ +On modern Linux systems most people use ALSA and PulseAudio for sound. +This tends to work fine. This isn't always how it's been done but it's +how it's done now. + +I'm not an expert on Linux audio and I'm not gonna explain how this all +works because I don't know myself. However I've noticed a lot of guides +just gloss over what seem to be important parts of setup, so here it is. + +This is also a living document and low quality. + +Alpine Wiki says as of 2021-05-19 you'll need: + +alsa-utils alsa-utils-doc alsa-lib alsaconf + +Alpine splits documentation into their own packages from programs. + +Alpine also says to add all system users including root to the audio group. + +On Busybox systems this is `addgroup $USER audio`. +On GNU this is `usermod -aG audio $USER`. + +Alpine Wiki tells you to use `alsamixer` to find the ID number of your card +in F6 menu and then change defaults.ctl.card and defaults.pcm.card in +/usr/share/alsa/alsa.conf but mine was already the default. + +You need to also add and start the alsa service: +rc-service alsa start +rc-update add alsa + +It looks like I installed gstreamer too. + +Now you need pulseaudio. Here's how to do that according to Alpine Wiki, add: + +pulseaudio pulseaudio-alsa alsa-plugins-pulse + +Make sure you set pulseaudio to start when you need audio. +It freaks out at you if you try to set it systemwide. + +I do this in my bspwmrc for bspwm (and .config/i3/config for i3wm) but +I've heard this is an awful idea so ask your local user-group. + +2021-06-04: This works on artix-openrc. From edd38f07c3869bae987c14e2cbe46d9a01cdebba Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 15 Jun 2021 09:49:27 -0400 Subject: [PATCH 082/142] env stuff --- dotfiles-old/.aliases | 15 ++++++++------- dotfiles-old/.profile | 3 ++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index c4e41a5..a03ca37 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -1,14 +1,15 @@ #!/bin/sh # audio drive -alias audio="sudo mount -L 'AUDIO' /mnt/audio" +#alias audio="sudo mount -L 'AUDIO' /mnt/audio" alias awk="nawk" alias cls="clear" alias cp="cp -iv" +alias e="$EDITOR" alias ipconfig="ifconfig" -alias ls="9 ls" -alias man="/home/trinity/src/utilities/bin/man" +#alias ls="9 ls" +alias ls="ls -1A" # other volumes mnt() { @@ -32,15 +33,15 @@ pyenv() { alias sensors="watch sensors" # Wacom Intuos 2 -alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1" -alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" +#alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1" +#alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" -alias tracert="tracepath" alias units="units --history /dev/null" +alias v="$VISUAL" alias weather="curl wttr.in/lewiston+maine?m" webm() { - ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis "$(printf "$1" | awk -F '.' '{print $1}')".webm + ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis "$(printf "%b" "$1" | awk -F '.' '{print $1}')".webm } alias yay="paru" diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index 4a0c8dc..83a666c 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -1,4 +1,4 @@ -BROWSER=firefox; export BROWSER +BROWSER=firefox-developer-edition; export BROWSER DOOMWADDIR=/mnt/partone/misc/doomwads/; export DOOMWADDIR EDITOR=ed; export EDITOR PAGER="less"; export PAGER @@ -6,6 +6,7 @@ PLAN9=/usr/local/plan9; export PLAN9 PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH":$PLAN9/bin"; export PATH TERMINAL="uxterm"; export TERMINAL UNITS_SYSTEM="si"; export UNITS_SYSTEM +VISUAL=vi; export VISUAL ENV=$HOME/.env; export ENV . $ENV From 2105c0aebf77e3da12d9119bee25912dc394b0dc Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 15 Jun 2021 10:05:54 -0400 Subject: [PATCH 083/142] improvements --- dotfiles-old/.config/sxhkd/sxhkdrc-base | 57 ++++++++----- dotfiles-old/.config/sxhkd/sxhkdrc-bspwm | 4 +- dotfiles-old/.profile | 3 - dotfiles-old/.vimrc | 3 + dotfiles-old/packages/all | 2 - dotfiles-old/packages/alpine_apk | 30 +++++++ dotfiles-old/packages/artix_pacman | 1 - .../packages/common-arch_pacman-artix_pacman | 2 +- dotfiles-old/scripts/oneliners.sh | 84 +++++++------------ 9 files changed, 100 insertions(+), 86 deletions(-) create mode 100644 dotfiles-old/packages/alpine_apk diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc-base b/dotfiles-old/.config/sxhkd/sxhkdrc-base index 0c4affb..c1c3bdd 100755 --- a/dotfiles-old/.config/sxhkd/sxhkdrc-base +++ b/dotfiles-old/.config/sxhkd/sxhkdrc-base @@ -1,8 +1,18 @@ +XF86AudioMicMute + pactl set-source-mute @DEFAULT_SOURCE@ toggle +XF86AudioMute + pactl -- set-sink-mute @DEFAULT_SINK@ toggle +XF86Audio{Lower,Raise}Volume + pactl set-sink-volume @DEFAULT_SINK@ {"-5%","+5%"} +XF86Audio{Play,Pause,Next,Prev} + playerctl {play,pause,next,previous} +XF86Launch1 + $TERMINAL + control + shift + Escape $TERMINAL -e htop - -mod1 + d - dmenu_run +Print + scrot # cred 4 https://github.com/patrickbolle/dotfiles/ mod1 + equal @@ -14,28 +24,29 @@ mod1 + minus mod1 + shift + minus light -U 1 +mod1 + shift + r + pkill -USR1 sxhkd + +mod1 + i + ps aux | grep dmenubar | grep -v grep && pkill dmenubar; \ + data | /home/trinity/src/dmenubar/dmenubar -b + +mod1 + shift + i + pkill dmenubar + +mod1 + d + dmenu_run + +mod1 + Return + $TERMINAL + +mod1 + v + $TERMINAL -e pulsemixer + +mod1 + b + $BROWSER mod1 + m pactl -- set-sink-mute @DEFAULT_SINK@ toggle mod1 + shift + m pactl set-source-mute @DEFAULT_SOURCE@ toggle - -mod1 + v - $TERMINAL -e pulsemixer - -mod1 + Return - uxterm - -Print - scrot - -XF86AudioMicMute - pactl set-source-mute @DEFAULT_SOURCE@ toggle -XF86AudioMute - pactl -- set-sink-mute @DEFAULT_SINK@ toggle -XF86Audio{Lower,Raise}Volume - pactl set-sink-volume @DEFAULT_SINK@ {"-5%","+5%"} -XF86Audio{Play,Pause,Next,Prev} - playerctl {play,pause,next,previous} -XF86Launch1 - uxterm diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc-bspwm b/dotfiles-old/.config/sxhkd/sxhkdrc-bspwm index 237c6eb..f279101 100644 --- a/dotfiles-old/.config/sxhkd/sxhkdrc-bspwm +++ b/dotfiles-old/.config/sxhkd/sxhkdrc-bspwm @@ -3,8 +3,8 @@ mod1 + {_,shift + }F4 bspc node -{c,k} -mod1 + {_,shift + }{1-9,0} - bspc {desktop -f,node -d} '^{1-9,10}' +mod1 + {_,shift + }{1-4,q,w,e,r,a,s} + bspc {desktop -f,node -d} '^{1-4,5,6,7,8,9,10}' mod1 + shift + e [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && bspc quit diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index 83a666c..c4a9fa4 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -10,6 +10,3 @@ VISUAL=vi; export VISUAL ENV=$HOME/.env; export ENV . $ENV - -if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi - diff --git a/dotfiles-old/.vimrc b/dotfiles-old/.vimrc index 1b2a329..a89146f 100644 --- a/dotfiles-old/.vimrc +++ b/dotfiles-old/.vimrc @@ -1,3 +1,6 @@ +set noexpandtab set nowrap set relativenumber +set tabstop=8 +set visualbell syntax on diff --git a/dotfiles-old/packages/all b/dotfiles-old/packages/all index 2f49f91..5c848b5 100644 --- a/dotfiles-old/packages/all +++ b/dotfiles-old/packages/all @@ -1,4 +1,3 @@ -adb alsa-utils anki audacious @@ -65,5 +64,4 @@ xterm zathura zathura-cb zathura-djvu -zathura-mupdf zathura-ps diff --git a/dotfiles-old/packages/alpine_apk b/dotfiles-old/packages/alpine_apk new file mode 100644 index 0000000..e5011ea --- /dev/null +++ b/dotfiles-old/packages/alpine_apk @@ -0,0 +1,30 @@ +xorg-xserver +xterm +udev +util-linux +vim +git +xf86-input-libinput +xf86-video-intel +lynx +firefox +ttf-liberation +make +tcc +gcc +scrot +neofetch +build-base +libx11-dev +libxft-dev +libxinerama-dev +gwenview +mpv +pulseaudio +pulsemixer +dbus +consolekit2 +pulseaudio-alsa +alsa-plugins-nice +dbus-x11 +pulseaudio-utils diff --git a/dotfiles-old/packages/artix_pacman b/dotfiles-old/packages/artix_pacman index 6e228df..68b946f 100644 --- a/dotfiles-old/packages/artix_pacman +++ b/dotfiles-old/packages/artix_pacman @@ -5,4 +5,3 @@ iwd-openrc libvirt-openrc openresolv wireguard-openrc -virtualbox-host-modules-artix diff --git a/dotfiles-old/packages/common-arch_pacman-artix_pacman b/dotfiles-old/packages/common-arch_pacman-artix_pacman index 28dc6f6..63b8020 100644 --- a/dotfiles-old/packages/common-arch_pacman-artix_pacman +++ b/dotfiles-old/packages/common-arch_pacman-artix_pacman @@ -13,7 +13,6 @@ iwd jre11-openjdk jre8-openjdk kimageformats -lastpass-cli libreoffice-fresh light ntfs-3g @@ -33,3 +32,4 @@ xorg-xauth xorg-xinit xorg-xrdb youtube-dl +zathura-pdf-mupdf diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/scripts/oneliners.sh index b73c222..6dc0787 100755 --- a/dotfiles-old/scripts/oneliners.sh +++ b/dotfiles-old/scripts/oneliners.sh @@ -1,75 +1,51 @@ #!/bin/sh -# a bunch of one-line programs i want in my dmenu (and sometimes elsewhere) -# these have use outside the terminal and thus are generated here -# - because why make fifty files when i can make one file that does that for me? - -cde() { - cd $1 - printf "Entered %s.\n" $(pwd) -} +# This is the place for the scripts that are a bit more involved than can be +# expressed in shell aliases or functions, or that I want to access from dmenu. +# These are pretty messy but most of them work. Pretty easy for bugs to hide in +# here so I go in with pesticide often. +set -x mkdir -p $HOME/bin/oneliners || exit -cde $HOME/bin/oneliners +cd $HOME/bin/oneliners -SHABANG="#!/bin/sh\n" -BASH_SHABANG="#!/bin/bash\n" +SUDO=doas +SHEBANG="#!/bin/sh\n" +BASH_SHEBANG="#!/bin/bash\n" DMENU_LINES="40" -TEXTS_LIBRARY="/mnt/partone/texts/" -MUSIC_LIBRARY="/mnt/audio/" - -# music stuff -printf $SHABANG"selection=\"\$(find $MUSIC_LIBRARY -type d -mindepth 2 2>/dev/null | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album -printf $SHABANG"selection=\"\$(find $MUSIC_LIBRARY -type f | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song - -# reading -printf $SHABANG"SELECTION=\"\$(find $TEXTS_LIBRARY -type f | sort | dmenu -l $DMENU_LINES)\" -EXTENSION=\"\$(echo \$SELECTION | asplit . 1)\" -case \$EXTENSION in - (djvu) zathura \"\$SELECTION\" ;; - (epub) zathura \"\$SELECTION\" ;; - (html) firefox \"\$SELECTION\" ;; - (pdf) zathura \"\$SELECTION\" ;; - (*) xterm -e \"cat \"\"\$SELECTION\"\" | nl | less\" ;; -esac -" >read_book # broken, xterm things flash and exit 0. - # private bookmarks -printf $SHABANG"firefox file://$HOME/bookmarks.html\n" >bmarks +printf $SHEBANG'$BROWSER file://$HOME/bookmarks.html\n' >bmarks # deemix -printf $SHABANG"python $HOME/src/deemix-pyweb/deemix-pyweb.py\n" >deemix - -# firefox (launches firefox-developer-edition) -printf $BASH_SHABANG"firefox-developer-edition \"\$@\"\n" >firefox +printf $SHEBANG'python $HOME/src/deemix-pyweb/deemix-pyweb.py\n' >deemix # settings for specific monitors -printf $SHABANG"xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702 -printf $SHABANG"xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720 +printf $SHEBANG'xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n' >1702 +printf $SHEBANG'xrandr --output VGA-1 --auto --right-of LVDS-1\n' >mv720 # more monitor settings -printf $SHABANG"xrandr --output HDMI-1 --off\n" >hdmioff -printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff +printf $SHEBANG"xrandr --output HDMI-1 --off\n" >hdmioff +printf $SHEBANG"xrandr --output VGA-1 --off\n" >vgaoff # wireguard vpn stuff -printf $BASH_SHABANG"sudo wg-quick up \"\$@\"\n" >vpn-connect -printf $BASH_SHABANG"sudo wg-quick down \"\$@\"\n" >vpn-disconnect -printf $SHABANG"sudo ls /etc/wireguard/ | grep \"conf$\" | asplit .conf 0\n" >vpn-list -printf $SHABANG"xterm -e \"vpn-connect \$(vpn-list | dmenu); read -s -n 1\"\n" >vpn-quick # not to be confused with wg-quick - -# i always forget to use multimc -printf $SHABANG"multimc\n" >minecraft - -# project i'm working on -printf $SHABANG"xterm -e \". $HOME/src/ytfeed.py/bin/activate && python $HOME/src/ytfeed.py/cli.py\"\n" >ytfeed -printf $BASH_SHABANG"cd $HOME/src/ytfeed.sh/\n./renew.sh \"\$@\"\n" >ytfeed-renew +printf $BASH_SHEBANG$SUDO' wg-quick up "$@"\n' >vpn-connect +printf $BASH_SHEBANG$SUDO' wg-quick down "$@"\n' >vpn-disconnect +printf $SHEBANG$SUDO' ls /etc/wireguard/ | grep "conf$" | awk -F ".conf" "{print $1}"\n' >vpn-list +printf $SHEBANG'xterm -e "vpn-connect $(vpn-list | dmenu); read -s -n 1"\n' >vpn-quick # not to be confused with wg-quick # youtube-dl stuff -printf $BASH_SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo -printf $BASH_SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp -printf $BASH_SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | awk '{ print \$1 }') \"\$@\"\n" >youtube-dl-interactive -printf $BASH_SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv +printf $BASH_SHEBANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo +printf $BASH_SHEBANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp +printf $BASH_SHEBANG"youtube-dlp -f \$(youtube-dl -F \$1 | tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | awk '{ print \$1 }') \"\$@\"\n" >youtube-dl-interactive +printf $BASH_SHEBANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv + +# sxhkd +printf $SHEBANG"cd '$HOME/.config/sxhkd/' +cat sxhkdrc-base sxhkdrc-bspwm >sxhkdrc +pkill sxhkd -USR1\n" >sxhkd-bspwm-reload + +set +x ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * From 980be4e945d19afb2d97382aa2648744cdfdfc26 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 16 Jun 2021 22:22:38 -0400 Subject: [PATCH 084/142] data display --- dotfiles-old/bin/data | 138 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100755 dotfiles-old/bin/data diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data new file mode 100755 index 0000000..7fcf850 --- /dev/null +++ b/dotfiles-old/bin/data @@ -0,0 +1,138 @@ +#!/bin/sh + +set -e + +# these files (separated by newlines) will have the current CPU temperature +# multiplied by $CPU_TEMP_SCALE. this script divides the file contents by scale +# and displays that temperature (assumed to be in Celsius units) +CPU_TEMP_FILES="/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp2_input +/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp3_input" +CPU_TEMP_SCALE=1000 + +# format for the date (by default in this script, ISO 8601) +alias date="date '+%Y-%m-%dT%T'" + +# how fast to refresh the display (in seconds, will be substituted with 1 if +# not an integer) +INTERVAL=1 + +# enable if you have issues with missing `stris` etc. enabled by default. +# will save negligible time with shells that don't spawn new processes for +# test(1) +POSIXLY_CORRECT=1 + +# this URL will have in plain text the public IP address from which it was +# accessed +PUBLIC_IP_FETCH_URL="http://ifconfig.io/" + +get_battery_status() { + # this is a dirty hack. + # acpi | awk '{print $4}' will print the battery percentage, + # and s/,$// strips the trailing comma. + # acpi -a will just print the power adapter status. + printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//') ($(acpi -a))" + return +} + +get_cpu_temp() { + RETVAL="" + # iterate over files, adjust, print out "%dC " + for file in $CPU_TEMP_FILES; + do RETVAL="$RETVAL$(fdivide $(cat $file) $CPU_TEMP_SCALE)C " + done + # in-line python (bet you've never seen that before) that + # strips off trailing whitespace. could be done with sed but + # this was more fun + printf "%b" "$RETVAL" \ + | python -c "from sys import stdin; print(stdin.read().rstrip() + '\n')" + return +} + +get_memory_usage() { + printf "%b" "$(free | head -n 2 | tail -n 1 | awk '{print $3 " used / " $2 " total"}')" + return +} + +get_public_ip() { + curl "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null || printf "[error fetching IP]\n" + return +} + +# slow, so fetch it in advance +PUBLIC_IP="$(get_public_ip)" + +printbar() { + printf "%b || %b || %b || %b || %b %b\n" \ + "$(date)" \ + "BAT: $(get_battery_status)" \ + "CPU: $(get_cpu_temp)" \ + "PuIP: $PUBLIC_IP" \ + "MEM: $(get_memory_usage)" \ + "" + return +} + +############################################################################### +# the following is for error prevention and doesn't need to be changed # +############################################################################### + +# POSIX shell version of fdivide +fdivide_posix() { + [ -n "$2" ] && [ -n "$1" ] && [ -z "$3" ] \ + || return 1 + printf "%b" "$(($2/$1))" + return +} + +# [ -gt ] with better syntax +gt_posix() { + while [ -n "$2" ]; do + [ "$1" -gt "$2" ] \ + || return 1 + shift 1 + done + return 0 +} + +# limited POSIX shell version of stris +stris_posix() { + [ -n "$2" ] || return 1 + case "$1" in + (int) + # https://stackoverflow.com/questions/2210349/test-whether-string-is-a-valid-integer + printf "$2" | grep '^-?[0-9]+$' >/dev/null \ + && return 0 \ + || return 1 + ;; + (uint) + printf "$2" | grep '^[0-9]+$' >/dev/null \ + && return 0 \ + || return 1 + ;; + (*) + return 1 + ;; + esac + return +} + +if [ -n "$POSIXLY_CORRECT" ]; then + alias fdivide="fdivide_posix" + alias gt="gt_posix" + alias stris="stris_posix" +fi + +[ -n "$INTERVAL" ] && stris int "$INTERVAL" \ + || INTERVAL=1 \ + && true +[ -n "$CPU_TEMP_SCALE" ] && stris int "$CPU_TEMP_SCALE" && gt "$CPU_TEMP_SCALE" 0 \ + || CPU_TEMP_SCALE=1 \ + && true +[ -n "$CPU_TEMP_FILES" ] \ + || alias get_cpu_temp="printf '[no temperature files specified]\n'" \ + && true + +while true; do + printbar + sleep "$INTERVAL" +done From 4496c28f6175b8e1e65ed03891a18fc6420ebb49 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 16 Jun 2021 22:28:41 -0400 Subject: [PATCH 085/142] disable POSIX by default --- dotfiles-old/bin/data | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data index 7fcf850..1e59282 100755 --- a/dotfiles-old/bin/data +++ b/dotfiles-old/bin/data @@ -2,6 +2,9 @@ set -e +# depends on https://git.sr.ht/~trinity/utilities (particularly fdivide(1), +# gt(1), and stris(1)) unless POSIXLY_CORRECT is set (not tested) + # these files (separated by newlines) will have the current CPU temperature # multiplied by $CPU_TEMP_SCALE. this script divides the file contents by scale # and displays that temperature (assumed to be in Celsius units) @@ -16,10 +19,10 @@ alias date="date '+%Y-%m-%dT%T'" # not an integer) INTERVAL=1 -# enable if you have issues with missing `stris` etc. enabled by default. -# will save negligible time with shells that don't spawn new processes for -# test(1) -POSIXLY_CORRECT=1 +# enable if you have issues with missing `stris` etc. will save negligible time +# with shells that don't spawn new processes for test(1) +# fdivide_posix() may not be fully working yet, so it's not enabled by default +#POSIXLY_CORRECT=1 # this URL will have in plain text the public IP address from which it was # accessed From 05a119ecf69b35e6896d24271f5a656fa4e48225 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 17 Jun 2021 08:25:53 -0400 Subject: [PATCH 086/142] 80col (mostly) --- dotfiles-old/bin/data | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data index 1e59282..ee37fe4 100755 --- a/dotfiles-old/bin/data +++ b/dotfiles-old/bin/data @@ -52,12 +52,15 @@ get_cpu_temp() { } get_memory_usage() { - printf "%b" "$(free | head -n 2 | tail -n 1 | awk '{print $3 " used / " $2 " total"}')" + printf "%b" \ + "$(free | head -n 2 | tail -n 1 \ + | awk '{print $3 " used / " $2 " total"}')" return } get_public_ip() { - curl "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null || printf "[error fetching IP]\n" + curl "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \ + || printf "[error fetching IP]\n" return } @@ -128,7 +131,8 @@ fi [ -n "$INTERVAL" ] && stris int "$INTERVAL" \ || INTERVAL=1 \ && true -[ -n "$CPU_TEMP_SCALE" ] && stris int "$CPU_TEMP_SCALE" && gt "$CPU_TEMP_SCALE" 0 \ +[ -n "$CPU_TEMP_SCALE" ] && stris int "$CPU_TEMP_SCALE" \ + && gt "$CPU_TEMP_SCALE" 0 \ || CPU_TEMP_SCALE=1 \ && true [ -n "$CPU_TEMP_FILES" ] \ From 716b4a0a6449c5646fce2fb65d3695cc829b779c Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 17 Jun 2021 08:27:00 -0400 Subject: [PATCH 087/142] flag stuff --- dotfiles-old/clone.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh index 0be3a4b..5b35b8e 100755 --- a/dotfiles-old/clone.sh +++ b/dotfiles-old/clone.sh @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/sh -e SRC="$HOME" DEST="$(pwd)" [ "$(printf "Abort.\nContinue.\n" | dmenu -p "Copying from '$SRC' to '$DEST'. Continue?")" = "Continue." ] || exit -set -ex +set -x for dir in $(cat manifest_dir); do if ! [ -d "$SRC/$dir" ]; then From 1ff40ef9b25feaa43d929423f5a45b3a62fc0f77 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 17 Jun 2021 08:27:20 -0400 Subject: [PATCH 088/142] browser --- dotfiles-old/.aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index a03ca37..f20362a 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -4,6 +4,7 @@ #alias audio="sudo mount -L 'AUDIO' /mnt/audio" alias awk="nawk" +alias b="$BROWSER" alias cls="clear" alias cp="cp -iv" alias e="$EDITOR" From ba49abdc5d48d59a6224a08b6be095031e97055c Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 17 Jun 2021 08:27:41 -0400 Subject: [PATCH 089/142] bin/data --- dotfiles-old/manifest_dir | 1 + dotfiles-old/manifest_file | 1 + 2 files changed, 2 insertions(+) diff --git a/dotfiles-old/manifest_dir b/dotfiles-old/manifest_dir index 5eb7e3b..c264baf 100644 --- a/dotfiles-old/manifest_dir +++ b/dotfiles-old/manifest_dir @@ -5,4 +5,5 @@ .config/sxhkd/ .config/sxhkd/ .config/sxhkd/ +bin/ src/dmenu/ diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file index c42a082..cdcefbe 100644 --- a/dotfiles-old/manifest_file +++ b/dotfiles-old/manifest_file @@ -10,4 +10,5 @@ .config/sxhkd/sxhkdrc-base .config/sxhkd/sxhkdrc-bspwm .config/sxhkd/sxhkdrc-i3wm +bin/data src/dmenu/config.h From 5ed6294f677575ada134a60adfef60bd9a3a453c Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 17 Jun 2021 08:35:47 -0400 Subject: [PATCH 090/142] link sh to dash --- dotfiles-old/scripts/dash_sh.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 dotfiles-old/scripts/dash_sh.sh diff --git a/dotfiles-old/scripts/dash_sh.sh b/dotfiles-old/scripts/dash_sh.sh new file mode 100644 index 0000000..00b9d32 --- /dev/null +++ b/dotfiles-old/scripts/dash_sh.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -ex + +which sh >/dev/null 2>&1 \ + || exit 1 + +SH_LOCATION="$(which sh)" + +[ -L "$SH_LOCATION" ] \ + || exit 1 + +which dash >/dev/null 2>&1 \ + || exit 1 + +unlink "$SH_LOCATION" + +ln -s "$(which dash)" "$SH_LOCATION" From bb9777ef27e4e4a68dd75796d02a908ad5c0aedc Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 17 Jun 2021 15:22:19 -0400 Subject: [PATCH 091/142] found bug with stris_posix regex, fixed fdivide_posix --- dotfiles-old/bin/data | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data index ee37fe4..e107f39 100755 --- a/dotfiles-old/bin/data +++ b/dotfiles-old/bin/data @@ -86,7 +86,7 @@ printbar() { fdivide_posix() { [ -n "$2" ] && [ -n "$1" ] && [ -z "$3" ] \ || return 1 - printf "%b" "$(($2/$1))" + printf "%b\n" "$(($1/$2))" return } @@ -101,6 +101,7 @@ gt_posix() { } # limited POSIX shell version of stris +# BROKEN REGEX. MUSTFIX. stris_posix() { [ -n "$2" ] || return 1 case "$1" in @@ -122,22 +123,33 @@ stris_posix() { return } -if [ -n "$POSIXLY_CORRECT" ]; then - alias fdivide="fdivide_posix" - alias gt="gt_posix" - alias stris="stris_posix" -fi +# check to make sure we have non-standard utilities + +[ -n "$POSIXLY_CORRECT" ] || ! which fdivide >/dev/null 2>&1 \ + && alias fdivide="fdivide_posix" \ + || true + +[ -n "$POSIXLY_CORRECT" ] || ! which gt >/dev/null 2>&1 \ + && alias gt="gt_posix" \ + || true + +[ -n "$POSIXLY_CORRECT" ] || ! which stris >/dev/null 2>&1 \ + && alias stris="stris_posix" \ + || true + +# check to make sure customizeable vars are in proper format [ -n "$INTERVAL" ] && stris int "$INTERVAL" \ - || INTERVAL=1 \ - && true + || INTERVAL=1 + [ -n "$CPU_TEMP_SCALE" ] && stris int "$CPU_TEMP_SCALE" \ && gt "$CPU_TEMP_SCALE" 0 \ - || CPU_TEMP_SCALE=1 \ - && true + || CPU_TEMP_SCALE=1 + [ -n "$CPU_TEMP_FILES" ] \ - || alias get_cpu_temp="printf '[no temperature files specified]\n'" \ - && true + || alias get_cpu_temp="printf '[no temperature files specified]\n'" + +# main loop while true; do printbar From e4d0be0ec2cb3501fa96a71eb730b9919443621e Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 18 Jun 2021 07:44:46 -0400 Subject: [PATCH 092/142] misc --- dotfiles-old/{scripts => misc}/PKGBUILD_doas-sudo | 0 dotfiles-old/{scripts => misc}/README.txt | 0 dotfiles-old/{scripts => misc}/arch_yay.sh | 0 dotfiles-old/{scripts => misc}/cc.sh | 0 dotfiles-old/{scripts => misc}/cdecho.sh | 0 dotfiles-old/{scripts => misc}/dash_sh.sh | 0 dotfiles-old/{scripts => misc}/doas-sudo.sh | 0 dotfiles-old/{scripts => misc}/dotfiles.sh | 0 dotfiles-old/{scripts => misc}/dsic.sh | 0 dotfiles-old/{scripts => misc}/grammy/icons.sh | 0 dotfiles-old/{scripts => misc}/grammy/image.sh | 0 dotfiles-old/misc/motd | 8 ++++++++ dotfiles-old/{scripts => misc}/nmap.sh | 0 dotfiles-old/{scripts => misc}/oneliners.sh | 0 dotfiles-old/{scripts => misc}/sic.sh | 0 dotfiles-old/{scripts => misc}/spacer.sh | 0 16 files changed, 8 insertions(+) rename dotfiles-old/{scripts => misc}/PKGBUILD_doas-sudo (100%) rename dotfiles-old/{scripts => misc}/README.txt (100%) rename dotfiles-old/{scripts => misc}/arch_yay.sh (100%) rename dotfiles-old/{scripts => misc}/cc.sh (100%) rename dotfiles-old/{scripts => misc}/cdecho.sh (100%) rename dotfiles-old/{scripts => misc}/dash_sh.sh (100%) rename dotfiles-old/{scripts => misc}/doas-sudo.sh (100%) rename dotfiles-old/{scripts => misc}/dotfiles.sh (100%) rename dotfiles-old/{scripts => misc}/dsic.sh (100%) rename dotfiles-old/{scripts => misc}/grammy/icons.sh (100%) rename dotfiles-old/{scripts => misc}/grammy/image.sh (100%) create mode 100644 dotfiles-old/misc/motd rename dotfiles-old/{scripts => misc}/nmap.sh (100%) rename dotfiles-old/{scripts => misc}/oneliners.sh (100%) rename dotfiles-old/{scripts => misc}/sic.sh (100%) rename dotfiles-old/{scripts => misc}/spacer.sh (100%) diff --git a/dotfiles-old/scripts/PKGBUILD_doas-sudo b/dotfiles-old/misc/PKGBUILD_doas-sudo similarity index 100% rename from dotfiles-old/scripts/PKGBUILD_doas-sudo rename to dotfiles-old/misc/PKGBUILD_doas-sudo diff --git a/dotfiles-old/scripts/README.txt b/dotfiles-old/misc/README.txt similarity index 100% rename from dotfiles-old/scripts/README.txt rename to dotfiles-old/misc/README.txt diff --git a/dotfiles-old/scripts/arch_yay.sh b/dotfiles-old/misc/arch_yay.sh similarity index 100% rename from dotfiles-old/scripts/arch_yay.sh rename to dotfiles-old/misc/arch_yay.sh diff --git a/dotfiles-old/scripts/cc.sh b/dotfiles-old/misc/cc.sh similarity index 100% rename from dotfiles-old/scripts/cc.sh rename to dotfiles-old/misc/cc.sh diff --git a/dotfiles-old/scripts/cdecho.sh b/dotfiles-old/misc/cdecho.sh similarity index 100% rename from dotfiles-old/scripts/cdecho.sh rename to dotfiles-old/misc/cdecho.sh diff --git a/dotfiles-old/scripts/dash_sh.sh b/dotfiles-old/misc/dash_sh.sh similarity index 100% rename from dotfiles-old/scripts/dash_sh.sh rename to dotfiles-old/misc/dash_sh.sh diff --git a/dotfiles-old/scripts/doas-sudo.sh b/dotfiles-old/misc/doas-sudo.sh similarity index 100% rename from dotfiles-old/scripts/doas-sudo.sh rename to dotfiles-old/misc/doas-sudo.sh diff --git a/dotfiles-old/scripts/dotfiles.sh b/dotfiles-old/misc/dotfiles.sh similarity index 100% rename from dotfiles-old/scripts/dotfiles.sh rename to dotfiles-old/misc/dotfiles.sh diff --git a/dotfiles-old/scripts/dsic.sh b/dotfiles-old/misc/dsic.sh similarity index 100% rename from dotfiles-old/scripts/dsic.sh rename to dotfiles-old/misc/dsic.sh diff --git a/dotfiles-old/scripts/grammy/icons.sh b/dotfiles-old/misc/grammy/icons.sh similarity index 100% rename from dotfiles-old/scripts/grammy/icons.sh rename to dotfiles-old/misc/grammy/icons.sh diff --git a/dotfiles-old/scripts/grammy/image.sh b/dotfiles-old/misc/grammy/image.sh similarity index 100% rename from dotfiles-old/scripts/grammy/image.sh rename to dotfiles-old/misc/grammy/image.sh diff --git a/dotfiles-old/misc/motd b/dotfiles-old/misc/motd new file mode 100644 index 0000000..588a337 --- /dev/null +++ b/dotfiles-old/misc/motd @@ -0,0 +1,8 @@ +Welcome to Trinity's Thinkpad X200T. + +Unauthorized access is a violation of +United States federal law according to +the Computer Fraud and Abuse Act, 18 +USC Section 1030. + +Mess with the best, die like the rest. diff --git a/dotfiles-old/scripts/nmap.sh b/dotfiles-old/misc/nmap.sh similarity index 100% rename from dotfiles-old/scripts/nmap.sh rename to dotfiles-old/misc/nmap.sh diff --git a/dotfiles-old/scripts/oneliners.sh b/dotfiles-old/misc/oneliners.sh similarity index 100% rename from dotfiles-old/scripts/oneliners.sh rename to dotfiles-old/misc/oneliners.sh diff --git a/dotfiles-old/scripts/sic.sh b/dotfiles-old/misc/sic.sh similarity index 100% rename from dotfiles-old/scripts/sic.sh rename to dotfiles-old/misc/sic.sh diff --git a/dotfiles-old/scripts/spacer.sh b/dotfiles-old/misc/spacer.sh similarity index 100% rename from dotfiles-old/scripts/spacer.sh rename to dotfiles-old/misc/spacer.sh From 59e7d3fc8571b0a3d4fd400c4a29563c6dd5e1e7 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 25 Jun 2021 09:39:41 -0400 Subject: [PATCH 093/142] displaym --- .../.config/{sxhkd/sxhkdrc-bspwm => displaym/bspwm/sxhkdrc} | 0 .../.config/{sxhkd/sxhkdrc-i3wm => displaym/i3wm/sxhkdrc} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename dotfiles-old/.config/{sxhkd/sxhkdrc-bspwm => displaym/bspwm/sxhkdrc} (100%) rename dotfiles-old/.config/{sxhkd/sxhkdrc-i3wm => displaym/i3wm/sxhkdrc} (100%) diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc-bspwm b/dotfiles-old/.config/displaym/bspwm/sxhkdrc similarity index 100% rename from dotfiles-old/.config/sxhkd/sxhkdrc-bspwm rename to dotfiles-old/.config/displaym/bspwm/sxhkdrc diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc-i3wm b/dotfiles-old/.config/displaym/i3wm/sxhkdrc similarity index 100% rename from dotfiles-old/.config/sxhkd/sxhkdrc-i3wm rename to dotfiles-old/.config/displaym/i3wm/sxhkdrc From 0f3352707f5af70e923011d97724765c33089529 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 25 Jun 2021 09:41:37 -0400 Subject: [PATCH 094/142] displaym files --- dotfiles-old/manifest_dir | 1 + dotfiles-old/manifest_file | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dotfiles-old/manifest_dir b/dotfiles-old/manifest_dir index c264baf..3a914d5 100644 --- a/dotfiles-old/manifest_dir +++ b/dotfiles-old/manifest_dir @@ -1,5 +1,6 @@ .config/ .config/bspwm/ +.config/displaym/ .config/i3/ .config/i3status/ .config/sxhkd/ diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file index cdcefbe..fcaef85 100644 --- a/dotfiles-old/manifest_file +++ b/dotfiles-old/manifest_file @@ -5,10 +5,13 @@ .vimrc .config/ytfeed-config.txt .config/bspwm/bspwmrc +.config/displaym/.xinitrc +.config/displaym/sxhkdrc +.config/displaym/bspwm/.xinitrc +.config/displaym/bspwm/sxhkdrc +.config/displaym/i3wm/.xinitrc +.config/displaym/i3wm/sxhkdrc .config/i3/config .config/i3status/config -.config/sxhkd/sxhkdrc-base -.config/sxhkd/sxhkdrc-bspwm -.config/sxhkd/sxhkdrc-i3wm bin/data src/dmenu/config.h From e47f66da7ab8054aad3739b5552e8fb94ae2b2a5 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 25 Jun 2021 09:42:03 -0400 Subject: [PATCH 095/142] displaym file --- dotfiles-old/manifest_file | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file index fcaef85..d797411 100644 --- a/dotfiles-old/manifest_file +++ b/dotfiles-old/manifest_file @@ -14,4 +14,5 @@ .config/i3/config .config/i3status/config bin/data +bin/displaym src/dmenu/config.h From fef21ea3988da7618d98e821104c044fa47583f3 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 26 Jun 2021 22:42:55 -0400 Subject: [PATCH 096/142] updated packages --- dotfiles-old/packages/all | 17 +++++++++++----- dotfiles-old/packages/alpine_apk | 34 ++++++++------------------------ dotfiles-old/packages/bootstrap | 2 +- 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/dotfiles-old/packages/all b/dotfiles-old/packages/all index 5c848b5..c41cd56 100644 --- a/dotfiles-old/packages/all +++ b/dotfiles-old/packages/all @@ -1,12 +1,14 @@ +alsa-plugins-nice alsa-utils anki audacious -blender curl dvdbackup +ed feh ffmpeg -gnome-disk-utility +gcc +git gparted gperf gwenview @@ -21,21 +23,21 @@ lame linux-headers lynx macchanger +make man-pages -mc mercurial moc moreutils mpv -neofetch net-tools -ninja nmap p7zip pkgfile powertop progress pulseaudio +pulseaudio-alsa +pulseaudio-utils pulsemixer python3 qbittorrent @@ -48,17 +50,22 @@ sed smartmontools thunar thunderbird +ttf-liberation tlp twin units unrar unzip +util-linux +vim virt-manager vlc wget wireguard-tools xclip +xf86-input-libinput xf86-input-wacom +xf86-video-intel xscreensaver xterm zathura diff --git a/dotfiles-old/packages/alpine_apk b/dotfiles-old/packages/alpine_apk index e5011ea..96126e3 100644 --- a/dotfiles-old/packages/alpine_apk +++ b/dotfiles-old/packages/alpine_apk @@ -1,30 +1,12 @@ -xorg-xserver -xterm -udev -util-linux -vim -git -xf86-input-libinput -xf86-video-intel -lynx -firefox -ttf-liberation -make -tcc -gcc -scrot -neofetch build-base +consolekit2 +dbus +dbus-x11 +firefox libx11-dev libxft-dev libxinerama-dev -gwenview -mpv -pulseaudio -pulsemixer -dbus -consolekit2 -pulseaudio-alsa -alsa-plugins-nice -dbus-x11 -pulseaudio-utils +neofetch +tcc +udev +xorg-xserver diff --git a/dotfiles-old/packages/bootstrap b/dotfiles-old/packages/bootstrap index 7cb3f21..f03db7d 100644 --- a/dotfiles-old/packages/bootstrap +++ b/dotfiles-old/packages/bootstrap @@ -1,8 +1,8 @@ bash coreutils +ed gcc git less linux make -nano From 2a35af964d27a67d08c233dc1f63a68347d208a4 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Mon, 28 Jun 2021 09:52:00 -0400 Subject: [PATCH 097/142] move mnt to oneliners --- dotfiles-old/.aliases | 7 ------- dotfiles-old/misc/oneliners.sh | 17 +++++++++++------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index f20362a..3d65bf2 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -11,13 +11,6 @@ alias e="$EDITOR" alias ipconfig="ifconfig" #alias ls="9 ls" alias ls="ls -1A" - -# other volumes -mnt() { - test -d /mnt/$1 || sudo mkdir /mnt/$1 - sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1 -} - alias mv="mv -iv" alias p="ping 1.1.1.1" diff --git a/dotfiles-old/misc/oneliners.sh b/dotfiles-old/misc/oneliners.sh index 6dc0787..e965b98 100755 --- a/dotfiles-old/misc/oneliners.sh +++ b/dotfiles-old/misc/oneliners.sh @@ -29,17 +29,22 @@ printf $SHEBANG'xrandr --output VGA-1 --auto --right-of LVDS-1\n printf $SHEBANG"xrandr --output HDMI-1 --off\n" >hdmioff printf $SHEBANG"xrandr --output VGA-1 --off\n" >vgaoff +# mounting volumes +printf $SHEBANG"[ -z \"\$1\" ] && printf 'Usage: %%b [device]\\\\n' \"\$0\" && exit 1 || true +[ -d \"/mnt/\$1\" ] || $SUDO mkdir \"/mnt/\$1\" +$SUDO mount \"/dev/\$1\" \"/mnt/\$1\" && cd \"/mnt/\$1\"\n" >mnt + # wireguard vpn stuff -printf $BASH_SHEBANG$SUDO' wg-quick up "$@"\n' >vpn-connect -printf $BASH_SHEBANG$SUDO' wg-quick down "$@"\n' >vpn-disconnect +printf $SHEBANG$SUDO' wg-quick up "$@"\n' >vpn-connect +printf $SHEBANG$SUDO' wg-quick down "$@"\n' >vpn-disconnect printf $SHEBANG$SUDO' ls /etc/wireguard/ | grep "conf$" | awk -F ".conf" "{print $1}"\n' >vpn-list printf $SHEBANG'xterm -e "vpn-connect $(vpn-list | dmenu); read -s -n 1"\n' >vpn-quick # not to be confused with wg-quick # youtube-dl stuff -printf $BASH_SHEBANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo -printf $BASH_SHEBANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp -printf $BASH_SHEBANG"youtube-dlp -f \$(youtube-dl -F \$1 | tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | awk '{ print \$1 }') \"\$@\"\n" >youtube-dl-interactive -printf $BASH_SHEBANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv +printf $SHEBANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo +printf $SHEBANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp +printf $SHEBANG"youtube-dlp -f \$(youtube-dl -F \$1 | tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | awk '{ print \$1 }') \"\$@\"\n" >youtube-dl-interactive +printf $SHEBANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv # sxhkd printf $SHEBANG"cd '$HOME/.config/sxhkd/' From 9c623a24bec879c0e8bbb96900d86f46cefa50ab Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 1 Jul 2021 14:41:16 -0400 Subject: [PATCH 098/142] more universal --- dotfiles-old/misc/spacer.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/misc/spacer.sh b/dotfiles-old/misc/spacer.sh index 07f31a0..f84b8f6 100755 --- a/dotfiles-old/misc/spacer.sh +++ b/dotfiles-old/misc/spacer.sh @@ -2,6 +2,7 @@ # creates an 8GB empty file in the root dir # that way when the alarm bells go off you can delete it to save a couple # minutes before the system really runs out of disk +BS=512; COUNT=16777216 # 512 * 16777216 = 8GB ! [ -e /spacer.img ] || return 1 || exit 1 -dd if=/dev/zero bs=1K count=8M >spacer.img -sudo mv ./spacer.img /spacer.img +dd bs=$BS count=$COUNT spacer.img +$SUDO mv ./spacer.img /spacer.img From 465c241cbb6fff4c12c35e02c6f32a9fd20b0921 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 10 Jul 2021 00:48:14 -0400 Subject: [PATCH 099/142] volume script --- dotfiles-old/bin/volume | 58 ++++++++++++++++++++++++++++++++++++++ dotfiles-old/manifest_file | 1 + 2 files changed, 59 insertions(+) create mode 100755 dotfiles-old/bin/volume diff --git a/dotfiles-old/bin/volume b/dotfiles-old/bin/volume new file mode 100755 index 0000000..df439a3 --- /dev/null +++ b/dotfiles-old/bin/volume @@ -0,0 +1,58 @@ +#!/bin/sh + +argv0="$0" + +usage() { + printf "\ +Usage: %b {absolute,help,relative,status} [ARGUMENT...]\n" "$argv0" + printf "\ +Examples: + %b absolute 0 # mute sound output + %b help # print this help text + %b relative 4 # increase the volume by 4 units + %b relative -4 # decrease the volume by 4 units + %b status # print current volume +" "$argv0" "$argv0" "$argv0" "$argv0" "$argv0" + printf "\ +The options are matched with [char]*. So \"%b help\" +works the same as \"%b h\". + +" "$argv0" "$argv0" + exit 1 +} + +[ -n "$1" ] || usage + +case "$1" in +(a*) + case "$(uname)" in + (NetBSD) + audioctl -w play.gain=$1 >/dev/null + ;; + (*) unknown_system + esac + ;; +(h*) usage ;; +(r*) + case "$(uname)" in + (NetBSD) + # works. 9.2 STABLE 2021-07 + audioctl -w play.gain=$(( \ + $( \ + audioctl -a \ + | grep "play\.gain" \ + | cut -d '=' -f 2 \ + ) + $2)) >/dev/null + ;; + (*) unknown_system + esac + ;; +(s*) + case "$(uname)" in + (NetBSD) + audioctl -a | grep "play\.gain" | cut -d '=' -f 2 + ;; + (*) unknown_system + esac + ;; +esac diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file index d797411..1c2d2b6 100644 --- a/dotfiles-old/manifest_file +++ b/dotfiles-old/manifest_file @@ -15,4 +15,5 @@ .config/i3status/config bin/data bin/displaym +bin/volume src/dmenu/config.h From 9757056ea7af822e0d4e4fa50ccaa07d5556bbab Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 11 Jul 2021 16:18:11 -0400 Subject: [PATCH 100/142] Mostly finished features --- dotfiles-old/bin/volume | 109 +++++++++++++++++++++++++++++----------- 1 file changed, 79 insertions(+), 30 deletions(-) diff --git a/dotfiles-old/bin/volume b/dotfiles-old/bin/volume index df439a3..c521349 100755 --- a/dotfiles-old/bin/volume +++ b/dotfiles-old/bin/volume @@ -1,18 +1,28 @@ #!/bin/sh +# Has some undocumented features but they're functional (as far as I know) +# and system-independent. just shortcuts for me really. + argv0="$0" +! which stris >/dev/null 2>/dev/null \ + && printf "%b: Missing stris.\n" \ + && exit 1 \ + || true + +VOLUME_TMP_FILE="$HOME/.volume-previous" + usage() { printf "\ -Usage: %b {absolute,help,relative,status} [ARGUMENT...]\n" "$argv0" +Usage: %b [function] (argument)\n" "$argv0" printf "\ -Examples: - %b absolute 0 # mute sound output - %b help # print this help text - %b relative 4 # increase the volume by 4 units - %b relative -4 # decrease the volume by 4 units - %b status # print current volume -" "$argv0" "$argv0" "$argv0" "$argv0" "$argv0" +Functions: + absolute - change sound output to absolute unit + help - print this help output + mute - toggle mute/unmute + relative - change sound output relative to current status + status - print current sound output in system unit +" printf "\ The options are matched with [char]*. So \"%b help\" works the same as \"%b h\". @@ -21,38 +31,77 @@ works the same as \"%b h\". exit 1 } -[ -n "$1" ] || usage +[ -n "$1" ] \ + && argv1="$1" \ + || argv1=s -case "$1" in +case "$argv1" in +(+) # shortcut + [ -n "$2" ] && [ -z "$3" ] && stris uint "$2" \ + && "$argv0" r "$2" \ + || usage + ;; +(-) # shortcut + [ -n "$2" ] && [ -z "$3" ] && stris uint "$2" \ + && "$argv0" r -"$2" \ + || usage + ;; (a*) + [ -n "$2" ] && [ -z "$3" ] && stris int "$2" || usage case "$(uname)" in (NetBSD) - audioctl -w play.gain=$1 >/dev/null + # 9.2 STABLE 2021-07 + audioctl -w play.gain=$2 >/dev/null ;; - (*) unknown_system + (*) unknown_system esac - ;; -(h*) usage ;; -(r*) - case "$(uname)" in - (NetBSD) - # works. 9.2 STABLE 2021-07 - audioctl -w play.gain=$(( \ - $( \ - audioctl -a \ - | grep "play\.gain" \ - | cut -d '=' -f 2 \ - ) + $2)) >/dev/null - ;; - (*) unknown_system - esac - ;; + exit 0 ;; +(h*) usage ;; +(m*) # system independent + [ -z "$2" ] || usage + # restore previous volume if there is one + if [ -e "$VOLUME_TMP_FILE" ]; then + "$argv0" a "$(cat "$VOLUME_TMP_FILE")" \ + && rm "$VOLUME_TMP_FILE" \ + && printf "Unmuted.\n" \ + && exit 0 \ + || printf "Error restoring previous volume.\n" \ + >/dev/stderr \ + && exit 1 + fi + + # otherwise, make new file with previous volume + + # dd used rather than shell redirect so it's easy to determine + # whether or not the file write worked + if ! printf "%b" "$("$argv0" s)" | dd of="$VOLUME_TMP_FILE" \ + 2>/dev/null + then + printf "Error writing to file.\n" >/dev/stderr + false + fi + + # and then of course mute + "$argv0" a 0 + printf "Muted.\n" + + exit 0 ;; +(r*) # system independent + [ -n "$2" ] && [ -z "$3" ] && stris int "$2" || usage + if ! newval=$(add $("$argv0" s) $2) || ! stris int "$newval"; then + printf "%b: Error finding new value for volume.\n" + exit 1 + fi + "$argv0" a $newval + exit $? ;; (s*) + [ -z "$2" ] || usage case "$(uname)" in (NetBSD) audioctl -a | grep "play\.gain" | cut -d '=' -f 2 ;; - (*) unknown_system + (*) unknown_system esac - ;; + exit 0 ;; +(*) usage esac From ac86eb614194044a89db5d23a95839c7e9e22a36 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 18 Jul 2021 01:24:43 -0400 Subject: [PATCH 101/142] new theme --- dotfiles-old/.Xresources | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources index a393dc5..7eab4dd 100644 --- a/dotfiles-old/.Xresources +++ b/dotfiles-old/.Xresources @@ -3,8 +3,8 @@ #define PINK #FFDBDB #define WHITE #FFFFFF -#define FOREGROUND BLACK -#define BACKGROUND WHITE +#define FOREGROUND PINK +#define BACKGROUND BLACK ! unscii font *faceName: unscii:antialias=false From ee6b46cff5ed07770c0f7597fb486fd3aba29674 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 18 Jul 2021 01:25:04 -0400 Subject: [PATCH 102/142] netbsd workaround (shouldfix) --- dotfiles-old/.aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 3d65bf2..98dd148 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -11,6 +11,7 @@ alias e="$EDITOR" alias ipconfig="ifconfig" #alias ls="9 ls" alias ls="ls -1A" +alias mpv="LIBGL_ALWAYS_SOFTWARE=1 mpv" alias mv="mv -iv" alias p="ping 1.1.1.1" From 13b3850735883d38292a6a6a62b58ad1659b0ae4 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 18 Jul 2021 01:25:23 -0400 Subject: [PATCH 103/142] more displaym stuff --- dotfiles-old/manifest_dir | 3 +++ dotfiles-old/manifest_file | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dotfiles-old/manifest_dir b/dotfiles-old/manifest_dir index 3a914d5..2b5188e 100644 --- a/dotfiles-old/manifest_dir +++ b/dotfiles-old/manifest_dir @@ -1,6 +1,9 @@ .config/ .config/bspwm/ .config/displaym/ +.config/displaym/bspwm +.config/displaym/ctwm +.config/displaym/i3wm .config/i3/ .config/i3status/ .config/sxhkd/ diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file index 1c2d2b6..4d31250 100644 --- a/dotfiles-old/manifest_file +++ b/dotfiles-old/manifest_file @@ -3,12 +3,14 @@ .env .profile .vimrc -.config/ytfeed-config.txt .config/bspwm/bspwmrc .config/displaym/.xinitrc .config/displaym/sxhkdrc .config/displaym/bspwm/.xinitrc +.config/displaym/bspwm/start.sh .config/displaym/bspwm/sxhkdrc +.config/displaym/ctwm/.xinitrc +.config/displaym/ctwm/start.sh .config/displaym/i3wm/.xinitrc .config/displaym/i3wm/sxhkdrc .config/i3/config From 1cc0c3418e4f4a9bb0ab45866ea799f9ce6cda2d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 18 Jul 2021 01:25:52 -0400 Subject: [PATCH 104/142] display manager updates --- dotfiles-old/.config/displaym/bspwm/.xinitrc | 1 + dotfiles-old/.config/displaym/bspwm/start.sh | 2 + dotfiles-old/.config/displaym/ctwm/.xinitrc | 1 + dotfiles-old/.config/displaym/ctwm/start.sh | 2 + dotfiles-old/.config/displaym/i3wm/.xinitrc | 1 + dotfiles-old/.config/displaym/sxhkdrc | 52 ++++++++++++++++++++ dotfiles-old/bin/displaym | 30 +++++++++++ 7 files changed, 89 insertions(+) create mode 100644 dotfiles-old/.config/displaym/bspwm/.xinitrc create mode 100644 dotfiles-old/.config/displaym/bspwm/start.sh create mode 100644 dotfiles-old/.config/displaym/ctwm/.xinitrc create mode 100755 dotfiles-old/.config/displaym/ctwm/start.sh create mode 100644 dotfiles-old/.config/displaym/i3wm/.xinitrc create mode 100755 dotfiles-old/.config/displaym/sxhkdrc create mode 100755 dotfiles-old/bin/displaym diff --git a/dotfiles-old/.config/displaym/bspwm/.xinitrc b/dotfiles-old/.config/displaym/bspwm/.xinitrc new file mode 100644 index 0000000..ac7f120 --- /dev/null +++ b/dotfiles-old/.config/displaym/bspwm/.xinitrc @@ -0,0 +1 @@ +exec bspwm diff --git a/dotfiles-old/.config/displaym/bspwm/start.sh b/dotfiles-old/.config/displaym/bspwm/start.sh new file mode 100644 index 0000000..446564c --- /dev/null +++ b/dotfiles-old/.config/displaym/bspwm/start.sh @@ -0,0 +1,2 @@ +cat "$DISPLAYM_CONFIG/sxhkdrc" "$DISPLAYM_CONFIG/bspwm/sxhkdrc" >"$HOME/.config/sxhkd/sxhkdrc" +startx diff --git a/dotfiles-old/.config/displaym/ctwm/.xinitrc b/dotfiles-old/.config/displaym/ctwm/.xinitrc new file mode 100644 index 0000000..bd7108c --- /dev/null +++ b/dotfiles-old/.config/displaym/ctwm/.xinitrc @@ -0,0 +1 @@ +exec ctwm diff --git a/dotfiles-old/.config/displaym/ctwm/start.sh b/dotfiles-old/.config/displaym/ctwm/start.sh new file mode 100755 index 0000000..5c0fbf4 --- /dev/null +++ b/dotfiles-old/.config/displaym/ctwm/start.sh @@ -0,0 +1,2 @@ +cat "$DISPLAYM_CONFIG/sxhkdrc" >"$HOME/.config/sxhkd/sxhkdrc" +startx diff --git a/dotfiles-old/.config/displaym/i3wm/.xinitrc b/dotfiles-old/.config/displaym/i3wm/.xinitrc new file mode 100644 index 0000000..ba0c6ef --- /dev/null +++ b/dotfiles-old/.config/displaym/i3wm/.xinitrc @@ -0,0 +1 @@ +exec i3 diff --git a/dotfiles-old/.config/displaym/sxhkdrc b/dotfiles-old/.config/displaym/sxhkdrc new file mode 100755 index 0000000..c1c3bdd --- /dev/null +++ b/dotfiles-old/.config/displaym/sxhkdrc @@ -0,0 +1,52 @@ +XF86AudioMicMute + pactl set-source-mute @DEFAULT_SOURCE@ toggle +XF86AudioMute + pactl -- set-sink-mute @DEFAULT_SINK@ toggle +XF86Audio{Lower,Raise}Volume + pactl set-sink-volume @DEFAULT_SINK@ {"-5%","+5%"} +XF86Audio{Play,Pause,Next,Prev} + playerctl {play,pause,next,previous} +XF86Launch1 + $TERMINAL + +control + shift + Escape + $TERMINAL -e htop +Print + scrot + +# cred 4 https://github.com/patrickbolle/dotfiles/ +mod1 + equal + light -A 5 +mod1 + shift + equal + light -A 1 +mod1 + minus + light -U 5 +mod1 + shift + minus + light -U 1 + +mod1 + shift + r + pkill -USR1 sxhkd + +mod1 + i + ps aux | grep dmenubar | grep -v grep && pkill dmenubar; \ + data | /home/trinity/src/dmenubar/dmenubar -b + +mod1 + shift + i + pkill dmenubar + +mod1 + d + dmenu_run + +mod1 + Return + $TERMINAL + +mod1 + v + $TERMINAL -e pulsemixer + +mod1 + b + $BROWSER + +mod1 + m + pactl -- set-sink-mute @DEFAULT_SINK@ toggle +mod1 + shift + m + pactl set-source-mute @DEFAULT_SOURCE@ toggle diff --git a/dotfiles-old/bin/displaym b/dotfiles-old/bin/displaym new file mode 100755 index 0000000..156daa1 --- /dev/null +++ b/dotfiles-old/bin/displaym @@ -0,0 +1,30 @@ +#!/bin/sh + +set -ex + +usage() { + printf "\ +Usage: + %s start [window manager] +" >>/dev/stderr + exit 1 +} + +[ -n "$1" ] || usage +[ -z "$HOME" ] \ + && printf "No \$HOME environment variable found. This is very bad and an issue that is not caused by this script.\n" 1>&2 \ + && exit 1 \ + || true + +DISPLAYM_CONFIG="$HOME/.config/displaym"; export DISPLAYM_CONFIG +[ -d "$DISPLAYM_CONFIG" ] || mkdir -p "$DISPLAYM_CONFIG" + +case "$1" in + (start) + WM="$2"; export WM + cat "$DISPLAYM_CONFIG/.xinitrc" "$DISPLAYM_CONFIG/$WM/.xinitrc" >"$HOME/.xinitrc" + . "$HOME/.config/displaym/$WM/start.sh" + ;; + (*) usage ;; +esac + From 5abeb6809753cb0d1829d17f626746558466e865 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 18 Jul 2021 01:28:48 -0400 Subject: [PATCH 105/142] NetBSD support and stuff --- dotfiles-old/bin/data | 80 ++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 28 deletions(-) diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data index e107f39..54c1e4d 100755 --- a/dotfiles-old/bin/data +++ b/dotfiles-old/bin/data @@ -15,6 +15,8 @@ CPU_TEMP_SCALE=1000 # format for the date (by default in this script, ISO 8601) alias date="date '+%Y-%m-%dT%T'" +DELIMITER=" || " + # how fast to refresh the display (in seconds, will be substituted with 1 if # not an integer) INTERVAL=1 @@ -29,33 +31,51 @@ INTERVAL=1 PUBLIC_IP_FETCH_URL="http://ifconfig.io/" get_battery_status() { - # this is a dirty hack. - # acpi | awk '{print $4}' will print the battery percentage, - # and s/,$// strips the trailing comma. - # acpi -a will just print the power adapter status. - printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//') ($(acpi -a))" - return + if [ "$(uname)" = "Linux" ]; then + # this is a dirty hack. + # acpi | awk '{print $4}' will print the battery percentage, + # and s/,$// strips the trailing comma. + # acpi -a will just print the power adapter status. + printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//') ($(acpi -a))" + return + fi } get_cpu_temp() { - RETVAL="" - # iterate over files, adjust, print out "%dC " - for file in $CPU_TEMP_FILES; - do RETVAL="$RETVAL$(fdivide $(cat $file) $CPU_TEMP_SCALE)C " - done - # in-line python (bet you've never seen that before) that - # strips off trailing whitespace. could be done with sed but - # this was more fun - printf "%b" "$RETVAL" \ - | python -c "from sys import stdin; print(stdin.read().rstrip() + '\n')" - return + if [ "$(uname)" = "Linux" ]; then + RETVAL="" + # iterate over files, adjust, print out "%dC " + for file in $CPU_TEMP_FILES; + do RETVAL="$RETVAL$(fdivide $(cat $file) $CPU_TEMP_SCALE)C " + done + # in-line python (bet you've never seen that before) that + # strips off trailing whitespace. could be done with sed but + # this was more fun + printf "%b" "$RETVAL" \ + | python -c "from sys import stdin; print(stdin.read().rstrip() + '\n')" + return + elif [ "$(uname)" = "NetBSD" ]; then + printf "%bC" "$(envstat -s coretemp0:'cpu0 temperature' \ + | sed 1,2d \ + | cut -d ':' -f 2 \ + | awk '{print $1}' \ + | cut -d '.' -f 1)" + fi +} + +get_current_desktop() { + case "$WM" in + (bspwm) bspc query -D -d focused --names ;; + esac } get_memory_usage() { - printf "%b" \ - "$(free | head -n 2 | tail -n 1 \ - | awk '{print $3 " used / " $2 " total"}')" - return + if [ "$(uname)" = "Linux" ]; then + printf "%b" \ + "$(free | head -n 2 | tail -n 1 \ + | awk '{print $3 " used / " $2 " total"}')" + return + fi } get_public_ip() { @@ -68,13 +88,17 @@ get_public_ip() { PUBLIC_IP="$(get_public_ip)" printbar() { - printf "%b || %b || %b || %b || %b %b\n" \ - "$(date)" \ - "BAT: $(get_battery_status)" \ - "CPU: $(get_cpu_temp)" \ - "PuIP: $PUBLIC_IP" \ - "MEM: $(get_memory_usage)" \ - "" + printf "[%b] " "$(get_current_desktop)" + printf "%b" "$(date)" + #printf "%b" "$DELIMITER" + #printf "%b" "BAT: $(get_battery_status)" + printf "%b" "$DELIMITER" + printf "%b" "CPU: $(get_cpu_temp)" + printf "%b" "$DELIMITER" + printf "%b" "PuIP: $PUBLIC_IP" + #printf "%b" "$DELIMITER" + #printf "%b" "MEM: $(get_memory_usage)" + printf "\n" return } From c1b45e7aa5b8a5ff67770f85c40314b1ed6d6f23 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 18 Jul 2021 21:52:02 -0400 Subject: [PATCH 106/142] update sourcehut link --- dotfiles-old/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index 83df5c0..fce237e 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -2,7 +2,7 @@ Pretty config stuff. ![This is a screenshot of my desktop.](https://web.archive.org/web/20200926155417if_/https://i.redd.it/jwhsmokcfcp51.png) -For this configuration, [posted on r/unixporn on 2020-09-25](https://www.reddit.com/r/unixporn/comments/izpvwp/i3gaps_basic_but_it_works/), refer to the [state of the repository around 2020-09-26](https://github.com/devenblake/dotfiles/tree/7d0a35b6d06c2bb46990087c6a6c4b2a2685d49c) or so. +For this configuration, [posted on r/unixporn on 2020-09-25](https://www.reddit.com/r/unixporn/comments/izpvwp/i3gaps_basic_but_it_works/), refer to the [state of the repository around 2020-09-26](https://git.sr.ht/~trinity/dotfiles/tree/7d0a35b6d06c2bb46990087c6a6c4b2a2685d49c) or so. My setup has changed drastically since then. From 601b92aca6e816369dea1ef05c653cbbe0855283 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 18 Jul 2021 21:53:02 -0400 Subject: [PATCH 107/142] add CTWM rc --- dotfiles-old/.ctwmrc | 110 +++++++++++++++++++++++++++++++++++++ dotfiles-old/manifest_file | 1 + 2 files changed, 111 insertions(+) create mode 100644 dotfiles-old/.ctwmrc diff --git a/dotfiles-old/.ctwmrc b/dotfiles-old/.ctwmrc new file mode 100644 index 0000000..27f4176 --- /dev/null +++ b/dotfiles-old/.ctwmrc @@ -0,0 +1,110 @@ +# BEGIN ctwmrc +# thanks to https://datagubbe.se/twm/ +NoDefaults +DontShowWelcomeWindow + +# fonts +TitleFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" +ResizeFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" +MenuFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" +IconFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" +IconManagerFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" + +Color { + TitleBackground "#FFDBDB" + TitleForeground "#000000" + BorderColor "#FFDBDB" + BorderTileBackground "#206090" + BorderTileForeground "#206090" + + MenuBackground "Gray" + MenuForeground "Black" + MenuShadowColor "#004070" + MenuTitleBackground "#C06077" + MenuTitleForeground "White" +} + +WindowRing +WindowRingExclude { + "xload" + "xclock" +} + +Cursors { + Frame "left_ptr" + Title "left_ptr" + Icon "left_ptr" + IconMgr "hand2" + Move "fleur" + Resize "fleur" + Menu "sb_left_arrow" + Button "hand2" + Wait "watch" + Select "dot" + Destroy "pirate" +} + +NoBorder { + "xclock" + "xload" +} + +NoTitle { + "TWM Icon Manager" + "xload" + "xclock" + "feh" + "xeyes" +} + +Function "move-and-raise" { + f.move + f.deltastop + f.raise +} + +Function "deiconify-and-raise" { + f.deiconify + f.raise +} +Function "next-and-raise" { + f.downiconmgr + f.raise +} + +Button3 = : root : f.menu "apps" + +Button1 = : title : f.function "move-and-raise" +Button2 = : title : f.delete +Button3 = : title : f.menu "winops" +Button1 = : frame : f.function "move-and-raise" +Button2 = : frame : f.nop +Button3 = : frame : f.resize + +Button1 = : iconmgr : f.function "deiconify-and-raise" +Button2 = : iconmgr : f.lower +Button3 = : iconmgr : f.iconify + +# on NetBSD with non-modular Xorg, bitmaps are stored in +# /usr/X11R7/include/X11/bitmaps +LeftTitleButton ":xlogo" = f.menu "winops" +RightTitleButton "vertmax.xbm" = f.zoom +RightTitleButton "close.xbm" = f.delete + +menu "winops" { + "Delete" f.delete + "Destroy" f.destroy + "Fullscreen Zoom" f.fullscreenzoom + "Full Zoom" f.fullzoom + "Identify" f.identify + "Initial size" f.initsize +} + +# Workspace Menu +menu "apps" { + "Workspace" f.title + "Restart" f.restart + "Exit" f.quit +} + +# END twmrc diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file index 4d31250..9415670 100644 --- a/dotfiles-old/manifest_file +++ b/dotfiles-old/manifest_file @@ -1,5 +1,6 @@ .Xresources .aliases +.ctwmrc .env .profile .vimrc From feeef87e1c94854f8c2cdac65ec417db58434dbb Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sun, 18 Jul 2021 21:57:23 -0400 Subject: [PATCH 108/142] weird that these weren't already updated --- dotfiles-old/.config/displaym/.xinitrc | 8 ++++++++ dotfiles-old/.config/displaym/sxhkdrc | 16 ++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 dotfiles-old/.config/displaym/.xinitrc diff --git a/dotfiles-old/.config/displaym/.xinitrc b/dotfiles-old/.config/displaym/.xinitrc new file mode 100644 index 0000000..ff5a473 --- /dev/null +++ b/dotfiles-old/.config/displaym/.xinitrc @@ -0,0 +1,8 @@ +# load X default stuff +xrdb -load .Xresources +# xclock +xclock -geometry 180x180-10+10 -update 1 & +# xload +xload -geometry 180x180-10+200 -update 1 & +# keybind manager +exec sxhkd & diff --git a/dotfiles-old/.config/displaym/sxhkdrc b/dotfiles-old/.config/displaym/sxhkdrc index c1c3bdd..6262308 100755 --- a/dotfiles-old/.config/displaym/sxhkdrc +++ b/dotfiles-old/.config/displaym/sxhkdrc @@ -1,11 +1,7 @@ -XF86AudioMicMute - pactl set-source-mute @DEFAULT_SOURCE@ toggle XF86AudioMute - pactl -- set-sink-mute @DEFAULT_SINK@ toggle + volume m XF86Audio{Lower,Raise}Volume - pactl set-sink-volume @DEFAULT_SINK@ {"-5%","+5%"} -XF86Audio{Play,Pause,Next,Prev} - playerctl {play,pause,next,previous} + volume r {-5,5} XF86Launch1 $TERMINAL @@ -14,6 +10,8 @@ control + shift + Escape Print scrot +mod1 + {9,0} + volume r {-5,5} # cred 4 https://github.com/patrickbolle/dotfiles/ mod1 + equal light -A 5 @@ -41,12 +39,10 @@ mod1 + Return $TERMINAL mod1 + v - $TERMINAL -e pulsemixer + $TERMINAL -e aiomixer mod1 + b $BROWSER mod1 + m - pactl -- set-sink-mute @DEFAULT_SINK@ toggle -mod1 + shift + m - pactl set-source-mute @DEFAULT_SOURCE@ toggle + volume m From 689a6fb7913e6bf87f5b349a8ab03537e882fe3f Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 24 Jul 2021 09:31:44 -0400 Subject: [PATCH 109/142] mounting script --- dotfiles-old/bin/mnt | 34 ++++++++++++++++++++++++++++++++++ dotfiles-old/manifest_file | 1 + 2 files changed, 35 insertions(+) create mode 100755 dotfiles-old/bin/mnt diff --git a/dotfiles-old/bin/mnt b/dotfiles-old/bin/mnt new file mode 100755 index 0000000..45152da --- /dev/null +++ b/dotfiles-old/bin/mnt @@ -0,0 +1,34 @@ +#!/bin/sh +set -e + +DEV="/dev" +MNT="/mnt" + +# preliminary checks +[ -n "$2" ] || [ -z "$1" ] \ + && printf "Usage: %b [device in %b/]" "$0" "$DEV" >>/dev/stderr \ + && exit 1 \ + || true +! [ "$(id -u)" = 0 ] \ + && printf "%b: This script must be run as root.\n" "$0" >>/dev/stderr \ + && exit 1 \ + || true + +# exhaustive checks to ensure $DEV/$1 exists and that $MNT/$1 can be safely used as a mountpoint +! [ -d "$MNT/$1" ] && [ -a "$MNT/$1" ] \ + && printf "%b: '%b/%b' already exists, but isn't a directory.\n" "$0" "$MNT" "$1" >>/dev/stderr \ + && exit 1 \ + || true +[ -d "$MNT/$1" ] \ + || mkdir "$MNT/$1" +! [ "$(ls -A "$MNT/$1" | wc -c)" = 0 ] \ + && printf "%b: '%b/%b' is a directory, but isn't empty.\n" "$0" "$MNT" "$1" >>/dev/stderr \ + && exit 1 \ + || true +! [ -e "/dev/$1" ] \ + && printf "%b: '%b/%b' doesn't exist.\n" "$0" "$DEV" "$1" >>/dev/stderr \ + && exit 1 \ + || true + +# ok, we're safe +mount "$DEV/$1" "$MNT/$1" diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file index 9415670..a421643 100644 --- a/dotfiles-old/manifest_file +++ b/dotfiles-old/manifest_file @@ -18,5 +18,6 @@ .config/i3status/config bin/data bin/displaym +bin/mnt bin/volume src/dmenu/config.h From d60686ae1d0ebb35bdf5f3e3c10879da906903ff Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 24 Jul 2021 22:22:55 -0400 Subject: [PATCH 110/142] remove mnt from oneliners --- dotfiles-old/misc/oneliners.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dotfiles-old/misc/oneliners.sh b/dotfiles-old/misc/oneliners.sh index e965b98..97811a6 100755 --- a/dotfiles-old/misc/oneliners.sh +++ b/dotfiles-old/misc/oneliners.sh @@ -29,17 +29,6 @@ printf $SHEBANG'xrandr --output VGA-1 --auto --right-of LVDS-1\n printf $SHEBANG"xrandr --output HDMI-1 --off\n" >hdmioff printf $SHEBANG"xrandr --output VGA-1 --off\n" >vgaoff -# mounting volumes -printf $SHEBANG"[ -z \"\$1\" ] && printf 'Usage: %%b [device]\\\\n' \"\$0\" && exit 1 || true -[ -d \"/mnt/\$1\" ] || $SUDO mkdir \"/mnt/\$1\" -$SUDO mount \"/dev/\$1\" \"/mnt/\$1\" && cd \"/mnt/\$1\"\n" >mnt - -# wireguard vpn stuff -printf $SHEBANG$SUDO' wg-quick up "$@"\n' >vpn-connect -printf $SHEBANG$SUDO' wg-quick down "$@"\n' >vpn-disconnect -printf $SHEBANG$SUDO' ls /etc/wireguard/ | grep "conf$" | awk -F ".conf" "{print $1}"\n' >vpn-list -printf $SHEBANG'xterm -e "vpn-connect $(vpn-list | dmenu); read -s -n 1"\n' >vpn-quick # not to be confused with wg-quick - # youtube-dl stuff printf $SHEBANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo printf $SHEBANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp From 09350d126e8b37548033447ed488792df2cffa53 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 24 Jul 2021 22:24:03 -0400 Subject: [PATCH 111/142] mpv workaround for netbsd, mullvad connection status --- dotfiles-old/.aliases | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 98dd148..5ff4aac 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -11,7 +11,8 @@ alias e="$EDITOR" alias ipconfig="ifconfig" #alias ls="9 ls" alias ls="ls -1A" -alias mpv="LIBGL_ALWAYS_SOFTWARE=1 mpv" +alias mpv="LIBGL_ALWAYS_SOFTWARE=1 mpv --vo=x11" +alias mullvad="curl https://am.i.mullvad.net/connected" alias mv="mv -iv" alias p="ping 1.1.1.1" From 54b030a3b1b5c825107ff05a9aa86d02c4b00f6f Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 24 Jul 2021 22:24:28 -0400 Subject: [PATCH 112/142] more bspwmrc --- dotfiles-old/.config/bspwm/bspwmrc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/.config/bspwm/bspwmrc b/dotfiles-old/.config/bspwm/bspwmrc index 66df720..fc2d5b7 100755 --- a/dotfiles-old/.config/bspwm/bspwmrc +++ b/dotfiles-old/.config/bspwm/bspwmrc @@ -1,5 +1,12 @@ #!/bin/sh +bspc config active_border_color '#FFCACA' +bspc config focus_follows_pointer true +bspc config focused_border_color '#FFFFFF' +bspc config normal_border_color '#FFDBDB' bspc config window_gap 0 bspc monitor -d 1 2 3 4 5 6 7 8 9 10 -pgrep -x sxhkd >/dev/null || sxhkd & -polybar bar & +bspc rule -a XClock manage=off # thanks emanuele6 +bspc rule -a xload manage=off +xdo lower -NXClock +xdo lower -Nxload +data | lemonbar -bf '-*-unscii-*-*-*-*-*-*-*-*-*-*-*-*' -F '#FFDBDB' From e51f9b2236b31eaa9678e028b185ccdd174fa519 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 24 Jul 2021 22:25:13 -0400 Subject: [PATCH 113/142] displaym stuff --- dotfiles-old/.config/displaym/.xinitrc | 8 +++----- dotfiles-old/.config/displaym/ctwm/.xinitrc | 6 ++++++ dotfiles-old/bin/displaym | 6 +++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dotfiles-old/.config/displaym/.xinitrc b/dotfiles-old/.config/displaym/.xinitrc index ff5a473..249c945 100644 --- a/dotfiles-old/.config/displaym/.xinitrc +++ b/dotfiles-old/.config/displaym/.xinitrc @@ -1,8 +1,6 @@ # load X default stuff xrdb -load .Xresources -# xclock -xclock -geometry 180x180-10+10 -update 1 & -# xload -xload -geometry 180x180-10+200 -update 1 & +# wallpaper +feh --bg-center /home/trinity/Pictures/Wallpapers/nosebleed.jpg # keybind manager -exec sxhkd & +pgrep -x sxhkd >/dev/null || sxhkd & diff --git a/dotfiles-old/.config/displaym/ctwm/.xinitrc b/dotfiles-old/.config/displaym/ctwm/.xinitrc index bd7108c..cfd4e86 100644 --- a/dotfiles-old/.config/displaym/ctwm/.xinitrc +++ b/dotfiles-old/.config/displaym/ctwm/.xinitrc @@ -1 +1,7 @@ +# xclock +xclock -geometry 180x180-10+10 -update 1 & +# xload +xload -geometry 180x180-10+200 -update 1 & +# bar +data | lemonbar -bf '-*-unscii-*-*-*-*-*-*-*-*-*-*-*-*' -F '#FFDBDB' & exec ctwm diff --git a/dotfiles-old/bin/displaym b/dotfiles-old/bin/displaym index 156daa1..dd5f81b 100755 --- a/dotfiles-old/bin/displaym +++ b/dotfiles-old/bin/displaym @@ -23,7 +23,11 @@ case "$1" in (start) WM="$2"; export WM cat "$DISPLAYM_CONFIG/.xinitrc" "$DISPLAYM_CONFIG/$WM/.xinitrc" >"$HOME/.xinitrc" - . "$HOME/.config/displaym/$WM/start.sh" + sh "$DISPLAYM_CONFIG/$WM/start.sh" + ;; + (stop) + sh "$DISPLAYM_CONFIG/$WM/stop.sh" + pkill "$WM" ;; (*) usage ;; esac From 4f976ab201d1317581efb7bcef0dc9620f9cbfd1 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 24 Jul 2021 22:25:25 -0400 Subject: [PATCH 114/142] rust addition --- dotfiles-old/.env | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles-old/.env b/dotfiles-old/.env index b22342d..ad8b536 100644 --- a/dotfiles-old/.env +++ b/dotfiles-old/.env @@ -7,3 +7,4 @@ PS3="; " set -o vi . $HOME/.aliases +. $HOME/.cargo/env From e8b4cea1ac9a642097e6edaa9dc13b6cab140d1d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 24 Jul 2021 22:26:10 -0400 Subject: [PATCH 115/142] more explicit options --- dotfiles-old/.vimrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/.vimrc b/dotfiles-old/.vimrc index a89146f..3edd201 100644 --- a/dotfiles-old/.vimrc +++ b/dotfiles-old/.vimrc @@ -1,6 +1,16 @@ +set bg=dark +set nocp set noexpandtab -set nowrap +set noim +set nois +set nu set relativenumber +set rnu set tabstop=8 -set visualbell +set term=xterm +set tf +set title +set tty=xterm +set vb +set nowrap syntax on From 767f3fb5f20d28462c431e83df230e680694ad3e Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 24 Jul 2021 22:26:36 -0400 Subject: [PATCH 116/142] fixed desktop fetching for bspwm --- dotfiles-old/bin/data | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data index 54c1e4d..4184a1b 100755 --- a/dotfiles-old/bin/data +++ b/dotfiles-old/bin/data @@ -65,7 +65,7 @@ get_cpu_temp() { get_current_desktop() { case "$WM" in - (bspwm) bspc query -D -d focused --names ;; + (bspwm) printf "[%b] " "$(bspc query -D -d focused --names)" ;; esac } @@ -88,7 +88,7 @@ get_public_ip() { PUBLIC_IP="$(get_public_ip)" printbar() { - printf "[%b] " "$(get_current_desktop)" + printf "%b" "$(get_current_desktop)" printf "%b" "$(date)" #printf "%b" "$DELIMITER" #printf "%b" "BAT: $(get_battery_status)" From 99e795d091e17db461d8ad9144d573d3abe2972c Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 31 Jul 2021 17:58:08 -0400 Subject: [PATCH 117/142] fix old issues --- dotfiles-old/bin/displaym | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dotfiles-old/bin/displaym b/dotfiles-old/bin/displaym index dd5f81b..bd28248 100755 --- a/dotfiles-old/bin/displaym +++ b/dotfiles-old/bin/displaym @@ -1,20 +1,17 @@ #!/bin/sh - set -ex usage() { + set +x printf "\ Usage: - %s start [window manager] -" >>/dev/stderr + %s start [window manager]\n" "$argv0" >>/dev/stderr exit 1 } [ -n "$1" ] || usage -[ -z "$HOME" ] \ - && printf "No \$HOME environment variable found. This is very bad and an issue that is not caused by this script.\n" 1>&2 \ - && exit 1 \ - || true + +# assumption: $HOME contains the path to the user's home directory DISPLAYM_CONFIG="$HOME/.config/displaym"; export DISPLAYM_CONFIG [ -d "$DISPLAYM_CONFIG" ] || mkdir -p "$DISPLAYM_CONFIG" From 344a19076ff8d2487008bf4d3d2a7678d12420d7 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 31 Jul 2021 17:58:17 -0400 Subject: [PATCH 118/142] ruler --- dotfiles-old/.vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles-old/.vimrc b/dotfiles-old/.vimrc index 3edd201..94c7f61 100644 --- a/dotfiles-old/.vimrc +++ b/dotfiles-old/.vimrc @@ -6,6 +6,7 @@ set nois set nu set relativenumber set rnu +set ruler set tabstop=8 set term=xterm set tf From 0533c97afc0bb5d5e3a58437c637014cc9c54f7d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 31 Jul 2021 17:58:40 -0400 Subject: [PATCH 119/142] add newline --- dotfiles-old/bin/mnt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/bin/mnt b/dotfiles-old/bin/mnt index 45152da..dfc27f5 100755 --- a/dotfiles-old/bin/mnt +++ b/dotfiles-old/bin/mnt @@ -6,7 +6,7 @@ MNT="/mnt" # preliminary checks [ -n "$2" ] || [ -z "$1" ] \ - && printf "Usage: %b [device in %b/]" "$0" "$DEV" >>/dev/stderr \ + && printf "Usage: %b [device in %b/]\n" "$0" "$DEV" >>/dev/stderr \ && exit 1 \ || true ! [ "$(id -u)" = 0 ] \ From 614b0ad4e0f5a13e4d565f15b46f0c7474c592f8 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 31 Jul 2021 17:58:55 -0400 Subject: [PATCH 120/142] make sure cp isn't an alias --- dotfiles-old/clone.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh index 5b35b8e..19ef9b7 100755 --- a/dotfiles-old/clone.sh +++ b/dotfiles-old/clone.sh @@ -1,4 +1,5 @@ #!/bin/sh -e +alias cp="$(which cp)" SRC="$HOME" DEST="$(pwd)" [ "$(printf "Abort.\nContinue.\n" | dmenu -p "Copying from '$SRC' to '$DEST'. Continue?")" = "Continue." ] || exit From 90e8c6cdf04181f93383890028a6b4014acb927d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Fri, 13 Aug 2021 18:22:38 -0400 Subject: [PATCH 121/142] NetBSD battery power, ipv6 --- dotfiles-old/bin/data | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data index 4184a1b..35934d2 100755 --- a/dotfiles-old/bin/data +++ b/dotfiles-old/bin/data @@ -3,8 +3,11 @@ set -e # depends on https://git.sr.ht/~trinity/utilities (particularly fdivide(1), -# gt(1), and stris(1)) unless POSIXLY_CORRECT is set (not tested) +# gt(1), and stris(1)) +# there are issues with the POSIX shell implementations included in this script +# and particularly with stris +# on Linux only: # these files (separated by newlines) will have the current CPU temperature # multiplied by $CPU_TEMP_SCALE. this script divides the file contents by scale # and displays that temperature (assumed to be in Celsius units) @@ -28,7 +31,11 @@ INTERVAL=1 # this URL will have in plain text the public IP address from which it was # accessed -PUBLIC_IP_FETCH_URL="http://ifconfig.io/" +#PUBLIC_IP_FETCH_URL="http://ifconfig.io/" +#PUBLIC_IP_FETCH_URL="https://ifconfig.io" +#PUBLIC_IP_FETCH_URL="http://icanhazip.com" +PUBLIC_IP_FETCH_URL="https://icanhazip.com" +PUBLIC_IP6_FETCH_URL="$PUBLIC_IP_FETCH_URL" get_battery_status() { if [ "$(uname)" = "Linux" ]; then @@ -38,6 +45,15 @@ get_battery_status() { # acpi -a will just print the power adapter status. printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//') ($(acpi -a))" return + elif [ "$(uname)" = "NetBSD" ]; then + printf "%b%%" "$(envstat -s acpibat0:charge \ + | sed 1,2d \ + | cut -d ':' -f 2 \ + | awk '{print $1}' \ + | cut -d '.' -f 1)" + return + else + printf "get_battery_status: unsupported OS" fi } @@ -60,6 +76,9 @@ get_cpu_temp() { | cut -d ':' -f 2 \ | awk '{print $1}' \ | cut -d '.' -f 1)" + return + else + printf "get_cpu_temp: unsupported OS" fi } @@ -79,8 +98,19 @@ get_memory_usage() { } get_public_ip() { - curl "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \ - || printf "[error fetching IP]\n" + PUBLIC_IP4="$(curl "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \ + || printf "-1")" + PUBLIC_IP6="$(curl -6 "$PUBLIC_IP6_FETCH_URL" --no-progress-meter 2>/dev/null \ + || printf "-1")" + if [ "$PUBLIC_IP4" = "-1" ] && [ "$PUBLIC_IP6" = "-1" ]; then + printf "[error fetching address]" + elif [ "$PUBLIC_IP4" = "-1" ]; then + printf "%b" "$PUBLIC_IP6" + elif [ "$PUBLIC_IP6" = "-1" ]; then + printf "%b" "$PUBLIC_IP4" + else + printf "%b / %b" "$PUBLIC_IP4" "$PUBLIC_IP6" + fi return } @@ -90,8 +120,8 @@ PUBLIC_IP="$(get_public_ip)" printbar() { printf "%b" "$(get_current_desktop)" printf "%b" "$(date)" - #printf "%b" "$DELIMITER" - #printf "%b" "BAT: $(get_battery_status)" + printf "%b" "$DELIMITER" + printf "%b" "BAT: $(get_battery_status)" printf "%b" "$DELIMITER" printf "%b" "CPU: $(get_cpu_temp)" printf "%b" "$DELIMITER" From 036d4600fe3cebac84058e4c7a3436f093a78f02 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 19 Aug 2021 08:32:16 -0400 Subject: [PATCH 122/142] force ipv4 for ipv4 puip --- dotfiles-old/bin/data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data index 35934d2..08fe086 100755 --- a/dotfiles-old/bin/data +++ b/dotfiles-old/bin/data @@ -98,7 +98,7 @@ get_memory_usage() { } get_public_ip() { - PUBLIC_IP4="$(curl "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \ + PUBLIC_IP4="$(curl -4 "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \ || printf "-1")" PUBLIC_IP6="$(curl -6 "$PUBLIC_IP6_FETCH_URL" --no-progress-meter 2>/dev/null \ || printf "-1")" From 99bfbaafc920010782dc9f5d17d0958e5005adcb Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 19 Aug 2021 08:32:27 -0400 Subject: [PATCH 123/142] sudo --- dotfiles-old/bin/mnt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dotfiles-old/bin/mnt b/dotfiles-old/bin/mnt index dfc27f5..2e6359c 100755 --- a/dotfiles-old/bin/mnt +++ b/dotfiles-old/bin/mnt @@ -3,16 +3,18 @@ set -e DEV="/dev" MNT="/mnt" +# will not be split when used +SUDO="doas" # preliminary checks [ -n "$2" ] || [ -z "$1" ] \ && printf "Usage: %b [device in %b/]\n" "$0" "$DEV" >>/dev/stderr \ && exit 1 \ || true + +# no need to priviledge escalate if we're already root ! [ "$(id -u)" = 0 ] \ - && printf "%b: This script must be run as root.\n" "$0" >>/dev/stderr \ - && exit 1 \ - || true + || SUDO="" # exhaustive checks to ensure $DEV/$1 exists and that $MNT/$1 can be safely used as a mountpoint ! [ -d "$MNT/$1" ] && [ -a "$MNT/$1" ] \ @@ -21,7 +23,7 @@ MNT="/mnt" || true [ -d "$MNT/$1" ] \ || mkdir "$MNT/$1" -! [ "$(ls -A "$MNT/$1" | wc -c)" = 0 ] \ +! [ "$(ls -A "$MNT/$1" | wc -l | xargs echo)" = 0 ] \ && printf "%b: '%b/%b' is a directory, but isn't empty.\n" "$0" "$MNT" "$1" >>/dev/stderr \ && exit 1 \ || true @@ -31,4 +33,4 @@ MNT="/mnt" || true # ok, we're safe -mount "$DEV/$1" "$MNT/$1" +"$SUDO" mount "$DEV/$1" "$MNT/$1" From b3769ea57de2865057e58b78471c4f5ef1e09eb1 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 19 Aug 2021 08:33:08 -0400 Subject: [PATCH 124/142] battery monitor tool --- dotfiles-old/bin/batterymonitor | 54 +++++++++++++++++++++++++++++++++ dotfiles-old/manifest_file | 1 + 2 files changed, 55 insertions(+) create mode 100755 dotfiles-old/bin/batterymonitor diff --git a/dotfiles-old/bin/batterymonitor b/dotfiles-old/bin/batterymonitor new file mode 100755 index 0000000..2949920 --- /dev/null +++ b/dotfiles-old/bin/batterymonitor @@ -0,0 +1,54 @@ +#!/bin/sh + +POLLING_FREQUENCY=1 + +# ISO 8601 +alias date="date '+%Y-%m-%dT%T'" + +emit() { + printf "[%s] " "$(date)" + echo "$@" +} +get_current_level() { + # adapted from other script i wrote, also in the public domain + if [ "$(uname)" = "Linux" ]; then + # this is a dirty hack. + # acpi | awk '{print $4}' will print the battery percentage, + # and s/,$// strips the trailing comma. + # acpi -a will just print the power adapter status. + printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//') ($(acpi -a))" + return 0 + elif [ "$(uname)" = "NetBSD" ]; then + printf "%b" "$(envstat -s acpibat0:charge \ + | sed 1,2d \ + | cut -d ':' -f 2 \ + | awk '{print $1}' \ + | cut -d '.' -f 1)" + return 0 + else + printf "get_battery_status: unsupported OS" >>/dev/stderr + return 1 + fi +} + +! get_current_level >/dev/null \ + && printf "Unable to get battery status on this system.\n" >>/dev/stderr \ + && exit 1 \ + || true + +current_level=$(get_current_level) +previous_level=$current_level + +emit "$(printf "Current level: %d%%" "$current_level")" + +while true; do + current_level=$(get_current_level) + if ! [ $current_level -eq $previous_level ]; then + [ $current_level -lt $previous_level ] \ + && emit "$(printf "Discharged: %d%% -> %d%%\n" $previous_level $current_level )" \ + || emit "$(printf " Charged: %d%% -> %d%%\n" $previous_level $current_level )" + previous_level=$current_level + fi + + sleep $POLLING_FREQUENCY +done diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file index a421643..ffd9b5e 100644 --- a/dotfiles-old/manifest_file +++ b/dotfiles-old/manifest_file @@ -16,6 +16,7 @@ .config/displaym/i3wm/sxhkdrc .config/i3/config .config/i3status/config +bin/batterymonitor bin/data bin/displaym bin/mnt From 7e7a81fc4fec9138ed3c8ded4ab00686b613748f Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 17 Nov 2021 09:20:12 -0500 Subject: [PATCH 125/142] transitioning to new displaym --- dotfiles-old/.config/displaym/merge_xinitrc.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 dotfiles-old/.config/displaym/merge_xinitrc.sh diff --git a/dotfiles-old/.config/displaym/merge_xinitrc.sh b/dotfiles-old/.config/displaym/merge_xinitrc.sh new file mode 100755 index 0000000..6f8e4ed --- /dev/null +++ b/dotfiles-old/.config/displaym/merge_xinitrc.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cat "$DISPLAYM_CONFIG/.xinitrc" "$DISPLAYM_CONFIG/$WM/.xinitrc" >"$HOME/.xinitrc" From cdd19f5c46f8f9c27bc1dcbe4abe42addbce1c57 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 17 Nov 2021 09:28:33 -0500 Subject: [PATCH 126/142] more new displaym transitioning --- dotfiles-old/.config/displaym/bspwm/start.sh | 3 ++- dotfiles-old/.config/displaym/ctwm/start.sh | 3 ++- dotfiles-old/.config/displaym/default_sxhkdrc.sh | 2 ++ dotfiles-old/.config/displaym/default_xinitrc.sh | 2 ++ dotfiles-old/.config/displaym/i3wm/start.sh | 3 +++ dotfiles-old/.config/displaym/merge_sxhkdrc.sh | 3 +++ 6 files changed, 14 insertions(+), 2 deletions(-) mode change 100644 => 100755 dotfiles-old/.config/displaym/bspwm/start.sh create mode 100755 dotfiles-old/.config/displaym/default_sxhkdrc.sh create mode 100755 dotfiles-old/.config/displaym/default_xinitrc.sh create mode 100644 dotfiles-old/.config/displaym/i3wm/start.sh create mode 100755 dotfiles-old/.config/displaym/merge_sxhkdrc.sh diff --git a/dotfiles-old/.config/displaym/bspwm/start.sh b/dotfiles-old/.config/displaym/bspwm/start.sh old mode 100644 new mode 100755 index 446564c..621ceaf --- a/dotfiles-old/.config/displaym/bspwm/start.sh +++ b/dotfiles-old/.config/displaym/bspwm/start.sh @@ -1,2 +1,3 @@ -cat "$DISPLAYM_CONFIG/sxhkdrc" "$DISPLAYM_CONFIG/bspwm/sxhkdrc" >"$HOME/.config/sxhkd/sxhkdrc" +. "$DISPLAYM_CONFIG/merge_xinitrc.sh" +. "$DISPLAYM_CONFIG/merge_sxhkdrc.sh" startx diff --git a/dotfiles-old/.config/displaym/ctwm/start.sh b/dotfiles-old/.config/displaym/ctwm/start.sh index 5c0fbf4..9cdb9b4 100755 --- a/dotfiles-old/.config/displaym/ctwm/start.sh +++ b/dotfiles-old/.config/displaym/ctwm/start.sh @@ -1,2 +1,3 @@ -cat "$DISPLAYM_CONFIG/sxhkdrc" >"$HOME/.config/sxhkd/sxhkdrc" +. "$DISPLAYM_CONFIG/merge_xinitrc.sh" +. "$DISPLAYM_CONFIG/default_sxhkdrc.sh" startx diff --git a/dotfiles-old/.config/displaym/default_sxhkdrc.sh b/dotfiles-old/.config/displaym/default_sxhkdrc.sh new file mode 100755 index 0000000..67a4866 --- /dev/null +++ b/dotfiles-old/.config/displaym/default_sxhkdrc.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cp "$DISPLAYM_CONFIG/sxhkdrc" "$HOME/.config/sxhkd/sxhkdrc" diff --git a/dotfiles-old/.config/displaym/default_xinitrc.sh b/dotfiles-old/.config/displaym/default_xinitrc.sh new file mode 100755 index 0000000..1e49eb8 --- /dev/null +++ b/dotfiles-old/.config/displaym/default_xinitrc.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cp "$DISPLAYM_CONFIG/.xinitrc" "$HOME/.xinitrc" diff --git a/dotfiles-old/.config/displaym/i3wm/start.sh b/dotfiles-old/.config/displaym/i3wm/start.sh new file mode 100644 index 0000000..51d504d --- /dev/null +++ b/dotfiles-old/.config/displaym/i3wm/start.sh @@ -0,0 +1,3 @@ +#!/bin/sh +. "$DISPLAYM_CONFIG/merge_xinitrc.sh" +. "$DISPLAYM_CONFIG/merge_sxhkdrc.sh" diff --git a/dotfiles-old/.config/displaym/merge_sxhkdrc.sh b/dotfiles-old/.config/displaym/merge_sxhkdrc.sh new file mode 100755 index 0000000..0d82330 --- /dev/null +++ b/dotfiles-old/.config/displaym/merge_sxhkdrc.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cat "$DISPLAYM_CONFIG/sxhkdrc" "$DISPLAYM_CONFIG/$WM/sxhkdrc" \ + >"$HOME/.config/sxhkd/sxhkdrc" From 732ad3d460cfeb3a368a9fb13deff7763428f514 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 17 Nov 2021 09:29:22 -0500 Subject: [PATCH 127/142] new displaym at git.sr.ht/~trinity/displaym --- dotfiles-old/bin/displaym | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 dotfiles-old/bin/displaym diff --git a/dotfiles-old/bin/displaym b/dotfiles-old/bin/displaym deleted file mode 100755 index bd28248..0000000 --- a/dotfiles-old/bin/displaym +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -set -ex - -usage() { - set +x - printf "\ -Usage: - %s start [window manager]\n" "$argv0" >>/dev/stderr - exit 1 -} - -[ -n "$1" ] || usage - -# assumption: $HOME contains the path to the user's home directory - -DISPLAYM_CONFIG="$HOME/.config/displaym"; export DISPLAYM_CONFIG -[ -d "$DISPLAYM_CONFIG" ] || mkdir -p "$DISPLAYM_CONFIG" - -case "$1" in - (start) - WM="$2"; export WM - cat "$DISPLAYM_CONFIG/.xinitrc" "$DISPLAYM_CONFIG/$WM/.xinitrc" >"$HOME/.xinitrc" - sh "$DISPLAYM_CONFIG/$WM/start.sh" - ;; - (stop) - sh "$DISPLAYM_CONFIG/$WM/stop.sh" - pkill "$WM" - ;; - (*) usage ;; -esac - From c8a534da02e3af0db8534dc14eb3556963a83298 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 17 Nov 2021 09:53:00 -0500 Subject: [PATCH 128/142] new changes --- dotfiles-old/.aliases | 1 + dotfiles-old/.config/displaym/.xinitrc | 20 ++++++++++++++++++-- dotfiles-old/.profile | 4 ++-- dotfiles-old/.vimrc | 1 + dotfiles-old/bin/batterymonitor | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 5ff4aac..84b55d1 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -40,4 +40,5 @@ webm() { ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis "$(printf "%b" "$1" | awk -F '.' '{print $1}')".webm } +alias y=youtube-dl alias yay="paru" diff --git a/dotfiles-old/.config/displaym/.xinitrc b/dotfiles-old/.config/displaym/.xinitrc index 249c945..e27a3aa 100644 --- a/dotfiles-old/.config/displaym/.xinitrc +++ b/dotfiles-old/.config/displaym/.xinitrc @@ -1,6 +1,22 @@ +set -x # load X default stuff -xrdb -load .Xresources +! [ -e $HOME/.Xresources ] \ + || xrdb -load $HOME/.Xresources # wallpaper -feh --bg-center /home/trinity/Pictures/Wallpapers/nosebleed.jpg +WALLPAPER="$HOME/Pictures/Wallpapers/nosebleed.jpg" +! [ -e "$WALLPAPER" ] \ + || feh --bg-center "$WALLPAPER" +# internal display +xrandr \ + --output "$(xrandr | grep ' connected ' | awk '{print $1}' | grep LVDS)" \ + --mode 1280x800 --rate 60.00 +# VGA monitor +if xrandr | grep " connected " | awk '{ print$1 }' | grep "VGA" >/dev/null 2>&1; then + ! [ "$MONITOR" = "MV720" ] \ + || xrandr \ + --output "$(xrandr | grep ' connected ' | awk '{print $1}' | grep VGA)" \ + --above "$(xrandr | grep ' connected ' | awk '{print $1}' | grep LVDS)" \ + --mode 1024x768 --rate 85.00 +fi # keybind manager pgrep -x sxhkd >/dev/null || sxhkd & diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index c4a9fa4..a89ad38 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -1,9 +1,9 @@ -BROWSER=firefox-developer-edition; export BROWSER +BROWSER=firefox; export BROWSER DOOMWADDIR=/mnt/partone/misc/doomwads/; export DOOMWADDIR EDITOR=ed; export EDITOR PAGER="less"; export PAGER PLAN9=/usr/local/plan9; export PLAN9 -PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH":$PLAN9/bin"; export PATH +PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH":/usr/pkg/qt5/bin:$PLAN9/bin"; export PATH TERMINAL="uxterm"; export TERMINAL UNITS_SYSTEM="si"; export UNITS_SYSTEM VISUAL=vi; export VISUAL diff --git a/dotfiles-old/.vimrc b/dotfiles-old/.vimrc index 94c7f61..70e2bf6 100644 --- a/dotfiles-old/.vimrc +++ b/dotfiles-old/.vimrc @@ -1,4 +1,5 @@ set bg=dark +set mouse= set nocp set noexpandtab set noim diff --git a/dotfiles-old/bin/batterymonitor b/dotfiles-old/bin/batterymonitor index 2949920..fb6de6c 100755 --- a/dotfiles-old/bin/batterymonitor +++ b/dotfiles-old/bin/batterymonitor @@ -16,7 +16,7 @@ get_current_level() { # acpi | awk '{print $4}' will print the battery percentage, # and s/,$// strips the trailing comma. # acpi -a will just print the power adapter status. - printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//') ($(acpi -a))" + printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//')" return 0 elif [ "$(uname)" = "NetBSD" ]; then printf "%b" "$(envstat -s acpibat0:charge \ From 53ba39dd554fb7babb90ec50d3cd6b290c84150f Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Wed, 17 Nov 2021 09:55:26 -0500 Subject: [PATCH 129/142] SUDO env var --- dotfiles-old/.aliases | 2 ++ dotfiles-old/.profile | 1 + 2 files changed, 3 insertions(+) diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases index 84b55d1..44d9946 100755 --- a/dotfiles-old/.aliases +++ b/dotfiles-old/.aliases @@ -7,6 +7,7 @@ alias awk="nawk" alias b="$BROWSER" alias cls="clear" alias cp="cp -iv" +alias doas="$SUDO" alias e="$EDITOR" alias ipconfig="ifconfig" #alias ls="9 ls" @@ -27,6 +28,7 @@ pyenv() { } alias sensors="watch sensors" +alias sudo="$SUDO" # Wacom Intuos 2 #alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1" diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile index a89ad38..80605d7 100644 --- a/dotfiles-old/.profile +++ b/dotfiles-old/.profile @@ -4,6 +4,7 @@ EDITOR=ed; export EDITOR PAGER="less"; export PAGER PLAN9=/usr/local/plan9; export PLAN9 PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH":/usr/pkg/qt5/bin:$PLAN9/bin"; export PATH +SUDO="doas"; export SUDO TERMINAL="uxterm"; export TERMINAL UNITS_SYSTEM="si"; export UNITS_SYSTEM VISUAL=vi; export VISUAL From 49f8cbc6dbd0e448d84de5f1cb428b761e030df6 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 18 Nov 2021 16:26:56 +0000 Subject: [PATCH 130/142] XRandR transformation --- dotfiles-old/bin/transform | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 dotfiles-old/bin/transform diff --git a/dotfiles-old/bin/transform b/dotfiles-old/bin/transform new file mode 100755 index 0000000..a9a1e8d --- /dev/null +++ b/dotfiles-old/bin/transform @@ -0,0 +1,12 @@ +#!/bin/sh +argv0="$0" +usage(){ + printf "Usage: %s (un) [XRandR output]\n" "$argv0" 1>&2 + exit 64 # sysexits(3) EX_USAGE +} +if [ -n "$2" ] && [ "$1" = un ] +then xrandr --output "$2" --transform none +elif [ -n "$1" ] +then "$DISPLAYM_CONFIG/xrandr_transform.sh" "$1" +else usage +done From d85fe4b419c568b7bfa028c2e298bbf8289d9f8e Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 18 Nov 2021 16:28:54 +0000 Subject: [PATCH 131/142] silly mistake --- dotfiles-old/bin/transform | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles-old/bin/transform b/dotfiles-old/bin/transform index a9a1e8d..718e8fc 100755 --- a/dotfiles-old/bin/transform +++ b/dotfiles-old/bin/transform @@ -9,4 +9,4 @@ then xrandr --output "$2" --transform none elif [ -n "$1" ] then "$DISPLAYM_CONFIG/xrandr_transform.sh" "$1" else usage -done +fi From f12dbece1838fabbe1fe91358b8fb467953a02b4 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 23 Nov 2021 04:15:00 +0000 Subject: [PATCH 132/142] Add pactl support --- dotfiles-old/bin/volume | 104 +++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 34 deletions(-) diff --git a/dotfiles-old/bin/volume b/dotfiles-old/bin/volume index c521349..e7837dd 100755 --- a/dotfiles-old/bin/volume +++ b/dotfiles-old/bin/volume @@ -1,18 +1,32 @@ #!/bin/sh -# Has some undocumented features but they're functional (as far as I know) -# and system-independent. just shortcuts for me really. - argv0="$0" -! which stris >/dev/null 2>/dev/null \ - && printf "%b: Missing stris.\n" \ +# ADDING A NEW SOUND SERVER/CLIENT/WHATEVERIDK +# `volume a` and `volume s` are the system dependent functions. + +# `volume a $2` must set the volume to $2, an integer value. This should be a +# percentage, 100% being the loudest possible volume that can be output by +# hardware without quality loss. Percentages above 100% will be allowable in +# software if using percentage units. If percentage units are implausible to +# implement, system units are okay (e.g. 0-$arbitrary scale versus 0-100). + +# `volume s` must output the current volume in integer form in whatever units +# are being used by `volume a` on the given system. + +! command -v stris >/dev/null 2>/dev/null \ + && printf "%b: Missing stris.\n" "$argv0" \ && exit 1 \ || true VOLUME_TMP_FILE="$HOME/.volume-previous" -usage() { +unknown_system(){ + printf "%s: Unknown system.\n" "$argv0" 1>&2 + exit 1 +} + +usage(){ printf "\ Usage: %b [function] (argument)\n" "$argv0" printf "\ @@ -36,28 +50,57 @@ works the same as \"%b h\". || argv1=s case "$argv1" in -(+) # shortcut +# +# SYSTEM DEPENDENT +# +(a*) + [ -n "$2" ] && [ -z "$3" ] && stris int "$2" || usage + + if [ "$(uname)" = "NetBSD" ]; then + # NetBSD 9.2 STABLE 2021-07 + audioctl -w play.gain=$2 >/dev/null + + elif command -v pactl >/dev/null; then + # pactl 15.0 compiled+linked with libpulse 15.0.0 + pactl set-sink-volume @DEFAULT_SINK@ $2% + + else unknown_system; fi + exit 0 ;; +(s*) + [ -z "$2" ] || usage + + if [ "$(uname)" = "NetBSD" ]; then + # hacky + audioctl -a \ + | grep "play\.gain" \ + | cut -d '=' -f 2 + + elif command -v pactl >/dev/null; then + # really hacky, gets the job done + # gets the volume % of Lchan specifically + pactl get-sink-volume @DEFAULT_SINK@ \ + | sed q \ + | cut -d '/' -f 2 \ + | xargs echo \ + | sed s/'%'// + + else unknown_system; fi + exit 0 ;; +# +# SYSTEM independent +# +(+) [ -n "$2" ] && [ -z "$3" ] && stris uint "$2" \ && "$argv0" r "$2" \ || usage ;; -(-) # shortcut +(-) [ -n "$2" ] && [ -z "$3" ] && stris uint "$2" \ && "$argv0" r -"$2" \ || usage ;; -(a*) - [ -n "$2" ] && [ -z "$3" ] && stris int "$2" || usage - case "$(uname)" in - (NetBSD) - # 9.2 STABLE 2021-07 - audioctl -w play.gain=$2 >/dev/null - ;; - (*) unknown_system - esac - exit 0 ;; (h*) usage ;; -(m*) # system independent +(m*) [ -z "$2" ] || usage # restore previous volume if there is one if [ -e "$VOLUME_TMP_FILE" ]; then @@ -74,9 +117,9 @@ case "$argv1" in # dd used rather than shell redirect so it's easy to determine # whether or not the file write worked - if ! printf "%b" "$("$argv0" s)" | dd of="$VOLUME_TMP_FILE" \ - 2>/dev/null - then + if ! printf "%b" "$("$argv0" s)" \ + | dd >"$VOLUME_TMP_FILE" 2>/dev/null + then printf "Error writing to file.\n" >/dev/stderr false fi @@ -86,22 +129,15 @@ case "$argv1" in printf "Muted.\n" exit 0 ;; -(r*) # system independent - [ -n "$2" ] && [ -z "$3" ] && stris int "$2" || usage +(r*) + [ -n "$2" ] && [ -z "$3" ] && stris int "$2" \ + || usage + if ! newval=$(add $("$argv0" s) $2) || ! stris int "$newval"; then - printf "%b: Error finding new value for volume.\n" + printf "%b: Error finding new value for volume.\n" "$argv0" exit 1 fi "$argv0" a $newval exit $? ;; -(s*) - [ -z "$2" ] || usage - case "$(uname)" in - (NetBSD) - audioctl -a | grep "play\.gain" | cut -d '=' -f 2 - ;; - (*) unknown_system - esac - exit 0 ;; (*) usage esac From 4695ff98cac2e9a2bba68e051ebfa2316ea6948f Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Tue, 23 Nov 2021 04:27:11 +0000 Subject: [PATCH 133/142] cleaning --- dotfiles-old/bin/volume | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dotfiles-old/bin/volume b/dotfiles-old/bin/volume index e7837dd..ff3c9c9 100755 --- a/dotfiles-old/bin/volume +++ b/dotfiles-old/bin/volume @@ -28,14 +28,16 @@ unknown_system(){ usage(){ printf "\ -Usage: %b [function] (argument)\n" "$argv0" +Usage: %b {function} (operand)\n" "$argv0" printf "\ Functions: + '+' - shortcut to \"relative \$2\" + '-' - shortcut to \"relative -\$2\" absolute - change sound output to absolute unit - help - print this help output + help,'' - print this help output mute - toggle mute/unmute relative - change sound output relative to current status - status - print current sound output in system unit + status - print current sound output in system unit \ " printf "\ The options are matched with [char]*. So \"%b help\" @@ -45,9 +47,10 @@ works the same as \"%b h\". exit 1 } +# $1 becomes 'help' if previously empty [ -n "$1" ] \ && argv1="$1" \ - || argv1=s + || argv1=help case "$argv1" in # @@ -99,7 +102,6 @@ case "$argv1" in && "$argv0" r -"$2" \ || usage ;; -(h*) usage ;; (m*) [ -z "$2" ] || usage # restore previous volume if there is one @@ -139,5 +141,6 @@ case "$argv1" in fi "$argv0" a $newval exit $? ;; -(*) usage +(h*) usage ;; +(*) usage ;; esac From 96770bb1fbfe0d72fd44ceb4ca371af52230cd1d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Sat, 11 Dec 2021 21:26:58 -0500 Subject: [PATCH 134/142] screen rotation --- dotfiles-old/bin/rotate | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 dotfiles-old/bin/rotate diff --git a/dotfiles-old/bin/rotate b/dotfiles-old/bin/rotate new file mode 100755 index 0000000..2195ce5 --- /dev/null +++ b/dotfiles-old/bin/rotate @@ -0,0 +1,33 @@ +#!/bin/sh +set -e + +ROTATION_FILE="$HOME/.rotation" +SCREEN="$1" + +_core(){ + case "$1" in + 1) xrandr --output "$SCREEN" --rotate normal ;; + 2) xrandr --output "$SCREEN" --rotate left ;; + 3) xrandr --output "$SCREEN" --rotate inverted ;; + 4) xrandr --output "$SCREEN" --rotate right ;; + *) return 1 + esac + return 0 +} + +if [ -e "$ROTATION_FILE" ] +then ROTATION="$(dd <"$ROTATION_FILE" 2>/dev/null)" + if ! _core "$ROTATION" + then _core 1 + ROTATION=2 + else ROTATION=$(printf "%s + 1\n" "$ROTATION" | bc) + ! [ "$ROTATION" -gt 4 ] \ + || ROTATION=1 + fi +else _core 1 + ROTATION=2 +fi + +printf "%s\n" "$ROTATION" >"$ROTATION_FILE" + +exit 0 From 70c273e31345fdb15bd22f5b95b7b856103b7e8d Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 6 Jan 2022 00:31:20 -0500 Subject: [PATCH 135/142] translator --- dotfiles-old/bin/translate | 85 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 dotfiles-old/bin/translate diff --git a/dotfiles-old/bin/translate b/dotfiles-old/bin/translate new file mode 100755 index 0000000..8d2ceab --- /dev/null +++ b/dotfiles-old/bin/translate @@ -0,0 +1,85 @@ +#!/usr/bin/env python3 + +# googletrans comes with a translate(1) command line application but I don't +# like its UI. + +import sys; + +stdin = sys.stdin; +stdout = sys.stdout; +stderr = sys.stderr; + +_exit = exit; +exit = sys.exit; + +def printf(s, *args): + printing = s if len(args) == 0 else (s % args); + return sys.stdout.write(printing); + +def fprintf(f, s, *args): + printing = s if len(args) == 0 else (s % args); + return f.write(printing); + +try: + import googletrans; +except: + printf( + "%s: This Python script requires the \"googletrans\" library.\n", + sys.argv[0] + ); + +def usage(name): + fprintf( + stderr, "Usage: %s [source language] [destination language]\n", + name + ); + exit(1); + +def main(argc, argv): + accepted_languages = set(list(googletrans.LANGCODES) + + list(googletrans.LANGUAGES)); + good = True; + isatty = stdout.isatty(); + translator = googletrans.Translator(); + + if argc != 3: + usage(argv[0]); + + src = argv[1].lower(); + dest = argv[2].lower(); + for arg in [ src, dest ]: + if not(arg in accepted_languages): + good = False; + fprintf(stderr, + "%s: %s: Language not recognized.\n", + argv[0], arg); + if(not(good)): + fprintf(stderr, "The following languages and language codes are" + + " recognized:\n"); + print(googletrans.LANGCODES); + exit(1); + + try: + text = stdin.read().split('\n')[:-1] + except KeyboardInterrupt: + fprintf(stderr, "%s: Cancelled (keyboard interrupt).\n", argv[0]); + exit(1); + if len(text) == 1: + text = text[0]; + translated = translator.translate(text, src=src, dest=dest); + if not(type(translated) is list): translated = [ translated ]; + for translation in translated: + if isatty: + fprintf(stdout, + "%s -> %s\n" + + "\t%s -> %s\n" + + "\tGiven pronunciation: %s\n", + translation.origin, translation.text, + translation.src, translation.dest, + translation.pronunciation + ); + else: + printf(stdout, "%s\n", translation.text); + return 0; + +exit(main(len(sys.argv), sys.argv)); From 1ef41a3d6d2b4a0fd86174be3617e4ad2889fd46 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 6 Jan 2022 08:20:54 -0500 Subject: [PATCH 136/142] works multiline now --- dotfiles-old/bin/translate | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dotfiles-old/bin/translate b/dotfiles-old/bin/translate index 8d2ceab..46e173f 100755 --- a/dotfiles-old/bin/translate +++ b/dotfiles-old/bin/translate @@ -64,11 +64,9 @@ def main(argc, argv): except KeyboardInterrupt: fprintf(stderr, "%s: Cancelled (keyboard interrupt).\n", argv[0]); exit(1); - if len(text) == 1: - text = text[0]; - translated = translator.translate(text, src=src, dest=dest); - if not(type(translated) is list): translated = [ translated ]; - for translation in translated: + for i in range(len(text)): + text[i] = translator.translate(text[i], src=src, dest=dest); + for translation in text: if isatty: fprintf(stdout, "%s -> %s\n" From c36667cf57db2a20bc052a0b38232315d0c3bec1 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 6 Jan 2022 09:06:12 -0500 Subject: [PATCH 137/142] touching up --- dotfiles-old/bin/translate | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dotfiles-old/bin/translate b/dotfiles-old/bin/translate index 46e173f..355fb28 100755 --- a/dotfiles-old/bin/translate +++ b/dotfiles-old/bin/translate @@ -13,8 +13,7 @@ _exit = exit; exit = sys.exit; def printf(s, *args): - printing = s if len(args) == 0 else (s % args); - return sys.stdout.write(printing); + return fprintf(stdout, s, *args); def fprintf(f, s, *args): printing = s if len(args) == 0 else (s % args); @@ -64,9 +63,12 @@ def main(argc, argv): except KeyboardInterrupt: fprintf(stderr, "%s: Cancelled (keyboard interrupt).\n", argv[0]); exit(1); - for i in range(len(text)): - text[i] = translator.translate(text[i], src=src, dest=dest); - for translation in text: + for line in text: + try: + translation = translator.translate(line, src=src, dest=dest); + except: + fprintf(stderr, "%s: %s ->%s\n\t%s\n", + argv[0], line, dest, "Error trying to translate."); if isatty: fprintf(stdout, "%s -> %s\n" From e3e92a2884ceb635ad0d72d6d416bdad9ac6deef Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 6 Jan 2022 22:50:07 -0500 Subject: [PATCH 138/142] fix bug --- dotfiles-old/bin/translate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles-old/bin/translate b/dotfiles-old/bin/translate index 355fb28..f9af8a6 100755 --- a/dotfiles-old/bin/translate +++ b/dotfiles-old/bin/translate @@ -36,7 +36,7 @@ def usage(name): def main(argc, argv): accepted_languages = set(list(googletrans.LANGCODES) - + list(googletrans.LANGUAGES)); + + list(googletrans.LANGUAGES) + [ "auto" ]); good = True; isatty = stdout.isatty(); translator = googletrans.Translator(); @@ -79,7 +79,7 @@ def main(argc, argv): translation.pronunciation ); else: - printf(stdout, "%s\n", translation.text); + fprintf(stdout, "%s\n", translation.text); return 0; exit(main(len(sys.argv), sys.argv)); From 3f14cee31f7c970620c9b65d4a7310d8dd35e45b Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 6 Jan 2022 22:50:50 -0500 Subject: [PATCH 139/142] some fun --- dotfiles-old/bin/autotranslate | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 dotfiles-old/bin/autotranslate diff --git a/dotfiles-old/bin/autotranslate b/dotfiles-old/bin/autotranslate new file mode 100755 index 0000000..7d7bdc3 --- /dev/null +++ b/dotfiles-old/bin/autotranslate @@ -0,0 +1,11 @@ +#!/bin/sh + +[ -n "$dmenu" ] || dmenu=dmenu + +lang="$LANG" +# lots of potentially wrong assumptions here +printf "%s\n" "$lang" | grep "_" >/dev/null 2>&1 \ + && lang="$(printf "%s\n" "$lang" | cut -d '_' -f 1)" \ + || lang=en + +printf "%s\n" "$(xclip -o)" | translate auto $lang | "$($dmenu -p "Press Enter to dismiss.")" From 3d9ec4530615dade6b8aeca91d9ee8e44087aa58 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 6 Jan 2022 22:51:39 -0500 Subject: [PATCH 140/142] autotranslate keybinding --- dotfiles-old/.config/displaym/sxhkdrc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dotfiles-old/.config/displaym/sxhkdrc b/dotfiles-old/.config/displaym/sxhkdrc index 6262308..c9d0447 100755 --- a/dotfiles-old/.config/displaym/sxhkdrc +++ b/dotfiles-old/.config/displaym/sxhkdrc @@ -5,6 +5,9 @@ XF86Audio{Lower,Raise}Volume XF86Launch1 $TERMINAL +XF86TaskPane + rotate LVDS1 + control + shift + Escape $TERMINAL -e htop Print @@ -25,15 +28,14 @@ mod1 + shift + minus mod1 + shift + r pkill -USR1 sxhkd -mod1 + i - ps aux | grep dmenubar | grep -v grep && pkill dmenubar; \ - data | /home/trinity/src/dmenubar/dmenubar -b +mod1 + t + dmenu="dmenu -fn unscii -nb '#000' -nf '#FFDBDB' -sb '#FFDBDB' -sf '#000'" autotranslate mod1 + shift + i pkill dmenubar mod1 + d - dmenu_run + dmenu_run -fn unscii -nb '#000' -nf '#FFDBDB' -p '$' -sb '#FFDBDB' -sf '#000' mod1 + Return $TERMINAL From 2e08513f720211a5059560f074e2fa19dd6720f7 Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 17 Feb 2022 23:26:08 -0500 Subject: [PATCH 141/142] better version of dt's shitty music shellscript --- dotfiles-old/bin/music | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 dotfiles-old/bin/music diff --git a/dotfiles-old/bin/music b/dotfiles-old/bin/music new file mode 100755 index 0000000..8c91b6e --- /dev/null +++ b/dotfiles-old/bin/music @@ -0,0 +1,39 @@ +#!/bin/sh +set -e + +# DistroTube's dm-radio fixed and in POSIX shell + +alias nonzero="test -n" + +nonzero "$MUSIC_PLAYER" || MUSIC_PLAYER=mpv +nonzero "$DMENU" || DMENU=dmenu + +# tab delimits name from URL +STATIONS="\ +50s Rewind https://zeno.fm/radio/50s-rewind/ +60s Rewind https://zeno.fm/radio/60s-rewind/ +70s Rewind https://zeno.fm/radio/70s-rewind/ +80s Rewind https://zeno.fm/radio/80s-rewind/ +90s Rock https://zeno.fm/radio/90s-rock/ +The 2000s https://zeno.fm/radio/the-2000s/ +Classical Radio https://zeno.fm/radio/classical-radio/ +Classical Relaxation https://zeno.fm/radio/radio-christmas-non-stop-classical/ +Classic Rock https://zeno.fm/radio/classic-rockdnb2sav8qs8uv/ +Gangsta49 https://zeno.fm/radio/gangsta49/ +HipHop49 https://zeno.fm/radio/hiphop49/ +Madhouse Country Radio https://zeno.fm/radio/madhouse-country-radio/ +PopMusic https://zeno.fm/radio/popmusic74vyurvmug0uv/ +PopStars https://zeno.fm/radio/popstars/ +RadioMetal https://zeno.fm/radio/radio-metal/ +RocknRoll Radio https://zeno.fm/radio/rocknroll-radio994c7517qs8uv/ +Cancel nop:// +" + +selection="$(printf "%s\n" "$STATIONS" | grep -F "$(printf "%s\n" "$STATIONS" | cut -f 1 | dmenu) ")" + +if [ "$selection" = "Cancel nop://" ] +then exit 0 +fi + +pkill -f http || printf "%s: mpv not running.\n" "$0" 1>&2 +printf "%s\n" "$selection" | cut -f 2 | xargs mpv From 2a244b46ff65fad3441424cf95251e5a543138eb Mon Sep 17 00:00:00 2001 From: Deven Blake Date: Thu, 26 May 2022 19:15:33 -0400 Subject: [PATCH 142/142] relocate --- dotfiles-old/.Xresources | 81 ------- dotfiles-old/.aliases | 46 ---- dotfiles-old/.config/bspwm/bspwmrc | 12 - dotfiles-old/.config/displaym/.xinitrc | 22 -- dotfiles-old/.config/displaym/bspwm/.xinitrc | 1 - dotfiles-old/.config/displaym/bspwm/start.sh | 3 - dotfiles-old/.config/displaym/bspwm/sxhkdrc | 22 -- dotfiles-old/.config/displaym/ctwm/.xinitrc | 7 - dotfiles-old/.config/displaym/ctwm/start.sh | 3 - .../.config/displaym/default_sxhkdrc.sh | 2 - .../.config/displaym/default_xinitrc.sh | 2 - dotfiles-old/.config/displaym/i3wm/.xinitrc | 1 - dotfiles-old/.config/displaym/i3wm/start.sh | 3 - dotfiles-old/.config/displaym/i3wm/sxhkdrc | 27 --- .../.config/displaym/merge_sxhkdrc.sh | 3 - .../.config/displaym/merge_xinitrc.sh | 2 - dotfiles-old/.config/displaym/sxhkdrc | 50 ----- dotfiles-old/.config/i3/config | 144 ------------ dotfiles-old/.config/i3status/config | 53 ----- dotfiles-old/.config/sxhkd/sxhkdrc-base | 52 ----- dotfiles-old/.config/ytfeed-config.txt | 8 - dotfiles-old/.ctwmrc | 110 --------- dotfiles-old/.env | 10 - dotfiles-old/.profile | 13 -- dotfiles-old/.vimrc | 18 -- dotfiles-old/README.md | 16 +- dotfiles-old/bin/autotranslate | 11 - dotfiles-old/bin/batterymonitor | 54 ----- dotfiles-old/bin/data | 211 ------------------ dotfiles-old/bin/mnt | 36 --- dotfiles-old/bin/music | 39 ---- dotfiles-old/bin/rotate | 33 --- dotfiles-old/bin/transform | 12 - dotfiles-old/bin/translate | 85 ------- dotfiles-old/bin/volume | 146 ------------ dotfiles-old/clone.sh | 24 -- dotfiles-old/knowledge/audio | 42 ---- dotfiles-old/knowledge/pacman | 32 --- dotfiles-old/licenses/DMENU | 30 --- dotfiles-old/manifest_dir | 13 -- dotfiles-old/manifest_file | 24 -- dotfiles-old/misc/PKGBUILD_doas-sudo | 17 -- dotfiles-old/misc/README.txt | 38 ---- dotfiles-old/misc/arch_yay.sh | 13 -- dotfiles-old/misc/cc.sh | 15 -- dotfiles-old/misc/cdecho.sh | 4 - dotfiles-old/misc/dash_sh.sh | 18 -- dotfiles-old/misc/doas-sudo.sh | 12 - dotfiles-old/misc/dotfiles.sh | 45 ---- dotfiles-old/misc/dsic.sh | 9 - dotfiles-old/misc/grammy/icons.sh | 31 --- dotfiles-old/misc/grammy/image.sh | 38 ---- dotfiles-old/misc/motd | 8 - dotfiles-old/misc/nmap.sh | 30 --- dotfiles-old/misc/oneliners.sh | 45 ---- dotfiles-old/misc/sic.sh | 6 - dotfiles-old/misc/spacer.sh | 8 - dotfiles-old/packages/all | 74 ------ dotfiles-old/packages/alpine_apk | 12 - dotfiles-old/packages/arch_pacman | 1 - dotfiles-old/packages/artix_pacman | 7 - dotfiles-old/packages/bootstrap | 8 - .../packages/common-arch_pacman-artix_pacman | 35 --- .../packages/common-arch_yay-artix_yay | 24 -- .../common-arch_yay-artix_yay-debian_apt | 2 - dotfiles-old/packages/debian_apt | 5 - dotfiles-old/src/dmenu/config.h | 27 --- 67 files changed, 2 insertions(+), 2033 deletions(-) delete mode 100644 dotfiles-old/.Xresources delete mode 100755 dotfiles-old/.aliases delete mode 100755 dotfiles-old/.config/bspwm/bspwmrc delete mode 100644 dotfiles-old/.config/displaym/.xinitrc delete mode 100644 dotfiles-old/.config/displaym/bspwm/.xinitrc delete mode 100755 dotfiles-old/.config/displaym/bspwm/start.sh delete mode 100644 dotfiles-old/.config/displaym/bspwm/sxhkdrc delete mode 100644 dotfiles-old/.config/displaym/ctwm/.xinitrc delete mode 100755 dotfiles-old/.config/displaym/ctwm/start.sh delete mode 100755 dotfiles-old/.config/displaym/default_sxhkdrc.sh delete mode 100755 dotfiles-old/.config/displaym/default_xinitrc.sh delete mode 100644 dotfiles-old/.config/displaym/i3wm/.xinitrc delete mode 100644 dotfiles-old/.config/displaym/i3wm/start.sh delete mode 100755 dotfiles-old/.config/displaym/i3wm/sxhkdrc delete mode 100755 dotfiles-old/.config/displaym/merge_sxhkdrc.sh delete mode 100755 dotfiles-old/.config/displaym/merge_xinitrc.sh delete mode 100755 dotfiles-old/.config/displaym/sxhkdrc delete mode 100644 dotfiles-old/.config/i3/config delete mode 100644 dotfiles-old/.config/i3status/config delete mode 100755 dotfiles-old/.config/sxhkd/sxhkdrc-base delete mode 100644 dotfiles-old/.config/ytfeed-config.txt delete mode 100644 dotfiles-old/.ctwmrc delete mode 100644 dotfiles-old/.env delete mode 100644 dotfiles-old/.profile delete mode 100644 dotfiles-old/.vimrc delete mode 100755 dotfiles-old/bin/autotranslate delete mode 100755 dotfiles-old/bin/batterymonitor delete mode 100755 dotfiles-old/bin/data delete mode 100755 dotfiles-old/bin/mnt delete mode 100755 dotfiles-old/bin/music delete mode 100755 dotfiles-old/bin/rotate delete mode 100755 dotfiles-old/bin/transform delete mode 100755 dotfiles-old/bin/translate delete mode 100755 dotfiles-old/bin/volume delete mode 100755 dotfiles-old/clone.sh delete mode 100644 dotfiles-old/knowledge/audio delete mode 100644 dotfiles-old/knowledge/pacman delete mode 100644 dotfiles-old/licenses/DMENU delete mode 100644 dotfiles-old/manifest_dir delete mode 100644 dotfiles-old/manifest_file delete mode 100644 dotfiles-old/misc/PKGBUILD_doas-sudo delete mode 100644 dotfiles-old/misc/README.txt delete mode 100755 dotfiles-old/misc/arch_yay.sh delete mode 100644 dotfiles-old/misc/cc.sh delete mode 100644 dotfiles-old/misc/cdecho.sh delete mode 100644 dotfiles-old/misc/dash_sh.sh delete mode 100755 dotfiles-old/misc/doas-sudo.sh delete mode 100755 dotfiles-old/misc/dotfiles.sh delete mode 100755 dotfiles-old/misc/dsic.sh delete mode 100644 dotfiles-old/misc/grammy/icons.sh delete mode 100755 dotfiles-old/misc/grammy/image.sh delete mode 100644 dotfiles-old/misc/motd delete mode 100644 dotfiles-old/misc/nmap.sh delete mode 100755 dotfiles-old/misc/oneliners.sh delete mode 100755 dotfiles-old/misc/sic.sh delete mode 100755 dotfiles-old/misc/spacer.sh delete mode 100644 dotfiles-old/packages/all delete mode 100644 dotfiles-old/packages/alpine_apk delete mode 100644 dotfiles-old/packages/arch_pacman delete mode 100644 dotfiles-old/packages/artix_pacman delete mode 100644 dotfiles-old/packages/bootstrap delete mode 100644 dotfiles-old/packages/common-arch_pacman-artix_pacman delete mode 100644 dotfiles-old/packages/common-arch_yay-artix_yay delete mode 100644 dotfiles-old/packages/common-arch_yay-artix_yay-debian_apt delete mode 100644 dotfiles-old/packages/debian_apt delete mode 100644 dotfiles-old/src/dmenu/config.h diff --git a/dotfiles-old/.Xresources b/dotfiles-old/.Xresources deleted file mode 100644 index 7eab4dd..0000000 --- a/dotfiles-old/.Xresources +++ /dev/null @@ -1,81 +0,0 @@ -#define AMBER #FFBD00 -#define BLACK #000000 -#define PINK #FFDBDB -#define WHITE #FFFFFF - -#define FOREGROUND PINK -#define BACKGROUND BLACK - -! unscii font -*faceName: unscii:antialias=false -*faceSize: 12 - -*cursorColor: FOREGROUND -*Foreground: FOREGROUND -*Background: BACKGROUND - -! xterm specific stuff -xterm*loginshell: true -xterm*locale: UTF-8 -xterm*titleModes: 16 -xterm*metaSendsEscape: true -xterm*utf8: 1 -xterm*utf8Fonts: 1 -xterm*utf8Title: true - -! I used to use these but they make it really hard to see default Lynx. - -! "quantified colors" but every nybble -! is decremented ====================== -! black/dark-gray -!*.color0: #000000 -!*.color8: #343434 -! red/orange -!*.color1: #DE9591 -!*.color9: #D09E74 -! green/aquamarine -!*.color2: #70B880 -!*.color10: #49BB9E -! amber/yellow -!*.color3: #958350 -!*.color11: #B7B763 -! blue/violet -!*.color4: #92A7DE -!*.color12: #BB9BDC -! magenta/rose -!*.color5: #D592CB -!*.color13: #E190B1 -! cyan/azure -!*.color6: #40B9BC -!*.color14: #63B2D3 -! gray/white -!*.color7: #707070 -!*.color15: #B0B0B0 -! ===================================== - -! "quantified colors" ================= -! black/dark-gray -!*.color0: #101010 -!*.color8: #454545 -! red/orange -!*.color1: #EFA6A2 -!*.color9: #E0AF85 -! green/aquamarine -!*.color2: #80C990 -!*.color10: #5ACCAF -! amber/yellow -!*.color3: #A69460 -!*.color11: #C8C874 -! blue/violet -!*.color4: #A3B8EF -!*.color12: #CCACED -! magenta/rose -!*.color5: #E6A3DC -!*.color13: #F2A1C2 -! cyan/azure -!*.color6: #50CACD -!*.color14: #74C3E4 -! gray/white -!*.color7: #808080 -!*.color15: #C0C0C0 -! ===================================== diff --git a/dotfiles-old/.aliases b/dotfiles-old/.aliases deleted file mode 100755 index 44d9946..0000000 --- a/dotfiles-old/.aliases +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -# audio drive -#alias audio="sudo mount -L 'AUDIO' /mnt/audio" - -alias awk="nawk" -alias b="$BROWSER" -alias cls="clear" -alias cp="cp -iv" -alias doas="$SUDO" -alias e="$EDITOR" -alias ipconfig="ifconfig" -#alias ls="9 ls" -alias ls="ls -1A" -alias mpv="LIBGL_ALWAYS_SOFTWARE=1 mpv --vo=x11" -alias mullvad="curl https://am.i.mullvad.net/connected" -alias mv="mv -iv" -alias p="ping 1.1.1.1" - -# media hard drive -alias partone="sudo mount -L 'PARTONE' /mnt/partone" -alias prat="$HOME/src/packrat/prat" - -pyenv() { - eq $# 0 \ - && . ./bin/activate \ - || . $1/bin/activate -} - -alias sensors="watch sensors" -alias sudo="$SUDO" - -# Wacom Intuos 2 -#alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1" -#alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1" - -alias units="units --history /dev/null" -alias v="$VISUAL" -alias weather="curl wttr.in/lewiston+maine?m" - -webm() { - ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis "$(printf "%b" "$1" | awk -F '.' '{print $1}')".webm -} - -alias y=youtube-dl -alias yay="paru" diff --git a/dotfiles-old/.config/bspwm/bspwmrc b/dotfiles-old/.config/bspwm/bspwmrc deleted file mode 100755 index fc2d5b7..0000000 --- a/dotfiles-old/.config/bspwm/bspwmrc +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -bspc config active_border_color '#FFCACA' -bspc config focus_follows_pointer true -bspc config focused_border_color '#FFFFFF' -bspc config normal_border_color '#FFDBDB' -bspc config window_gap 0 -bspc monitor -d 1 2 3 4 5 6 7 8 9 10 -bspc rule -a XClock manage=off # thanks emanuele6 -bspc rule -a xload manage=off -xdo lower -NXClock -xdo lower -Nxload -data | lemonbar -bf '-*-unscii-*-*-*-*-*-*-*-*-*-*-*-*' -F '#FFDBDB' diff --git a/dotfiles-old/.config/displaym/.xinitrc b/dotfiles-old/.config/displaym/.xinitrc deleted file mode 100644 index e27a3aa..0000000 --- a/dotfiles-old/.config/displaym/.xinitrc +++ /dev/null @@ -1,22 +0,0 @@ -set -x -# load X default stuff -! [ -e $HOME/.Xresources ] \ - || xrdb -load $HOME/.Xresources -# wallpaper -WALLPAPER="$HOME/Pictures/Wallpapers/nosebleed.jpg" -! [ -e "$WALLPAPER" ] \ - || feh --bg-center "$WALLPAPER" -# internal display -xrandr \ - --output "$(xrandr | grep ' connected ' | awk '{print $1}' | grep LVDS)" \ - --mode 1280x800 --rate 60.00 -# VGA monitor -if xrandr | grep " connected " | awk '{ print$1 }' | grep "VGA" >/dev/null 2>&1; then - ! [ "$MONITOR" = "MV720" ] \ - || xrandr \ - --output "$(xrandr | grep ' connected ' | awk '{print $1}' | grep VGA)" \ - --above "$(xrandr | grep ' connected ' | awk '{print $1}' | grep LVDS)" \ - --mode 1024x768 --rate 85.00 -fi -# keybind manager -pgrep -x sxhkd >/dev/null || sxhkd & diff --git a/dotfiles-old/.config/displaym/bspwm/.xinitrc b/dotfiles-old/.config/displaym/bspwm/.xinitrc deleted file mode 100644 index ac7f120..0000000 --- a/dotfiles-old/.config/displaym/bspwm/.xinitrc +++ /dev/null @@ -1 +0,0 @@ -exec bspwm diff --git a/dotfiles-old/.config/displaym/bspwm/start.sh b/dotfiles-old/.config/displaym/bspwm/start.sh deleted file mode 100755 index 621ceaf..0000000 --- a/dotfiles-old/.config/displaym/bspwm/start.sh +++ /dev/null @@ -1,3 +0,0 @@ -. "$DISPLAYM_CONFIG/merge_xinitrc.sh" -. "$DISPLAYM_CONFIG/merge_sxhkdrc.sh" -startx diff --git a/dotfiles-old/.config/displaym/bspwm/sxhkdrc b/dotfiles-old/.config/displaym/bspwm/sxhkdrc deleted file mode 100644 index f279101..0000000 --- a/dotfiles-old/.config/displaym/bspwm/sxhkdrc +++ /dev/null @@ -1,22 +0,0 @@ -# thanks weedsmokingjew - -mod1 + {_,shift + }F4 - bspc node -{c,k} - -mod1 + {_,shift + }{1-4,q,w,e,r,a,s} - bspc {desktop -f,node -d} '^{1-4,5,6,7,8,9,10}' - -mod1 + shift + e - [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && bspc quit - -mod1 + f - bspc node -t '~fullscreen' - -mod1 + {h,j,k,l} - bspc node -f {west,south,north,east} - -mod1 + shift + {h,j,k,l} - bspc node -s {west,south,north,east} - -mod1 + shift + r - bspc wm -r && pkill -USR1 -x sxhkd diff --git a/dotfiles-old/.config/displaym/ctwm/.xinitrc b/dotfiles-old/.config/displaym/ctwm/.xinitrc deleted file mode 100644 index cfd4e86..0000000 --- a/dotfiles-old/.config/displaym/ctwm/.xinitrc +++ /dev/null @@ -1,7 +0,0 @@ -# xclock -xclock -geometry 180x180-10+10 -update 1 & -# xload -xload -geometry 180x180-10+200 -update 1 & -# bar -data | lemonbar -bf '-*-unscii-*-*-*-*-*-*-*-*-*-*-*-*' -F '#FFDBDB' & -exec ctwm diff --git a/dotfiles-old/.config/displaym/ctwm/start.sh b/dotfiles-old/.config/displaym/ctwm/start.sh deleted file mode 100755 index 9cdb9b4..0000000 --- a/dotfiles-old/.config/displaym/ctwm/start.sh +++ /dev/null @@ -1,3 +0,0 @@ -. "$DISPLAYM_CONFIG/merge_xinitrc.sh" -. "$DISPLAYM_CONFIG/default_sxhkdrc.sh" -startx diff --git a/dotfiles-old/.config/displaym/default_sxhkdrc.sh b/dotfiles-old/.config/displaym/default_sxhkdrc.sh deleted file mode 100755 index 67a4866..0000000 --- a/dotfiles-old/.config/displaym/default_sxhkdrc.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cp "$DISPLAYM_CONFIG/sxhkdrc" "$HOME/.config/sxhkd/sxhkdrc" diff --git a/dotfiles-old/.config/displaym/default_xinitrc.sh b/dotfiles-old/.config/displaym/default_xinitrc.sh deleted file mode 100755 index 1e49eb8..0000000 --- a/dotfiles-old/.config/displaym/default_xinitrc.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cp "$DISPLAYM_CONFIG/.xinitrc" "$HOME/.xinitrc" diff --git a/dotfiles-old/.config/displaym/i3wm/.xinitrc b/dotfiles-old/.config/displaym/i3wm/.xinitrc deleted file mode 100644 index ba0c6ef..0000000 --- a/dotfiles-old/.config/displaym/i3wm/.xinitrc +++ /dev/null @@ -1 +0,0 @@ -exec i3 diff --git a/dotfiles-old/.config/displaym/i3wm/start.sh b/dotfiles-old/.config/displaym/i3wm/start.sh deleted file mode 100644 index 51d504d..0000000 --- a/dotfiles-old/.config/displaym/i3wm/start.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -. "$DISPLAYM_CONFIG/merge_xinitrc.sh" -. "$DISPLAYM_CONFIG/merge_sxhkdrc.sh" diff --git a/dotfiles-old/.config/displaym/i3wm/sxhkdrc b/dotfiles-old/.config/displaym/i3wm/sxhkdrc deleted file mode 100755 index 943fcaa..0000000 --- a/dotfiles-old/.config/displaym/i3wm/sxhkdrc +++ /dev/null @@ -1,27 +0,0 @@ -mod1 + F4 - i3-msg kill - -mod1 + {h,j,k,l} - i3-msg focus {left,down,up,right} - -mod1 + f - i3-msg fullscreen toggle -mod1 + F11 - i3-msg fullscreen toggle - -mod1 + {s,w} - i3-msg layout {stacking,tabbed} -mod1 + e - i3-msg layout toggle split - -mod1 + space - i3-msg focus mode_toggle - -mod1 + shift + space - i3-msg floating toggle - -mod1 + shift + {h,j,k,l} - i3-msg move {left,down,up,right} - -mod1 + shift + e - [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit? This will end your X session.") ] && i3-msg exit diff --git a/dotfiles-old/.config/displaym/merge_sxhkdrc.sh b/dotfiles-old/.config/displaym/merge_sxhkdrc.sh deleted file mode 100755 index 0d82330..0000000 --- a/dotfiles-old/.config/displaym/merge_sxhkdrc.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cat "$DISPLAYM_CONFIG/sxhkdrc" "$DISPLAYM_CONFIG/$WM/sxhkdrc" \ - >"$HOME/.config/sxhkd/sxhkdrc" diff --git a/dotfiles-old/.config/displaym/merge_xinitrc.sh b/dotfiles-old/.config/displaym/merge_xinitrc.sh deleted file mode 100755 index 6f8e4ed..0000000 --- a/dotfiles-old/.config/displaym/merge_xinitrc.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cat "$DISPLAYM_CONFIG/.xinitrc" "$DISPLAYM_CONFIG/$WM/.xinitrc" >"$HOME/.xinitrc" diff --git a/dotfiles-old/.config/displaym/sxhkdrc b/dotfiles-old/.config/displaym/sxhkdrc deleted file mode 100755 index c9d0447..0000000 --- a/dotfiles-old/.config/displaym/sxhkdrc +++ /dev/null @@ -1,50 +0,0 @@ -XF86AudioMute - volume m -XF86Audio{Lower,Raise}Volume - volume r {-5,5} -XF86Launch1 - $TERMINAL - -XF86TaskPane - rotate LVDS1 - -control + shift + Escape - $TERMINAL -e htop -Print - scrot - -mod1 + {9,0} - volume r {-5,5} -# cred 4 https://github.com/patrickbolle/dotfiles/ -mod1 + equal - light -A 5 -mod1 + shift + equal - light -A 1 -mod1 + minus - light -U 5 -mod1 + shift + minus - light -U 1 - -mod1 + shift + r - pkill -USR1 sxhkd - -mod1 + t - dmenu="dmenu -fn unscii -nb '#000' -nf '#FFDBDB' -sb '#FFDBDB' -sf '#000'" autotranslate - -mod1 + shift + i - pkill dmenubar - -mod1 + d - dmenu_run -fn unscii -nb '#000' -nf '#FFDBDB' -p '$' -sb '#FFDBDB' -sf '#000' - -mod1 + Return - $TERMINAL - -mod1 + v - $TERMINAL -e aiomixer - -mod1 + b - $BROWSER - -mod1 + m - volume m diff --git a/dotfiles-old/.config/i3/config b/dotfiles-old/.config/i3/config deleted file mode 100644 index 834d743..0000000 --- a/dotfiles-old/.config/i3/config +++ /dev/null @@ -1,144 +0,0 @@ -# i3 config file (v4) -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod1 - -# Font for window titles -font pango:unscii 12 - -# keybindings -exec_always --no-startup-id sxhkd - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start pulseaudio -exec --no-startup-id pulseaudio --start - -# 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" -set $ws2 "2" -set $ws3 "3" -set $ws4 "4" -set $ws5 "5" -set $ws6 "6" -set $ws7 "7" -set $ws8 "8" -set $ws9 "9" -set $ws10 "10" - -# switch to workspace -bindsym $mod+1 workspace number $ws1 -bindsym $mod+2 workspace number $ws2 -bindsym $mod+3 workspace number $ws3 -bindsym $mod+4 workspace number $ws4 -bindsym $mod+5 workspace number $ws5 -bindsym $mod+6 workspace number $ws6 -bindsym $mod+7 workspace number $ws7 -bindsym $mod+8 workspace number $ws8 -bindsym $mod+9 workspace number $ws9 -bindsym $mod+0 workspace number $ws10 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace number $ws1 -bindsym $mod+Shift+2 move container to workspace number $ws2 -bindsym $mod+Shift+3 move container to workspace number $ws3 -bindsym $mod+Shift+4 move container to workspace number $ws4 -bindsym $mod+Shift+5 move container to workspace number $ws5 -bindsym $mod+Shift+6 move container to workspace number $ws6 -bindsym $mod+Shift+7 move container to workspace number $ws7 -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 - -# 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+e exec [ "Yes." = $(printf "No.\nYes." | dmenu -p "You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.") ] && i3-msg exit - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # 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 j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - -bindsym $mod+r mode "resize" - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - status_command i3status - separator_symbol " // " - -# defaults -# colors { -# background #ffffff -# statusline #000000 -# separator #ff0000 -# focused_workspace #4c7899 #285577 #ffffff -# active_workspace #333333 #5f676a #ffffff -# inactive_workspace #333333 #222222 #888888 -# urgent_workspace #2f343a #900000 #ffffff -# binding_mode #2f343a #900000 #ffffff -# } - - colors { - background #ffdbdb - statusline #000000 - separator #ff0000 - # border bg text - focused_workspace #ff0000 #ff0000 #ffffff - active_workspace #ffffff #ffffff #000000 - inactive_workspace #000000 #000000 #ffffff - urgent_workspace #2f343a #900000 #ff0000 - binding_mode #2f343a #900000 #ffffff - } -} - -# color customization -# class border bg text indicator child_border -client.focused #ff0000 #ffffff #ff0000 #2e9ef4 #ff0000 -client.focused_inactive #ffffff #ffffff #000000 #484e50 #000000 -client.unfocused #000000 #000000 #ff0000 #292d2e #ffffff -client.urgent #900000 #900000 #ffffff #900000 #900000 -client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c - -client.background #ffffff - -# Wallpaper -exec --no-startup-id feh --bg-center /home/trinity/Pictures/Wallpapers/akirablast.jpg - -# moving workspaces -bindsym $mod+Shift+greater move container to output right -bindsym $mod+Shift+less move container to output left - -# Gaps -#gaps inner 10 -#gaps outer 10 -#gaps horizontal 10 -#gaps vertical 10 -#gaps top 10 -#gaps right 10 -#gaps bottom 10 -#gaps left 10 - -# disables titlebars -new_window 1pixel diff --git a/dotfiles-old/.config/i3status/config b/dotfiles-old/.config/i3status/config deleted file mode 100644 index 8429036..0000000 --- a/dotfiles-old/.config/i3status/config +++ /dev/null @@ -1,53 +0,0 @@ -# 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 = false - 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 = "wlan0: (%quality at %essid) %ip" - format_down = "wlan0 DOWN" -} - -ethernet _first_ { - format_up = "eth0: %ip (%speed)" - format_down = "eth0 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 = "%Y-%m-%dT%H:%M:%S" -} diff --git a/dotfiles-old/.config/sxhkd/sxhkdrc-base b/dotfiles-old/.config/sxhkd/sxhkdrc-base deleted file mode 100755 index c1c3bdd..0000000 --- a/dotfiles-old/.config/sxhkd/sxhkdrc-base +++ /dev/null @@ -1,52 +0,0 @@ -XF86AudioMicMute - pactl set-source-mute @DEFAULT_SOURCE@ toggle -XF86AudioMute - pactl -- set-sink-mute @DEFAULT_SINK@ toggle -XF86Audio{Lower,Raise}Volume - pactl set-sink-volume @DEFAULT_SINK@ {"-5%","+5%"} -XF86Audio{Play,Pause,Next,Prev} - playerctl {play,pause,next,previous} -XF86Launch1 - $TERMINAL - -control + shift + Escape - $TERMINAL -e htop -Print - scrot - -# cred 4 https://github.com/patrickbolle/dotfiles/ -mod1 + equal - light -A 5 -mod1 + shift + equal - light -A 1 -mod1 + minus - light -U 5 -mod1 + shift + minus - light -U 1 - -mod1 + shift + r - pkill -USR1 sxhkd - -mod1 + i - ps aux | grep dmenubar | grep -v grep && pkill dmenubar; \ - data | /home/trinity/src/dmenubar/dmenubar -b - -mod1 + shift + i - pkill dmenubar - -mod1 + d - dmenu_run - -mod1 + Return - $TERMINAL - -mod1 + v - $TERMINAL -e pulsemixer - -mod1 + b - $BROWSER - -mod1 + m - pactl -- set-sink-mute @DEFAULT_SINK@ toggle -mod1 + shift + m - pactl set-source-mute @DEFAULT_SOURCE@ toggle diff --git a/dotfiles-old/.config/ytfeed-config.txt b/dotfiles-old/.config/ytfeed-config.txt deleted file mode 100644 index 5cc802f..0000000 --- a/dotfiles-old/.config/ytfeed-config.txt +++ /dev/null @@ -1,8 +0,0 @@ -auto_refresh_feeds: -1 -cap: 200 -consumption_file_name: /home/trinity/.ytfeed/consumption.txt -feed_directory: /home/trinity/.ytfeed/feeds/ -xml_storage_directory: /home/trinity/.ytfeed/feeds/ -video_downloader: youtube-dlp -viewer: youtube-dl-mpv -web_browser: firefox-developer-edition diff --git a/dotfiles-old/.ctwmrc b/dotfiles-old/.ctwmrc deleted file mode 100644 index 27f4176..0000000 --- a/dotfiles-old/.ctwmrc +++ /dev/null @@ -1,110 +0,0 @@ -# BEGIN ctwmrc -# thanks to https://datagubbe.se/twm/ -NoDefaults -DontShowWelcomeWindow - -# fonts -TitleFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" -ResizeFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" -MenuFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" -IconFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" -IconManagerFont "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1" - -Color { - TitleBackground "#FFDBDB" - TitleForeground "#000000" - BorderColor "#FFDBDB" - BorderTileBackground "#206090" - BorderTileForeground "#206090" - - MenuBackground "Gray" - MenuForeground "Black" - MenuShadowColor "#004070" - MenuTitleBackground "#C06077" - MenuTitleForeground "White" -} - -WindowRing -WindowRingExclude { - "xload" - "xclock" -} - -Cursors { - Frame "left_ptr" - Title "left_ptr" - Icon "left_ptr" - IconMgr "hand2" - Move "fleur" - Resize "fleur" - Menu "sb_left_arrow" - Button "hand2" - Wait "watch" - Select "dot" - Destroy "pirate" -} - -NoBorder { - "xclock" - "xload" -} - -NoTitle { - "TWM Icon Manager" - "xload" - "xclock" - "feh" - "xeyes" -} - -Function "move-and-raise" { - f.move - f.deltastop - f.raise -} - -Function "deiconify-and-raise" { - f.deiconify - f.raise -} -Function "next-and-raise" { - f.downiconmgr - f.raise -} - -Button3 = : root : f.menu "apps" - -Button1 = : title : f.function "move-and-raise" -Button2 = : title : f.delete -Button3 = : title : f.menu "winops" -Button1 = : frame : f.function "move-and-raise" -Button2 = : frame : f.nop -Button3 = : frame : f.resize - -Button1 = : iconmgr : f.function "deiconify-and-raise" -Button2 = : iconmgr : f.lower -Button3 = : iconmgr : f.iconify - -# on NetBSD with non-modular Xorg, bitmaps are stored in -# /usr/X11R7/include/X11/bitmaps -LeftTitleButton ":xlogo" = f.menu "winops" -RightTitleButton "vertmax.xbm" = f.zoom -RightTitleButton "close.xbm" = f.delete - -menu "winops" { - "Delete" f.delete - "Destroy" f.destroy - "Fullscreen Zoom" f.fullscreenzoom - "Full Zoom" f.fullzoom - "Identify" f.identify - "Initial size" f.initsize -} - -# Workspace Menu -menu "apps" { - "Workspace" f.title - "Restart" f.restart - "Exit" f.quit -} - -# END twmrc diff --git a/dotfiles-old/.env b/dotfiles-old/.env deleted file mode 100644 index ad8b536..0000000 --- a/dotfiles-old/.env +++ /dev/null @@ -1,10 +0,0 @@ -if [ "$0" = "bash" ] || [ "$0" = "-bash" ]; then complete -c man which; fi - -PS1="; " -PS2="; " -PS3="; " - -set -o vi - -. $HOME/.aliases -. $HOME/.cargo/env diff --git a/dotfiles-old/.profile b/dotfiles-old/.profile deleted file mode 100644 index 80605d7..0000000 --- a/dotfiles-old/.profile +++ /dev/null @@ -1,13 +0,0 @@ -BROWSER=firefox; export BROWSER -DOOMWADDIR=/mnt/partone/misc/doomwads/; export DOOMWADDIR -EDITOR=ed; export EDITOR -PAGER="less"; export PAGER -PLAN9=/usr/local/plan9; export PLAN9 -PATH="$HOME/bin/:$HOME/bin/oneliners/:"$PATH":/usr/pkg/qt5/bin:$PLAN9/bin"; export PATH -SUDO="doas"; export SUDO -TERMINAL="uxterm"; export TERMINAL -UNITS_SYSTEM="si"; export UNITS_SYSTEM -VISUAL=vi; export VISUAL - -ENV=$HOME/.env; export ENV -. $ENV diff --git a/dotfiles-old/.vimrc b/dotfiles-old/.vimrc deleted file mode 100644 index 70e2bf6..0000000 --- a/dotfiles-old/.vimrc +++ /dev/null @@ -1,18 +0,0 @@ -set bg=dark -set mouse= -set nocp -set noexpandtab -set noim -set nois -set nu -set relativenumber -set rnu -set ruler -set tabstop=8 -set term=xterm -set tf -set title -set tty=xterm -set vb -set nowrap -syntax on diff --git a/dotfiles-old/README.md b/dotfiles-old/README.md index fce237e..cfd41df 100644 --- a/dotfiles-old/README.md +++ b/dotfiles-old/README.md @@ -1,19 +1,7 @@ -# devenblake/dotfiles +# trinity/dotfiles Pretty config stuff. ![This is a screenshot of my desktop.](https://web.archive.org/web/20200926155417if_/https://i.redd.it/jwhsmokcfcp51.png) For this configuration, [posted on r/unixporn on 2020-09-25](https://www.reddit.com/r/unixporn/comments/izpvwp/i3gaps_basic_but_it_works/), refer to the [state of the repository around 2020-09-26](https://git.sr.ht/~trinity/dotfiles/tree/7d0a35b6d06c2bb46990087c6a6c4b2a2685d49c) or so. -My setup has changed drastically since then. - -My shell aliases are in `.aliases` and my general shell configuration is in `.env`. -I use `dash` as my shell. I sort of miss tab-completion but it's worth it so I know everything I do is reproducible. - -Refer to `scripts/` for scripts that help me keep everything organized, except for `clone.sh` (which clones all my dotfiles to `~/src/dotfiles/`, where I keep my local copy of this repo). - -A list of all the packages I use is available in `scripts/packages/`, organized by repository availability. - -## License - -See `LICENSE` for the repository license if you want but basically all code, unless otherwise stated, is released unencumbered into the public domain. -A notable exception to this is `src/dmenu/config.h` which is licensed under the MIT/X Consortium license as is dmenu; this license can be found in `licenses/DMENU`. +See [trinity/src](https://git.sr.ht/~trinity/src) where these dotfiles have relocated. diff --git a/dotfiles-old/bin/autotranslate b/dotfiles-old/bin/autotranslate deleted file mode 100755 index 7d7bdc3..0000000 --- a/dotfiles-old/bin/autotranslate +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -[ -n "$dmenu" ] || dmenu=dmenu - -lang="$LANG" -# lots of potentially wrong assumptions here -printf "%s\n" "$lang" | grep "_" >/dev/null 2>&1 \ - && lang="$(printf "%s\n" "$lang" | cut -d '_' -f 1)" \ - || lang=en - -printf "%s\n" "$(xclip -o)" | translate auto $lang | "$($dmenu -p "Press Enter to dismiss.")" diff --git a/dotfiles-old/bin/batterymonitor b/dotfiles-old/bin/batterymonitor deleted file mode 100755 index fb6de6c..0000000 --- a/dotfiles-old/bin/batterymonitor +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -POLLING_FREQUENCY=1 - -# ISO 8601 -alias date="date '+%Y-%m-%dT%T'" - -emit() { - printf "[%s] " "$(date)" - echo "$@" -} -get_current_level() { - # adapted from other script i wrote, also in the public domain - if [ "$(uname)" = "Linux" ]; then - # this is a dirty hack. - # acpi | awk '{print $4}' will print the battery percentage, - # and s/,$// strips the trailing comma. - # acpi -a will just print the power adapter status. - printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//')" - return 0 - elif [ "$(uname)" = "NetBSD" ]; then - printf "%b" "$(envstat -s acpibat0:charge \ - | sed 1,2d \ - | cut -d ':' -f 2 \ - | awk '{print $1}' \ - | cut -d '.' -f 1)" - return 0 - else - printf "get_battery_status: unsupported OS" >>/dev/stderr - return 1 - fi -} - -! get_current_level >/dev/null \ - && printf "Unable to get battery status on this system.\n" >>/dev/stderr \ - && exit 1 \ - || true - -current_level=$(get_current_level) -previous_level=$current_level - -emit "$(printf "Current level: %d%%" "$current_level")" - -while true; do - current_level=$(get_current_level) - if ! [ $current_level -eq $previous_level ]; then - [ $current_level -lt $previous_level ] \ - && emit "$(printf "Discharged: %d%% -> %d%%\n" $previous_level $current_level )" \ - || emit "$(printf " Charged: %d%% -> %d%%\n" $previous_level $current_level )" - previous_level=$current_level - fi - - sleep $POLLING_FREQUENCY -done diff --git a/dotfiles-old/bin/data b/dotfiles-old/bin/data deleted file mode 100755 index 08fe086..0000000 --- a/dotfiles-old/bin/data +++ /dev/null @@ -1,211 +0,0 @@ -#!/bin/sh - -set -e - -# depends on https://git.sr.ht/~trinity/utilities (particularly fdivide(1), -# gt(1), and stris(1)) -# there are issues with the POSIX shell implementations included in this script -# and particularly with stris - -# on Linux only: -# these files (separated by newlines) will have the current CPU temperature -# multiplied by $CPU_TEMP_SCALE. this script divides the file contents by scale -# and displays that temperature (assumed to be in Celsius units) -CPU_TEMP_FILES="/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp2_input -/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp3_input" -CPU_TEMP_SCALE=1000 - -# format for the date (by default in this script, ISO 8601) -alias date="date '+%Y-%m-%dT%T'" - -DELIMITER=" || " - -# how fast to refresh the display (in seconds, will be substituted with 1 if -# not an integer) -INTERVAL=1 - -# enable if you have issues with missing `stris` etc. will save negligible time -# with shells that don't spawn new processes for test(1) -# fdivide_posix() may not be fully working yet, so it's not enabled by default -#POSIXLY_CORRECT=1 - -# this URL will have in plain text the public IP address from which it was -# accessed -#PUBLIC_IP_FETCH_URL="http://ifconfig.io/" -#PUBLIC_IP_FETCH_URL="https://ifconfig.io" -#PUBLIC_IP_FETCH_URL="http://icanhazip.com" -PUBLIC_IP_FETCH_URL="https://icanhazip.com" -PUBLIC_IP6_FETCH_URL="$PUBLIC_IP_FETCH_URL" - -get_battery_status() { - if [ "$(uname)" = "Linux" ]; then - # this is a dirty hack. - # acpi | awk '{print $4}' will print the battery percentage, - # and s/,$// strips the trailing comma. - # acpi -a will just print the power adapter status. - printf "%b" "$(acpi | awk '{print $4}' | sed 's/,$//') ($(acpi -a))" - return - elif [ "$(uname)" = "NetBSD" ]; then - printf "%b%%" "$(envstat -s acpibat0:charge \ - | sed 1,2d \ - | cut -d ':' -f 2 \ - | awk '{print $1}' \ - | cut -d '.' -f 1)" - return - else - printf "get_battery_status: unsupported OS" - fi -} - -get_cpu_temp() { - if [ "$(uname)" = "Linux" ]; then - RETVAL="" - # iterate over files, adjust, print out "%dC " - for file in $CPU_TEMP_FILES; - do RETVAL="$RETVAL$(fdivide $(cat $file) $CPU_TEMP_SCALE)C " - done - # in-line python (bet you've never seen that before) that - # strips off trailing whitespace. could be done with sed but - # this was more fun - printf "%b" "$RETVAL" \ - | python -c "from sys import stdin; print(stdin.read().rstrip() + '\n')" - return - elif [ "$(uname)" = "NetBSD" ]; then - printf "%bC" "$(envstat -s coretemp0:'cpu0 temperature' \ - | sed 1,2d \ - | cut -d ':' -f 2 \ - | awk '{print $1}' \ - | cut -d '.' -f 1)" - return - else - printf "get_cpu_temp: unsupported OS" - fi -} - -get_current_desktop() { - case "$WM" in - (bspwm) printf "[%b] " "$(bspc query -D -d focused --names)" ;; - esac -} - -get_memory_usage() { - if [ "$(uname)" = "Linux" ]; then - printf "%b" \ - "$(free | head -n 2 | tail -n 1 \ - | awk '{print $3 " used / " $2 " total"}')" - return - fi -} - -get_public_ip() { - PUBLIC_IP4="$(curl -4 "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \ - || printf "-1")" - PUBLIC_IP6="$(curl -6 "$PUBLIC_IP6_FETCH_URL" --no-progress-meter 2>/dev/null \ - || printf "-1")" - if [ "$PUBLIC_IP4" = "-1" ] && [ "$PUBLIC_IP6" = "-1" ]; then - printf "[error fetching address]" - elif [ "$PUBLIC_IP4" = "-1" ]; then - printf "%b" "$PUBLIC_IP6" - elif [ "$PUBLIC_IP6" = "-1" ]; then - printf "%b" "$PUBLIC_IP4" - else - printf "%b / %b" "$PUBLIC_IP4" "$PUBLIC_IP6" - fi - return -} - -# slow, so fetch it in advance -PUBLIC_IP="$(get_public_ip)" - -printbar() { - printf "%b" "$(get_current_desktop)" - printf "%b" "$(date)" - printf "%b" "$DELIMITER" - printf "%b" "BAT: $(get_battery_status)" - printf "%b" "$DELIMITER" - printf "%b" "CPU: $(get_cpu_temp)" - printf "%b" "$DELIMITER" - printf "%b" "PuIP: $PUBLIC_IP" - #printf "%b" "$DELIMITER" - #printf "%b" "MEM: $(get_memory_usage)" - printf "\n" - return -} - -############################################################################### -# the following is for error prevention and doesn't need to be changed # -############################################################################### - -# POSIX shell version of fdivide -fdivide_posix() { - [ -n "$2" ] && [ -n "$1" ] && [ -z "$3" ] \ - || return 1 - printf "%b\n" "$(($1/$2))" - return -} - -# [ -gt ] with better syntax -gt_posix() { - while [ -n "$2" ]; do - [ "$1" -gt "$2" ] \ - || return 1 - shift 1 - done - return 0 -} - -# limited POSIX shell version of stris -# BROKEN REGEX. MUSTFIX. -stris_posix() { - [ -n "$2" ] || return 1 - case "$1" in - (int) - # https://stackoverflow.com/questions/2210349/test-whether-string-is-a-valid-integer - printf "$2" | grep '^-?[0-9]+$' >/dev/null \ - && return 0 \ - || return 1 - ;; - (uint) - printf "$2" | grep '^[0-9]+$' >/dev/null \ - && return 0 \ - || return 1 - ;; - (*) - return 1 - ;; - esac - return -} - -# check to make sure we have non-standard utilities - -[ -n "$POSIXLY_CORRECT" ] || ! which fdivide >/dev/null 2>&1 \ - && alias fdivide="fdivide_posix" \ - || true - -[ -n "$POSIXLY_CORRECT" ] || ! which gt >/dev/null 2>&1 \ - && alias gt="gt_posix" \ - || true - -[ -n "$POSIXLY_CORRECT" ] || ! which stris >/dev/null 2>&1 \ - && alias stris="stris_posix" \ - || true - -# check to make sure customizeable vars are in proper format - -[ -n "$INTERVAL" ] && stris int "$INTERVAL" \ - || INTERVAL=1 - -[ -n "$CPU_TEMP_SCALE" ] && stris int "$CPU_TEMP_SCALE" \ - && gt "$CPU_TEMP_SCALE" 0 \ - || CPU_TEMP_SCALE=1 - -[ -n "$CPU_TEMP_FILES" ] \ - || alias get_cpu_temp="printf '[no temperature files specified]\n'" - -# main loop - -while true; do - printbar - sleep "$INTERVAL" -done diff --git a/dotfiles-old/bin/mnt b/dotfiles-old/bin/mnt deleted file mode 100755 index 2e6359c..0000000 --- a/dotfiles-old/bin/mnt +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -set -e - -DEV="/dev" -MNT="/mnt" -# will not be split when used -SUDO="doas" - -# preliminary checks -[ -n "$2" ] || [ -z "$1" ] \ - && printf "Usage: %b [device in %b/]\n" "$0" "$DEV" >>/dev/stderr \ - && exit 1 \ - || true - -# no need to priviledge escalate if we're already root -! [ "$(id -u)" = 0 ] \ - || SUDO="" - -# exhaustive checks to ensure $DEV/$1 exists and that $MNT/$1 can be safely used as a mountpoint -! [ -d "$MNT/$1" ] && [ -a "$MNT/$1" ] \ - && printf "%b: '%b/%b' already exists, but isn't a directory.\n" "$0" "$MNT" "$1" >>/dev/stderr \ - && exit 1 \ - || true -[ -d "$MNT/$1" ] \ - || mkdir "$MNT/$1" -! [ "$(ls -A "$MNT/$1" | wc -l | xargs echo)" = 0 ] \ - && printf "%b: '%b/%b' is a directory, but isn't empty.\n" "$0" "$MNT" "$1" >>/dev/stderr \ - && exit 1 \ - || true -! [ -e "/dev/$1" ] \ - && printf "%b: '%b/%b' doesn't exist.\n" "$0" "$DEV" "$1" >>/dev/stderr \ - && exit 1 \ - || true - -# ok, we're safe -"$SUDO" mount "$DEV/$1" "$MNT/$1" diff --git a/dotfiles-old/bin/music b/dotfiles-old/bin/music deleted file mode 100755 index 8c91b6e..0000000 --- a/dotfiles-old/bin/music +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -set -e - -# DistroTube's dm-radio fixed and in POSIX shell - -alias nonzero="test -n" - -nonzero "$MUSIC_PLAYER" || MUSIC_PLAYER=mpv -nonzero "$DMENU" || DMENU=dmenu - -# tab delimits name from URL -STATIONS="\ -50s Rewind https://zeno.fm/radio/50s-rewind/ -60s Rewind https://zeno.fm/radio/60s-rewind/ -70s Rewind https://zeno.fm/radio/70s-rewind/ -80s Rewind https://zeno.fm/radio/80s-rewind/ -90s Rock https://zeno.fm/radio/90s-rock/ -The 2000s https://zeno.fm/radio/the-2000s/ -Classical Radio https://zeno.fm/radio/classical-radio/ -Classical Relaxation https://zeno.fm/radio/radio-christmas-non-stop-classical/ -Classic Rock https://zeno.fm/radio/classic-rockdnb2sav8qs8uv/ -Gangsta49 https://zeno.fm/radio/gangsta49/ -HipHop49 https://zeno.fm/radio/hiphop49/ -Madhouse Country Radio https://zeno.fm/radio/madhouse-country-radio/ -PopMusic https://zeno.fm/radio/popmusic74vyurvmug0uv/ -PopStars https://zeno.fm/radio/popstars/ -RadioMetal https://zeno.fm/radio/radio-metal/ -RocknRoll Radio https://zeno.fm/radio/rocknroll-radio994c7517qs8uv/ -Cancel nop:// -" - -selection="$(printf "%s\n" "$STATIONS" | grep -F "$(printf "%s\n" "$STATIONS" | cut -f 1 | dmenu) ")" - -if [ "$selection" = "Cancel nop://" ] -then exit 0 -fi - -pkill -f http || printf "%s: mpv not running.\n" "$0" 1>&2 -printf "%s\n" "$selection" | cut -f 2 | xargs mpv diff --git a/dotfiles-old/bin/rotate b/dotfiles-old/bin/rotate deleted file mode 100755 index 2195ce5..0000000 --- a/dotfiles-old/bin/rotate +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -set -e - -ROTATION_FILE="$HOME/.rotation" -SCREEN="$1" - -_core(){ - case "$1" in - 1) xrandr --output "$SCREEN" --rotate normal ;; - 2) xrandr --output "$SCREEN" --rotate left ;; - 3) xrandr --output "$SCREEN" --rotate inverted ;; - 4) xrandr --output "$SCREEN" --rotate right ;; - *) return 1 - esac - return 0 -} - -if [ -e "$ROTATION_FILE" ] -then ROTATION="$(dd <"$ROTATION_FILE" 2>/dev/null)" - if ! _core "$ROTATION" - then _core 1 - ROTATION=2 - else ROTATION=$(printf "%s + 1\n" "$ROTATION" | bc) - ! [ "$ROTATION" -gt 4 ] \ - || ROTATION=1 - fi -else _core 1 - ROTATION=2 -fi - -printf "%s\n" "$ROTATION" >"$ROTATION_FILE" - -exit 0 diff --git a/dotfiles-old/bin/transform b/dotfiles-old/bin/transform deleted file mode 100755 index 718e8fc..0000000 --- a/dotfiles-old/bin/transform +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -argv0="$0" -usage(){ - printf "Usage: %s (un) [XRandR output]\n" "$argv0" 1>&2 - exit 64 # sysexits(3) EX_USAGE -} -if [ -n "$2" ] && [ "$1" = un ] -then xrandr --output "$2" --transform none -elif [ -n "$1" ] -then "$DISPLAYM_CONFIG/xrandr_transform.sh" "$1" -else usage -fi diff --git a/dotfiles-old/bin/translate b/dotfiles-old/bin/translate deleted file mode 100755 index f9af8a6..0000000 --- a/dotfiles-old/bin/translate +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python3 - -# googletrans comes with a translate(1) command line application but I don't -# like its UI. - -import sys; - -stdin = sys.stdin; -stdout = sys.stdout; -stderr = sys.stderr; - -_exit = exit; -exit = sys.exit; - -def printf(s, *args): - return fprintf(stdout, s, *args); - -def fprintf(f, s, *args): - printing = s if len(args) == 0 else (s % args); - return f.write(printing); - -try: - import googletrans; -except: - printf( - "%s: This Python script requires the \"googletrans\" library.\n", - sys.argv[0] - ); - -def usage(name): - fprintf( - stderr, "Usage: %s [source language] [destination language]\n", - name - ); - exit(1); - -def main(argc, argv): - accepted_languages = set(list(googletrans.LANGCODES) - + list(googletrans.LANGUAGES) + [ "auto" ]); - good = True; - isatty = stdout.isatty(); - translator = googletrans.Translator(); - - if argc != 3: - usage(argv[0]); - - src = argv[1].lower(); - dest = argv[2].lower(); - for arg in [ src, dest ]: - if not(arg in accepted_languages): - good = False; - fprintf(stderr, - "%s: %s: Language not recognized.\n", - argv[0], arg); - if(not(good)): - fprintf(stderr, "The following languages and language codes are" - + " recognized:\n"); - print(googletrans.LANGCODES); - exit(1); - - try: - text = stdin.read().split('\n')[:-1] - except KeyboardInterrupt: - fprintf(stderr, "%s: Cancelled (keyboard interrupt).\n", argv[0]); - exit(1); - for line in text: - try: - translation = translator.translate(line, src=src, dest=dest); - except: - fprintf(stderr, "%s: %s ->%s\n\t%s\n", - argv[0], line, dest, "Error trying to translate."); - if isatty: - fprintf(stdout, - "%s -> %s\n" - + "\t%s -> %s\n" - + "\tGiven pronunciation: %s\n", - translation.origin, translation.text, - translation.src, translation.dest, - translation.pronunciation - ); - else: - fprintf(stdout, "%s\n", translation.text); - return 0; - -exit(main(len(sys.argv), sys.argv)); diff --git a/dotfiles-old/bin/volume b/dotfiles-old/bin/volume deleted file mode 100755 index ff3c9c9..0000000 --- a/dotfiles-old/bin/volume +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh - -argv0="$0" - -# ADDING A NEW SOUND SERVER/CLIENT/WHATEVERIDK -# `volume a` and `volume s` are the system dependent functions. - -# `volume a $2` must set the volume to $2, an integer value. This should be a -# percentage, 100% being the loudest possible volume that can be output by -# hardware without quality loss. Percentages above 100% will be allowable in -# software if using percentage units. If percentage units are implausible to -# implement, system units are okay (e.g. 0-$arbitrary scale versus 0-100). - -# `volume s` must output the current volume in integer form in whatever units -# are being used by `volume a` on the given system. - -! command -v stris >/dev/null 2>/dev/null \ - && printf "%b: Missing stris.\n" "$argv0" \ - && exit 1 \ - || true - -VOLUME_TMP_FILE="$HOME/.volume-previous" - -unknown_system(){ - printf "%s: Unknown system.\n" "$argv0" 1>&2 - exit 1 -} - -usage(){ - printf "\ -Usage: %b {function} (operand)\n" "$argv0" - printf "\ -Functions: - '+' - shortcut to \"relative \$2\" - '-' - shortcut to \"relative -\$2\" - absolute - change sound output to absolute unit - help,'' - print this help output - mute - toggle mute/unmute - relative - change sound output relative to current status - status - print current sound output in system unit \ -" - printf "\ -The options are matched with [char]*. So \"%b help\" -works the same as \"%b h\". - -" "$argv0" "$argv0" - exit 1 -} - -# $1 becomes 'help' if previously empty -[ -n "$1" ] \ - && argv1="$1" \ - || argv1=help - -case "$argv1" in -# -# SYSTEM DEPENDENT -# -(a*) - [ -n "$2" ] && [ -z "$3" ] && stris int "$2" || usage - - if [ "$(uname)" = "NetBSD" ]; then - # NetBSD 9.2 STABLE 2021-07 - audioctl -w play.gain=$2 >/dev/null - - elif command -v pactl >/dev/null; then - # pactl 15.0 compiled+linked with libpulse 15.0.0 - pactl set-sink-volume @DEFAULT_SINK@ $2% - - else unknown_system; fi - exit 0 ;; -(s*) - [ -z "$2" ] || usage - - if [ "$(uname)" = "NetBSD" ]; then - # hacky - audioctl -a \ - | grep "play\.gain" \ - | cut -d '=' -f 2 - - elif command -v pactl >/dev/null; then - # really hacky, gets the job done - # gets the volume % of Lchan specifically - pactl get-sink-volume @DEFAULT_SINK@ \ - | sed q \ - | cut -d '/' -f 2 \ - | xargs echo \ - | sed s/'%'// - - else unknown_system; fi - exit 0 ;; -# -# SYSTEM independent -# -(+) - [ -n "$2" ] && [ -z "$3" ] && stris uint "$2" \ - && "$argv0" r "$2" \ - || usage - ;; -(-) - [ -n "$2" ] && [ -z "$3" ] && stris uint "$2" \ - && "$argv0" r -"$2" \ - || usage - ;; -(m*) - [ -z "$2" ] || usage - # restore previous volume if there is one - if [ -e "$VOLUME_TMP_FILE" ]; then - "$argv0" a "$(cat "$VOLUME_TMP_FILE")" \ - && rm "$VOLUME_TMP_FILE" \ - && printf "Unmuted.\n" \ - && exit 0 \ - || printf "Error restoring previous volume.\n" \ - >/dev/stderr \ - && exit 1 - fi - - # otherwise, make new file with previous volume - - # dd used rather than shell redirect so it's easy to determine - # whether or not the file write worked - if ! printf "%b" "$("$argv0" s)" \ - | dd >"$VOLUME_TMP_FILE" 2>/dev/null - then - printf "Error writing to file.\n" >/dev/stderr - false - fi - - # and then of course mute - "$argv0" a 0 - printf "Muted.\n" - - exit 0 ;; -(r*) - [ -n "$2" ] && [ -z "$3" ] && stris int "$2" \ - || usage - - if ! newval=$(add $("$argv0" s) $2) || ! stris int "$newval"; then - printf "%b: Error finding new value for volume.\n" "$argv0" - exit 1 - fi - "$argv0" a $newval - exit $? ;; -(h*) usage ;; -(*) usage ;; -esac diff --git a/dotfiles-old/clone.sh b/dotfiles-old/clone.sh deleted file mode 100755 index 19ef9b7..0000000 --- a/dotfiles-old/clone.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -e -alias cp="$(which cp)" -SRC="$HOME" -DEST="$(pwd)" -[ "$(printf "Abort.\nContinue.\n" | dmenu -p "Copying from '$SRC' to '$DEST'. Continue?")" = "Continue." ] || exit -set -x - -for dir in $(cat manifest_dir); do - if ! [ -d "$SRC/$dir" ]; then - printf "Directory missing from SRC: %b\n" "$dir" - false - else - mkdir -p "$DEST/$dir" - fi -done - -for file in $(cat manifest_file); do - if ! [ -e "$SRC/$file" ]; then - printf "File missing from SRC: %b\n" "$file" - false - else - cp "$SRC/$file" "$DEST/$file" - fi -done diff --git a/dotfiles-old/knowledge/audio b/dotfiles-old/knowledge/audio deleted file mode 100644 index fed9da0..0000000 --- a/dotfiles-old/knowledge/audio +++ /dev/null @@ -1,42 +0,0 @@ -On modern Linux systems most people use ALSA and PulseAudio for sound. -This tends to work fine. This isn't always how it's been done but it's -how it's done now. - -I'm not an expert on Linux audio and I'm not gonna explain how this all -works because I don't know myself. However I've noticed a lot of guides -just gloss over what seem to be important parts of setup, so here it is. - -This is also a living document and low quality. - -Alpine Wiki says as of 2021-05-19 you'll need: - -alsa-utils alsa-utils-doc alsa-lib alsaconf - -Alpine splits documentation into their own packages from programs. - -Alpine also says to add all system users including root to the audio group. - -On Busybox systems this is `addgroup $USER audio`. -On GNU this is `usermod -aG audio $USER`. - -Alpine Wiki tells you to use `alsamixer` to find the ID number of your card -in F6 menu and then change defaults.ctl.card and defaults.pcm.card in -/usr/share/alsa/alsa.conf but mine was already the default. - -You need to also add and start the alsa service: -rc-service alsa start -rc-update add alsa - -It looks like I installed gstreamer too. - -Now you need pulseaudio. Here's how to do that according to Alpine Wiki, add: - -pulseaudio pulseaudio-alsa alsa-plugins-pulse - -Make sure you set pulseaudio to start when you need audio. -It freaks out at you if you try to set it systemwide. - -I do this in my bspwmrc for bspwm (and .config/i3/config for i3wm) but -I've heard this is an awful idea so ask your local user-group. - -2021-06-04: This works on artix-openrc. diff --git a/dotfiles-old/knowledge/pacman b/dotfiles-old/knowledge/pacman deleted file mode 100644 index 48b511b..0000000 --- a/dotfiles-old/knowledge/pacman +++ /dev/null @@ -1,32 +0,0 @@ -2021-06-04 -Had an issue with pacman missing some ubiquitous packages (esr's `ascii`, xorg-xev, etc). -This fixed it. I don't really know why - maybe some issues with my repos? -This was cleanly installed artix-openrc. - -[5:46 PM] Bassman Leyla: So what I did is I went into /etc/pacman.d/mirrorlist-arch and uncommented a local mirror -[5:46 PM] Bassman Leyla: Then I appended a config block a package maintainer gave me onto /etc/pacman.conf -[5:46 PM] Bassman Leyla: I'll paste it in -[5:47 PM] Bassman Leyla: -``` -# -# ARCHLINUX -# - -#[testing] -#Include = /etc/pacman.d/mirrorlist-arch - -[extra] -Include = /etc/pacman.d/mirrorlist-arch - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist-arch - -[community] -Include = /etc/pacman.d/mirrorlist-arch - -#[multilib-testing] -#Include = /etc/pacman.d/mirrorlist-arch - -#[multilib] -#Include = /etc/pacman.d/mirrorlist-arch -``` diff --git a/dotfiles-old/licenses/DMENU b/dotfiles-old/licenses/DMENU deleted file mode 100644 index 3afd28e..0000000 --- a/dotfiles-old/licenses/DMENU +++ /dev/null @@ -1,30 +0,0 @@ -MIT/X Consortium License - -© 2006-2019 Anselm R Garbe -© 2006-2008 Sander van Dijk -© 2006-2007 Michał Janeczek -© 2007 Kris Maglione -© 2009 Gottox -© 2009 Markus Schnalke -© 2009 Evan Gates -© 2010-2012 Connor Lane Smith -© 2014-2020 Hiltjo Posthuma -© 2015-2019 Quentin Rameau - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/dotfiles-old/manifest_dir b/dotfiles-old/manifest_dir deleted file mode 100644 index 2b5188e..0000000 --- a/dotfiles-old/manifest_dir +++ /dev/null @@ -1,13 +0,0 @@ -.config/ -.config/bspwm/ -.config/displaym/ -.config/displaym/bspwm -.config/displaym/ctwm -.config/displaym/i3wm -.config/i3/ -.config/i3status/ -.config/sxhkd/ -.config/sxhkd/ -.config/sxhkd/ -bin/ -src/dmenu/ diff --git a/dotfiles-old/manifest_file b/dotfiles-old/manifest_file deleted file mode 100644 index ffd9b5e..0000000 --- a/dotfiles-old/manifest_file +++ /dev/null @@ -1,24 +0,0 @@ -.Xresources -.aliases -.ctwmrc -.env -.profile -.vimrc -.config/bspwm/bspwmrc -.config/displaym/.xinitrc -.config/displaym/sxhkdrc -.config/displaym/bspwm/.xinitrc -.config/displaym/bspwm/start.sh -.config/displaym/bspwm/sxhkdrc -.config/displaym/ctwm/.xinitrc -.config/displaym/ctwm/start.sh -.config/displaym/i3wm/.xinitrc -.config/displaym/i3wm/sxhkdrc -.config/i3/config -.config/i3status/config -bin/batterymonitor -bin/data -bin/displaym -bin/mnt -bin/volume -src/dmenu/config.h diff --git a/dotfiles-old/misc/PKGBUILD_doas-sudo b/dotfiles-old/misc/PKGBUILD_doas-sudo deleted file mode 100644 index 2cba10e..0000000 --- a/dotfiles-old/misc/PKGBUILD_doas-sudo +++ /dev/null @@ -1,17 +0,0 @@ -# Maintainer: deven -# VERY LIGHTLY modified version of the AUR package opendoas-sudo -pkgname=doas-sudo -pkgver=1 -pkgrel=1 -pkgdesc="A symlink for using the port of BSD's doas(1) as a drop-in replacement to sudo" -arch=('any') -url="https://github.com/slicer69/doas" -license=('MIT') -depends=('doas') -provides=('sudo') -conflicts=('sudo') - -package() { - install -d "$pkgdir"/usr/bin - ln -s $(which doas) "$pkgdir"/usr/bin/sudo -} diff --git a/dotfiles-old/misc/README.txt b/dotfiles-old/misc/README.txt deleted file mode 100644 index a05ba3e..0000000 --- a/dotfiles-old/misc/README.txt +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -set -e - -# dotfiles/scripts -# Basic scripts to rebuild a system. -# Usage: -# bash README.txt arch - -# packages/bootstrap - bare minimum programs. Necessary for system use. -# Install these before running this script. - -mkdir -p $HOME/bin # executables -mkdir -p $HOME/src # source code - -if [ $1 = "arch" ]; then - sudo pacman -S $(cat packages/all packages/*arch_pacman*) - - bash arch_yay.sh - yay -S $(cat packages/*arch_yay*) - - bash doas-sudo.sh arch - # you can undo this with pacman -S sudo - -elif [ $1 = "artix" ]; then - sudo pacman -S $(cat packages/all packages/*artix_pacman*) - - bash arch_yay.sh - yay -S $(cat packages/*artix_yay*) - - bash doas-sudo.sh arch - # you can undo this with pacman -S sudo - -elif [ $1 = "debian" ]; then - -fi - -bash dotfiles.sh diff --git a/dotfiles-old/misc/arch_yay.sh b/dotfiles-old/misc/arch_yay.sh deleted file mode 100755 index 1cb5269..0000000 --- a/dotfiles-old/misc/arch_yay.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e -source ./cdecho.sh - -YAYURL="https://aur.archlinux.org/yay.git" - -cde $HOME/src -git clone $YAYURL || printf "yay already downloaded\n" -cde yay -git pull -makepkg -si -yay -V diff --git a/dotfiles-old/misc/cc.sh b/dotfiles-old/misc/cc.sh deleted file mode 100644 index 876d255..0000000 --- a/dotfiles-old/misc/cc.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -set -e - -CC="$(which cc)" - -which tcc >/dev/null - -if [ -h "$CC" ]; then - unlink "$CC" - ln -s "$(which tcc)" "$CC" -else - printf "$0: \$(which cc), $(which cc), is not a symbolic link\n" >/dev/stderr - exit 1 -fi diff --git a/dotfiles-old/misc/cdecho.sh b/dotfiles-old/misc/cdecho.sh deleted file mode 100644 index 7aeac50..0000000 --- a/dotfiles-old/misc/cdecho.sh +++ /dev/null @@ -1,4 +0,0 @@ -cde() { - cd $1 - printf "Entered %s.\n" $(pwd) -} diff --git a/dotfiles-old/misc/dash_sh.sh b/dotfiles-old/misc/dash_sh.sh deleted file mode 100644 index 00b9d32..0000000 --- a/dotfiles-old/misc/dash_sh.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -ex - -which sh >/dev/null 2>&1 \ - || exit 1 - -SH_LOCATION="$(which sh)" - -[ -L "$SH_LOCATION" ] \ - || exit 1 - -which dash >/dev/null 2>&1 \ - || exit 1 - -unlink "$SH_LOCATION" - -ln -s "$(which dash)" "$SH_LOCATION" diff --git a/dotfiles-old/misc/doas-sudo.sh b/dotfiles-old/misc/doas-sudo.sh deleted file mode 100755 index 83c9b60..0000000 --- a/dotfiles-old/misc/doas-sudo.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -e -source ./cdecho.sh - -if [ $1 = "arch" ]; then - mkdir -p $HOME/src/doas-sudo - cp PKGBUILD_doas-sudo $HOME/src/doas-sudo/PKGBUILD - - cde $HOME/src/doas-sudo - makepkg -si -fi diff --git a/dotfiles-old/misc/dotfiles.sh b/dotfiles-old/misc/dotfiles.sh deleted file mode 100755 index 37802b5..0000000 --- a/dotfiles-old/misc/dotfiles.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -# could be more succinct in places but it works - -source ./cdecho.sh - -# retrieve dotfiles -cde $HOME/src -git clone https://github.com/devenblake/dotfiles.git -cde dotfiles - -# unscii -curl http://pelulamu.net/unscii/unscii-16-full.ttf -o $HOME/.local/share/fonts/unscii-16-full.ttf -fc-cache - -# basic configs -cp {.Xresources,.aliases,.bashrc,.profile} $HOME/ -ln -s $HOME/.Xresources $HOME/.Xdefaults - -# dmenu -cde $HOME/src -if [ git clone https://git.suckless.org/dmenu ]; then - cde dmenu - cp $HOME/dotfiles/src/dmenu/config.h ./ - make - [ "Yes." = $(printf "No.\nYes." | ./dmenu -p "Install dmenu?") ] && sudo make install -fi - -# i3wm -mkdir -p $HOME/.config/i3 -mkdir $HOME/.config/i3status -cde $HOME/.config/ -cp $HOME/src/dotfiles/.config/i3/config i3/ -cp $HOME/src/dotfiles/.config/i3status/config i3status/ - -# winamp skin (checks to see if audacious is installed first) -sudo mkdir -p /usr/share/audacious/Skins/ -which audacious && sudo curl https://archive.org/download/winampskin_Sailor_Moon_Gang/Sailor_Moon_Gang.wsz -o /usr/share/audacious/Skins/Sailor_Moon_Gang.wsz || printf "[ERROR] Could not curl audacious skin.\n" - -# wallpaper -cde $HOME -mkdir -p $HOME/Pictures/Wallpapers -curl https://ia801502.us.archive.org/3/items/asuka-98/Asuka%2098.jpg -o Pictures/Wallpapers/Asuka\ 98.jpg || printf "[ERROR] Could not curl wallpaper.\n" - -xrdb -load .Xresources diff --git a/dotfiles-old/misc/dsic.sh b/dotfiles-old/misc/dsic.sh deleted file mode 100755 index e237c5a..0000000 --- a/dotfiles-old/misc/dsic.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -SIC_C=$HOME/src/sic/sic.c -cp "$SIC_C" ./ - -sed -e 's/No channel to send to/No channel to which to send./' -e '170s/sic/dsic/' dsic.c - -diff sic.c dsic.c -[ "$(printf "No.\nYes.\n" | dmenu -p "Write changes?")" = "Yes." ] && mv "$SIC_C" "$SIC_C".bak && mv dsic.c "$SIC_C" diff --git a/dotfiles-old/misc/grammy/icons.sh b/dotfiles-old/misc/grammy/icons.sh deleted file mode 100644 index 2d269a7..0000000 --- a/dotfiles-old/misc/grammy/icons.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# icon fetcher -# i made this script to fetch icons for my grandmother and put them in icons/ -# so i wouldn't have to fetch the icons for her desktop when i made her a new -# system. -# i could have downloaded all the icons and put them into a repo for her but -# this uses less space - -# all these icons are on the internet archive so if the local sites change -# they'll still be available - -icons_folder="~/Pictures/icons/" - -! which curl && printf "$0: missing dependency: curl\n" >/dev/stderr && exit 1 - -mkdir -p "$icons_folder" -cd "$icons_folder" - -curl -o "989wclz.com.png" "https://web.archive.org/web/20200629174002if_/https://989wclz.com/wp-content/themes/wclz/img/touch-icon-144.png" -curl -o "amazon.com.ico" "https://web.archive.org/web/20200718050400if_/https://www.amazon.com/favicon.ico" -curl -o "bangordailynews.com.png" "http://web.archive.org/web/20200721195123if_/https://i0.wp.com/bdn-data.s3.amazonaws.com/uploads/2020/06/BDN-logo_green-3-1.png" -curl -o "theguardian.com.png" "https://web.archive.org/web/20200720041457if_/https://assets.guim.co.uk/images/favicons/fee5e2d638d1c35f6d501fa397e53329/152x152.png" -curl -o "centralmaine.com.png" "https://web.archive.org/web/20200720023956if_/https://multifiles.pressherald.com/uploads/sites/2/2014/06/apple-touch-icon-iphone-retina-display.png" -curl -o "dictionary.com.png" "https://web.archive.org/web/20200719135458if_/https://www.dictionary.com/hp-assets/dcom_favicon-1bff2f1b49c077ed504e55c3649f2a4b.png" -curl -o "google.com.jpg" "https://web.archive.org/web/20170621105937if_/https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no/photo.jpg" -curl -o "longfellowsgreenhouses.com.jpg" "https://web.archive.org/web/20200718173559im_/https://longfellowsgreenhouses.com/wp-content/uploads/2020/03/Longfellows-Logo-Light-Green.jpg" -curl -o "mainepublic.org.png" "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/e5/8e/30457/1/c300.png" -curl -o "news.google.com.png" "https://upload.wikimedia.org/wikipedia/commons/0/0b/Google_News_icon.png" -curl -o "newscentermaine.com.png" "https://web.archive.org/web/20200721190548if_/https://www.newscentermaine.com/assets/favicons/WCSH.png?ver=2.4.7.4" -curl -o "pressherald.com.png" "https://multifiles.pressherald.com/uploads/sites/4/2014/06/apple-touch-icon-iphone-retina-display.png" -curl -o "weather.com.png" "https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/The_Weather_Channel_logo_2005-present.svg/1200px-The_Weather_Channel_logo_2005-present.svg.png" diff --git a/dotfiles-old/misc/grammy/image.sh b/dotfiles-old/misc/grammy/image.sh deleted file mode 100755 index a0db885..0000000 --- a/dotfiles-old/misc/grammy/image.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -set -e - -argv0="$0" -argv1="$1" -argv2="$2" - -FILE_NAME="image.img.gz" -COMPACT="gzip -c" -EXTRACT="gzip -cd" - -usage() { - printf "Usage: $argv0 {save,deploy} [device] - -Examples: - $argv0 save /dev/sda1 # images installation at /dev/sda1 - $argv0 deploy /dev/sda # deploys saved image to /dev/sda - -In-program constants (edit this script to change them): - \$FILE_NAME - where to save/read the image - \$COMPACT - command to compact the image (such as \"gzip -c\" to - compress with gzip) - \$EXTRACT - command to extract the image (such as \"gzip -cd\" to - extract gzip)\n" - exit 1 -} - -[ -n "$argv2" ] || usage - -set -x - -case "$argv1" in -(save) $COMPACT <"$argv2" >"$FILE_NAME" ;; -(deploy) $EXTRACT <"$FILE_NAME" >"$argv2" ;; -esac - -exit 0 diff --git a/dotfiles-old/misc/motd b/dotfiles-old/misc/motd deleted file mode 100644 index 588a337..0000000 --- a/dotfiles-old/misc/motd +++ /dev/null @@ -1,8 +0,0 @@ -Welcome to Trinity's Thinkpad X200T. - -Unauthorized access is a violation of -United States federal law according to -the Computer Fraud and Abuse Act, 18 -USC Section 1030. - -Mess with the best, die like the rest. diff --git a/dotfiles-old/misc/nmap.sh b/dotfiles-old/misc/nmap.sh deleted file mode 100644 index 200006f..0000000 --- a/dotfiles-old/misc/nmap.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# builds and installs nmap 7.80 because the fucking pieces of shit that -# maintain nmap decided to make 7.90+ NONFREE. -# i do like nmap and i have nothing personal against the actual maintainers. -# but come ON. - -# anyway... - -set -e - -FILENAME="nmap-7.80.tar.bz2" -ORIGINAL_DIST_BZ2="https://nmap.org/dist/nmap-7.80.tar.bz2" -ARCHIVED_DIST_BZ2="http://web.archive.org/web/20200922062002/https://nmap.org/dist/nmap-7.80.tar.bz2" - -cd $HOME/src - -curl "$ORIGINAL_DIST_BZ2" >"$FILENAME" || curl "$ARCHIVED_DIST_BZ2" >"$FILENAME" - -bzip2 -cd <"$FILENAME" | tar -x - -# see, i could do complicated math to determine this based on the filename, or -# i could hard-code this and let it error if i've inexplicably grabbed -# nmap-7.8.1 - -cd "nmap-7.8.0" - -./configure -make -sudo make install diff --git a/dotfiles-old/misc/oneliners.sh b/dotfiles-old/misc/oneliners.sh deleted file mode 100755 index 97811a6..0000000 --- a/dotfiles-old/misc/oneliners.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -# This is the place for the scripts that are a bit more involved than can be -# expressed in shell aliases or functions, or that I want to access from dmenu. -# These are pretty messy but most of them work. Pretty easy for bugs to hide in -# here so I go in with pesticide often. - -set -x -mkdir -p $HOME/bin/oneliners || exit -cd $HOME/bin/oneliners - -SUDO=doas -SHEBANG="#!/bin/sh\n" -BASH_SHEBANG="#!/bin/bash\n" - -DMENU_LINES="40" - -# private bookmarks -printf $SHEBANG'$BROWSER file://$HOME/bookmarks.html\n' >bmarks - -# deemix -printf $SHEBANG'python $HOME/src/deemix-pyweb/deemix-pyweb.py\n' >deemix - -# settings for specific monitors -printf $SHEBANG'xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n' >1702 -printf $SHEBANG'xrandr --output VGA-1 --auto --right-of LVDS-1\n' >mv720 - -# more monitor settings -printf $SHEBANG"xrandr --output HDMI-1 --off\n" >hdmioff -printf $SHEBANG"xrandr --output VGA-1 --off\n" >vgaoff - -# youtube-dl stuff -printf $SHEBANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo -printf $SHEBANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp -printf $SHEBANG"youtube-dlp -f \$(youtube-dl -F \$1 | tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | awk '{ print \$1 }') \"\$@\"\n" >youtube-dl-interactive -printf $SHEBANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv - -# sxhkd -printf $SHEBANG"cd '$HOME/.config/sxhkd/' -cat sxhkdrc-base sxhkdrc-bspwm >sxhkdrc -pkill sxhkd -USR1\n" >sxhkd-bspwm-reload - -set +x - -ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * diff --git a/dotfiles-old/misc/sic.sh b/dotfiles-old/misc/sic.sh deleted file mode 100755 index 43c5ee4..0000000 --- a/dotfiles-old/misc/sic.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -mkdir -p $HOME/src -cd $HOME/src -git clone https://git.suckless.org/sic -cd $HOME/src/dotfiles/scripts -./dsic.sh # apply patches diff --git a/dotfiles-old/misc/spacer.sh b/dotfiles-old/misc/spacer.sh deleted file mode 100755 index f84b8f6..0000000 --- a/dotfiles-old/misc/spacer.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# creates an 8GB empty file in the root dir -# that way when the alarm bells go off you can delete it to save a couple -# minutes before the system really runs out of disk -BS=512; COUNT=16777216 # 512 * 16777216 = 8GB -! [ -e /spacer.img ] || return 1 || exit 1 -dd bs=$BS count=$COUNT spacer.img -$SUDO mv ./spacer.img /spacer.img diff --git a/dotfiles-old/packages/all b/dotfiles-old/packages/all deleted file mode 100644 index c41cd56..0000000 --- a/dotfiles-old/packages/all +++ /dev/null @@ -1,74 +0,0 @@ -alsa-plugins-nice -alsa-utils -anki -audacious -curl -dvdbackup -ed -feh -ffmpeg -gcc -git -gparted -gperf -gwenview -htop -inetutils -iptables -k3b -kate -kdenlive -krita -lame -linux-headers -lynx -macchanger -make -man-pages -mercurial -moc -moreutils -mpv -net-tools -nmap -p7zip -pkgfile -powertop -progress -pulseaudio -pulseaudio-alsa -pulseaudio-utils -pulsemixer -python3 -qbittorrent -qemu -rsync -s-tui -screen -scrot -sed -smartmontools -thunar -thunderbird -ttf-liberation -tlp -twin -units -unrar -unzip -util-linux -vim -virt-manager -vlc -wget -wireguard-tools -xclip -xf86-input-libinput -xf86-input-wacom -xf86-video-intel -xscreensaver -xterm -zathura -zathura-cb -zathura-djvu -zathura-ps diff --git a/dotfiles-old/packages/alpine_apk b/dotfiles-old/packages/alpine_apk deleted file mode 100644 index 96126e3..0000000 --- a/dotfiles-old/packages/alpine_apk +++ /dev/null @@ -1,12 +0,0 @@ -build-base -consolekit2 -dbus -dbus-x11 -firefox -libx11-dev -libxft-dev -libxinerama-dev -neofetch -tcc -udev -xorg-xserver diff --git a/dotfiles-old/packages/arch_pacman b/dotfiles-old/packages/arch_pacman deleted file mode 100644 index 20340f3..0000000 --- a/dotfiles-old/packages/arch_pacman +++ /dev/null @@ -1 +0,0 @@ -virtualbox-host-modules-arch diff --git a/dotfiles-old/packages/artix_pacman b/dotfiles-old/packages/artix_pacman deleted file mode 100644 index 68b946f..0000000 --- a/dotfiles-old/packages/artix_pacman +++ /dev/null @@ -1,7 +0,0 @@ -acpid -acpid-openrc -fuse-openrc -iwd-openrc -libvirt-openrc -openresolv -wireguard-openrc diff --git a/dotfiles-old/packages/bootstrap b/dotfiles-old/packages/bootstrap deleted file mode 100644 index f03db7d..0000000 --- a/dotfiles-old/packages/bootstrap +++ /dev/null @@ -1,8 +0,0 @@ -bash -coreutils -ed -gcc -git -less -linux -make diff --git a/dotfiles-old/packages/common-arch_pacman-artix_pacman b/dotfiles-old/packages/common-arch_pacman-artix_pacman deleted file mode 100644 index 63b8020..0000000 --- a/dotfiles-old/packages/common-arch_pacman-artix_pacman +++ /dev/null @@ -1,35 +0,0 @@ -asp -base-devel -clisp -cpupower -dhcpcd -firefox-developer-edition -fuse2 -gvim -i3status -iputils -iw -iwd -jre11-openjdk -jre8-openjdk -kimageformats -libreoffice-fresh -light -ntfs-3g -otf-ipafont -pulseaudio-alsa -pulseaudio-bluetooth -python-pip -qemu-arch-extra -qt5-imageformats -stalonetray -ttf-dejavu -vi -which -wireshark-cli -xorg-server -xorg-xauth -xorg-xinit -xorg-xrdb -youtube-dl -zathura-pdf-mupdf diff --git a/dotfiles-old/packages/common-arch_yay-artix_yay b/dotfiles-old/packages/common-arch_yay-artix_yay deleted file mode 100644 index 1e994b2..0000000 --- a/dotfiles-old/packages/common-arch_yay-artix_yay +++ /dev/null @@ -1,24 +0,0 @@ -aic94xx-firmware -bitwarden -bitwarden-cli -bitwarden-dmenu -dashbinsh -discord_arch_electron -doas -freedownloadmanager -google-chrome -gzdoom -i3-gaps -i3-swallow -instagram-scraper -iwgtk -lemonbar-git -makebootfat -minecraft-launcher -mullvad-vpn-beta -multimc5 -spotify -steam -tor-browser -wd719x-firmware -zoom diff --git a/dotfiles-old/packages/common-arch_yay-artix_yay-debian_apt b/dotfiles-old/packages/common-arch_yay-artix_yay-debian_apt deleted file mode 100644 index af6e452..0000000 --- a/dotfiles-old/packages/common-arch_yay-artix_yay-debian_apt +++ /dev/null @@ -1,2 +0,0 @@ -moon-buggy -syncterm diff --git a/dotfiles-old/packages/debian_apt b/dotfiles-old/packages/debian_apt deleted file mode 100644 index 6febc2e..0000000 --- a/dotfiles-old/packages/debian_apt +++ /dev/null @@ -1,5 +0,0 @@ -build-essential -fonts-dejavu -libreoffice -linux-tools-common -linux-tools-generic diff --git a/dotfiles-old/src/dmenu/config.h b/dotfiles-old/src/dmenu/config.h deleted file mode 100644 index 8f48cf2..0000000 --- a/dotfiles-old/src/dmenu/config.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Licensed under the MIT/X Consortium license. For the full license details - * see the file `licenses/DMENU` in my (Deven Blake's) dotfiles repository or - * the file `LICENSE` in suckless's dmenu repository. */ - -static const char *colors[SchemeLast][2] = { /* { foreground, background } */ - [SchemeNorm] = { "#ff0000", "#000000" }, - [SchemeSel] = { "#ff0000", "#ffffff" }, - [SchemeOut] = { "#000000", "#ffffff" }, -}; - -/* default font */ -static const char *fonts[] = { - "unscii:antialias=false:size=12", - "monospace:size=10" -}; - -/* -l option; if nonzero, dmenu uses vertical list with given number of lines */ -static unsigned int lines = 0; - -static const char *prompt = NULL; - -/* if topbar == 0 it becomes a bottom bar */ -static int topbar = 1; - -/* Characters not considered part of a word while deleting words - * for example: " /?\"&[]" */ -static const char worddelimiters[] = " ";