small pixel drawing of a pufferfish dotfiles

Merge remote-tracking branch 'origin/master'
Jes Olson j3s@c3f.net
Tue, 21 Jun 2022 16:52:36 -0500
commit

c77f5b644735b3f951be7f2c4dcd851e0bf21ad7

parent

fde8ef18c562f6cc28825390a071b96b74b302a6

5 files changed, 94 insertions(+), 128 deletions(-)

jump to
M .config/kanshi/config.config/kanshi/config

@@ -9,6 +9,11 @@ }

profile { output eDP-1 disable + output DP-4 enable +} + +profile { + output eDP-1 disable output DP-2 mode 1920x1080 position 0,0 output HDMI-A-1 mode 1920x1080 position 1920,0 }
M .config/nvim/init.vim.config/nvim/init.vim

@@ -7,6 +7,7 @@ Plug 'hrsh7th/nvim-compe'

Plug 'ctrlpvim/ctrlp.vim' Plug 'cormacrelf/vim-colors-github' Plug 'dewyze/vim-tada' +Plug 'tidalcycles/vim-tidal' call plug#end() colorscheme github

@@ -99,3 +100,6 @@

" bindings let mapleader = "," nmap <leader>m Go<esc>:put =strftime(\"%Y-%m-%d\")<cr>o----------------<cr><esc> + +" use neovim's own terminal instead of tmux: +let g:tidal_target = "terminal"
M .config/sway/config.config/sway/config

@@ -1,63 +1,21 @@

-# Default config for sway -# -# Copy this to ~/.config/sway/config and edit it to your liking. -# -# Read `man 5 sway` for a complete reference. - -### Variables -# -# Logo key. Use Mod1 for Alt. +# vars set $mod Mod4 -# Home row direction keys, like vim set $left h set $down j set $up k set $right l -# Your preferred terminal emulator set $term foot -### Output configuration -# -# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) -# output * bg /home/j3s/Pictures/wallpapers/widelain.jpg fill -# -# Example configuration: -# -# output HDMI-A-1 resolution 1920x1080 position 1920,0 -# -# You can get the names of your outputs by running: swaymsg -t get_outputs +set $wssteam "steam" +set $wsdota2 "dota2" +set $wssuperautopets "super auto pets" + output DP-1 disable +# qweh? # output HDMI-A-2 position 1920,215 resolution 2560x1440@170hz # output HDMI-A-1 position 0,395 resolution 1920x1080@74hz # output HDMI-A-2 position 4480,0 resolution 1920x1080@74hz transform 90 -### Idle configuration -# -# Example configuration: -# -#exec swayidle -w \ -# timeout 300 'swaylock -f -c 000000' \ -# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ -# before-sleep 'swaylock -f -c 000000' -# -# This will lock your screen after 300 seconds of inactivity, then turn off -# your displays after another 300 seconds, and turn your screens back on when -# resumed. It will also lock your screen before your computer goes to sleep. - -### Input configuration -# -# Example configuration: -# -# input "2:14:SynPS/2_Synaptics_TouchPad" { -# dwt enabled -# tap enabled -# natural_scroll enabled -# middle_emulation enabled -# } -# -# You can get the names of your inputs by running: swaymsg -t get_inputs -# Read `man 5 sway-input` for more information about this section. - input "type:keyboard" { xkb_layout us xkb_options ctrl:nocaps

@@ -68,48 +26,40 @@ scroll_method on_button_down

scroll_button 275 } -### Key bindings -# -# Basics: -# - client.focused #4c7899 #000000 #000000 #2e9ef4 #97f0a6 - for_window [title="^weallfloatdownhere$"] floating enable, border pixel +# default workspaces +assign [class="^Steam$"] $wssteam +assign [class="^dota2$"] $wsdota2 +assign [class="^superautopets.x86_64$"] $wssuperautopets - # Start a terminal - bindsym $mod+Return exec $term +# layout options +for_window [title="^weallfloatdownhere$"] floating enable, border pixel - # floating terms - bindsym $mod+Shift+Return exec $term --title 'weallfloatdownhere' - - # Kill focused window - bindsym $mod+Shift+q kill - - # notification management (i don't use the Delete key at all) - bindsym Delete exec makoctl dismiss - bindsym $mod+Delete exec makoctl dismiss --all - - # bind bad return presses to nothing -# bindsym Shift+Return Return - bindsym Mod1+Shift+Return Return - - # Start your launcher - bindsym $mod+d exec fuzzel +for_window [app_id="^firefox$"] layout tabbed +for_window [class="^Steam$"] layout tabbed +for_window [title="Virtual Machine Manager"] layout tabbed - # Password manager - bindsym $mod+Shift+p exec --no-startup-id pa-fuzzel +for_window [title="Firefox — Sharing Indicator"] floating enable +for_window [title="Firefox — Sharing Indicator"] kill - # Drag floating windows by holding down $mod and left mouse button. - # Resize them with right mouse button + $mod. - # Despite the name, also works for non-floating windows. - # Change normal to inverse to use left mouse button for resizing and right - # mouse button for dragging. - floating_modifier $mod normal +### keybinds ### +bindsym $mod+Return exec $term +bindsym $mod+Shift+Return exec $term --title 'weallfloatdownhere' +bindsym $mod+Shift+q kill +bindsym Delete exec makoctl dismiss +bindsym $mod+Delete exec makoctl dismiss --all +bindsym Mod1+Shift+Return Return +bindsym $mod+d exec fuzzel +bindsym $mod+Shift+p exec --no-startup-id pa-fuzzel +bindsym $mod+Shift+c reload +bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' - # Reload the configuration file - bindsym $mod+Shift+c reload +# Drag floating windows by holding down $mod and left mouse button. +# Resize them with right mouse button + $mod. +# Despite the name, also works for non-floating windows. +# Change normal to inverse to use left mouse button for resizing and right +# mouse button for dragging. +floating_modifier $mod normal - # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' # # Moving around: #

@@ -194,12 +144,6 @@ # bindsym $mod+a focus parent

# Float config # use swaymsg -t get_tree to find class or app_id - for_window [class="Steam"] floating enable - for_window [class="Mumble"] floating enable - for_window [class="Dino"] floating enable - for_window [title="Firefox — Sharing Indicator"] floating enable - for_window [title="Virtual Machine Manager"] floating enable - for_window [title="Firefox — Sharing Indicator"] kill # for_window [class="Dota 2"] floating enable, border none # # Scratchpad:

@@ -220,47 +164,33 @@ #

bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy -# -# Resizing containers: -# -mode "resize" { - # left will shrink the containers width - # right will grow the containers width - # up will shrink the containers height - # down will grow the containers height - bindsym $left resize shrink width 10px - bindsym $down resize grow height 10px - bindsym $up resize shrink height 10px - bindsym $right resize grow width 10px - - # Ditto, with arrow keys - bindsym Left resize shrink width 10px - bindsym Down resize grow height 10px - bindsym Up resize shrink height 10px - bindsym Right resize grow width 10px - - # Return to default mode - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+r mode "resize" +include colorscheme +client.focused $base05 $base0D $base00 $base0D $base0D +client.focused_inactive $base01 $base01 $base05 $base03 $base01 +client.unfocused $base01 $base00 $base05 $base01 $base01 +client.urgent $base08 $base08 $base00 $base08 $base08 +client.placeholder $base00 $base00 $base05 $base00 $base00 +client.background $base07 -# -# Status Bar: -# -# Read `man 5 sway-bar` for more information about this section. bar { position top # When the status_command prints a new line to stdout, swaybar updates. # The default just shows the current date and time. status_command statusbar + pango_markup enabled colors { - statusline #89CFF0 - focused_workspace #89cff0 #89cff0 #000000 - background #000000 - inactive_workspace #32323200 #32323200 #5c5c5c + background $base00 + separator $base01 + statusline $base04 + + # State Border BG Text + focused_workspace $base05 $base0D $base00 + active_workspace $base05 $base03 $base00 + inactive_workspace $base03 $base01 $base05 + urgent_workspace $base08 $base08 $base00 + binding_mode $base00 $base0A $base00 } }
A bin/nostromo/statusbar

@@ -0,0 +1,20 @@

+#!/bin/sh + +get_bat() { + bat="$(cat /sys/class/power_supply/BAT1/capacity)" + if [ "$bat" -lt 10 ]; then + printf '<span foreground="red">%s%%</span>' "$bat" + else + printf '%s%%' "$bat" + fi +} + +while true +do + time=$(date +"%A %Y-%m-%d %I:%M %p") + time="$time $(date -u +"(%H:%M UTC)")" + bat="$(get_bat)" + wifi="$(nmcli -t dev show wlp170s0 | grep GENERAL.CONNECTION | cut -d ':' -f 2)" + printf "wifi: %s | bat: %s | %s\n" "$wifi" "$bat" "$time" + sleep 10 +done
M bin/volbin/vol

@@ -15,20 +15,24 @@ if [ "$vol" -gt 100 ]; then

# prevent volumes of >100% for the # good of all ears pactl set-sink-volume @DEFAULT_SINK@ 100% - notify-send '🔈 vol' --hint=int:value:100 -t 800 + notify-send '🔈 vol' --hint=int:value:100 -t 800 -h string:x-canonical-private-synchronous:anything elif [ "$vol" -lt 0 ]; then # prevent volumes of <0% for the # good of all ... dog... whateij fiwjoefj pactl set-sink-volume @DEFAULT_SINK@ 0% - notify-send '🔈 vol' --hint=int:value:0 -t 800 + notify-send '🔈 vol' --hint=int:value:0 -t 800 -h string:x-canonical-private-synchronous:anything else - notify-send '🔈 vol' --hint=int:value:"$vol" -t 800 + notify-send '🔈 vol' --hint=int:value:"$vol" -t 800 -h string:x-canonical-private-synchronous:anything fi } case "$1" in - ls|list) pactl list short sinks ;; - set) pactl set-default-sink "$2" ;; + ls|list) + pactl list short sinks | awk '{print $1" "$2}' + ;; + set) + pactl set-default-sink "$2" + ;; [0-9]*) pactl set-sink-volume @DEFAULT_SINK@ "$1"% notify_current_volume

@@ -42,5 +46,8 @@ down)

pactl set-sink-volume @DEFAULT_SINK@ -"$2"% notify_current_volume ;; - *) ;; + *) + printf "unknown command\n" + exit 1 + ;; esac