From e726ba61ae4ccd319fb1d90f8c4a7bc0792bf5f2 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 2 Aug 2021 05:18:07 -0600 Subject: [PATCH] New functions/bin structure --- dotfiles/config/autorandr/home_tv/postswitch | 4 +- dotfiles/config/xmonad/xmonad.hs | 102 +----- dotfiles/lib/bin/dbus-introspect.sh | 8 - dotfiles/lib/bin/get_sink_input_by_pid.sh | 3 - dotfiles/lib/bin/list_interfaces.sh | 3 - dotfiles/lib/bin/load_xkb_map.sh | 20 -- dotfiles/lib/bin/pager.sh | 5 +- dotfiles/lib/bin/quill_from_seed.sh | 7 - dotfiles/lib/bin/rofi_paswitch.sh | 3 - dotfiles/lib/bin/rofi_wallpaper.sh | 3 - dotfiles/lib/bin/run_haskell_stack.sh | 6 - dotfiles/lib/bin/run_unity.sh | 3 - dotfiles/lib/bin/screenshot.sh | 5 - dotfiles/lib/bin/set_volume.sh | 17 - dotfiles/lib/bin/shell_command.sh | 3 - .../bin/split_chrome_tab_to_next_screen.sh | 4 - dotfiles/lib/bin/split_current_chrome_tab.sh | 3 - dotfiles/lib/bin/split_tab_by_id.sh | 4 - dotfiles/lib/bin/start_chrome.sh | 3 - dotfiles/lib/bin/start_hangouts.sh | 9 - dotfiles/lib/bin/start_synergy.sh | 3 - dotfiles/lib/bin/toggle_taffybar.sh | 3 - dotfiles/lib/bin/type_system_password.sh | 3 - dotfiles/lib/bin/wallpaper.sh | 3 - dotfiles/lib/bin/xsettingsd-setup | 34 -- dotfiles/lib/functions/all_after_char | 9 + dotfiles/lib/functions/command_exists | 7 + dotfiles/lib/functions/dbus_introspect | 12 + .../lib/functions/environment_variable_exists | 9 + dotfiles/lib/functions/get_sink_input_by_pid | 8 + dotfiles/lib/functions/list_interfaces | 7 + dotfiles/lib/functions/load_default_map | 12 + dotfiles/lib/functions/load_xkb_map | 24 ++ dotfiles/lib/functions/localip | 14 + .../{bin/pahelper.sh => functions/pahelper} | 18 +- dotfiles/lib/functions/paismuted | 7 + dotfiles/lib/functions/parse_timestamp | 7 + dotfiles/lib/functions/pashowvolume | 15 + dotfiles/lib/functions/pasink | 7 + dotfiles/lib/functions/path_lines | 10 + dotfiles/lib/functions/pavolume | 9 + dotfiles/lib/functions/rlwhich | 8 + dotfiles/lib/functions/rofi_paswitch | 7 + dotfiles/lib/functions/run_if_exists | 7 + dotfiles/lib/functions/run_unity | 8 + dotfiles/lib/functions/set_volume | 19 ++ dotfiles/lib/functions/shell_contains | 11 + dotfiles/lib/functions/source_if_exists | 7 + dotfiles/lib/functions/timestamp | 8 + dotfiles/lib/functions/toggle_taffybar | 8 + dotfiles/lib/shellenv/functions.sh | 298 ------------------ dotfiles/zshrc | 2 +- nixos/base.nix | 22 +- nixos/flake.lock | 137 +++----- 54 files changed, 313 insertions(+), 665 deletions(-) delete mode 100755 dotfiles/lib/bin/dbus-introspect.sh delete mode 100755 dotfiles/lib/bin/get_sink_input_by_pid.sh delete mode 100755 dotfiles/lib/bin/list_interfaces.sh delete mode 100755 dotfiles/lib/bin/load_xkb_map.sh delete mode 100755 dotfiles/lib/bin/quill_from_seed.sh delete mode 100755 dotfiles/lib/bin/rofi_paswitch.sh delete mode 100755 dotfiles/lib/bin/rofi_wallpaper.sh delete mode 100755 dotfiles/lib/bin/run_haskell_stack.sh delete mode 100755 dotfiles/lib/bin/run_unity.sh delete mode 100755 dotfiles/lib/bin/screenshot.sh delete mode 100755 dotfiles/lib/bin/set_volume.sh delete mode 100755 dotfiles/lib/bin/shell_command.sh delete mode 100755 dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh delete mode 100755 dotfiles/lib/bin/split_current_chrome_tab.sh delete mode 100755 dotfiles/lib/bin/split_tab_by_id.sh delete mode 100755 dotfiles/lib/bin/start_chrome.sh delete mode 100755 dotfiles/lib/bin/start_hangouts.sh delete mode 100755 dotfiles/lib/bin/start_synergy.sh delete mode 100755 dotfiles/lib/bin/toggle_taffybar.sh delete mode 100755 dotfiles/lib/bin/type_system_password.sh delete mode 100755 dotfiles/lib/bin/wallpaper.sh delete mode 100755 dotfiles/lib/bin/xsettingsd-setup create mode 100755 dotfiles/lib/functions/all_after_char create mode 100755 dotfiles/lib/functions/command_exists create mode 100755 dotfiles/lib/functions/dbus_introspect create mode 100755 dotfiles/lib/functions/environment_variable_exists create mode 100755 dotfiles/lib/functions/get_sink_input_by_pid create mode 100755 dotfiles/lib/functions/list_interfaces create mode 100755 dotfiles/lib/functions/load_default_map create mode 100755 dotfiles/lib/functions/load_xkb_map create mode 100755 dotfiles/lib/functions/localip rename dotfiles/lib/{bin/pahelper.sh => functions/pahelper} (91%) create mode 100755 dotfiles/lib/functions/paismuted create mode 100755 dotfiles/lib/functions/parse_timestamp create mode 100755 dotfiles/lib/functions/pashowvolume create mode 100755 dotfiles/lib/functions/pasink create mode 100755 dotfiles/lib/functions/path_lines create mode 100755 dotfiles/lib/functions/pavolume create mode 100755 dotfiles/lib/functions/rlwhich create mode 100755 dotfiles/lib/functions/rofi_paswitch create mode 100755 dotfiles/lib/functions/run_if_exists create mode 100755 dotfiles/lib/functions/run_unity create mode 100755 dotfiles/lib/functions/set_volume create mode 100755 dotfiles/lib/functions/shell_contains create mode 100755 dotfiles/lib/functions/source_if_exists create mode 100755 dotfiles/lib/functions/timestamp create mode 100755 dotfiles/lib/functions/toggle_taffybar delete mode 100644 dotfiles/lib/shellenv/functions.sh diff --git a/dotfiles/config/autorandr/home_tv/postswitch b/dotfiles/config/autorandr/home_tv/postswitch index ceaacb84..e57a7b31 100755 --- a/dotfiles/config/autorandr/home_tv/postswitch +++ b/dotfiles/config/autorandr/home_tv/postswitch @@ -1,6 +1,6 @@ #!/usr/bin/env zsh # -*- mode:sh -hdmi_sink="$(pahelper.sh | tr -d '\\n' | tr '>' '\\n' | grep hdmi | grep -Eo ': [0-9]+' | tr -d ':')" +hdmi_sink="$(pahelper | tr -d '\\n' | tr '>' '\\n' | grep hdmi | grep -Eo ': [0-9]+' | tr -d ':')" -pahelper.sh "$hdmi_sink" +pahelper "$hdmi_sink" diff --git a/dotfiles/config/xmonad/xmonad.hs b/dotfiles/config/xmonad/xmonad.hs index 810335b3..cc251810 100644 --- a/dotfiles/config/xmonad/xmonad.hs +++ b/dotfiles/config/xmonad/xmonad.hs @@ -212,9 +212,9 @@ virtualClasses = -- Commands -gmailCommand = "start_chrome.sh --new-window https://mail.google.com/mail/u/0/#inbox" +gmailCommand = "google-chrome-stable --new-window https://mail.google.com/mail/u/0/#inbox" spotifyCommand = "spotify" -chromeCommand = "start_chrome.sh" +chromeCommand = "start_chrome" emacsCommand = "emacsclient -c" htopCommand = "alacritty -e htop -t htop" transmissionCommand = "transmission-gtk" @@ -239,9 +239,7 @@ myStartup = do -- Manage hook -myManageHook = maybeReplaceTargetHook <+> - composeOne - [ isFullscreen -?> doFullFloat ] +myManageHook = composeOne [ isFullscreen -?> doFullFloat ] -- Toggles @@ -656,82 +654,7 @@ focusNextClass' = focusNextClass = sameClassOnly focusNextClass' selectClass = join $ myDmenu <$> allClasses - --- Chrome auto minimization -data ReplaceOnNew - = NoTarget - | DontTarget - | Target Window - deriving (Typeable, Read, Show) - -instance ExtensionClass ReplaceOnNew where - initialValue = NoTarget - extensionType = PersistentExtension - -mapWindows f = W.mapWorkspace workspaceHelper - where - stackHelper stack = W.Stack - { W.focus = f $ W.focus stack - , W.up = map f $ W.up stack - , W.down = map f $ W.down stack - } - workspaceHelper ws@W.Workspace {W.stack = stack} = - ws { W.stack = stackHelper <$> stack } - -swapWindows a b = - mapWindows helper - where helper w - | w == a = b - | w == b = a - | otherwise = w - -getTarget = do - t <- XS.get - case t of - Target w -> return $ Just w - DontTarget -> return Nothing - NoTarget -> return Nothing - -maybeReplaceTarget :: Window -> X () -maybeReplaceTarget window = do - t <- getTarget - -- We have an insertUp here to ensure the target isn't deleted - let modifyStackSet target = W.insertUp target . swapWindows window target - replaceTarget target = - windows (modifyStackSet target) >> minimizeWindow target >> - XS.put (initialValue :: ReplaceOnNew) - whenJust t replaceTarget - -maybeReplaceTargetHook = ask >>= (liftX . maybeReplaceTarget) >> return (Endo id) - -setReplaceTarget = withFocused $ XS.put . Target - -getWindowWS a = withWindowSet $ \ws -> return $ listToMaybe - [ w | w <- W.workspaces ws, has a (W.stack w) ] - where has _ Nothing = False - has _ (Just _) = True - -replaceWindow original replacement = - W.delete original . swapWindows original replacement - -chromeReplaceKill = - withFocused $ \w -> do - vClass <- getClass w - if vClass == "Chrome" then - do - replacement <- - runMaybeT $ do - ws <- MaybeT $ join . fmap W.stack <$> getWindowWS w - MaybeT $ - listToMaybe <$> - (intersect <$> minimizedWindows <*> windowsWithSameClass w ws) - let doReplace rep = do - maximizeWindow rep - windows $ replaceWindow w rep - maybe kill doReplace replacement - else - kill -- Gather windows of same class @@ -874,9 +797,9 @@ goToNextScreenX = windows goToNextScreen -- Key bindings -volumeUp = spawn "set_volume.sh --unmute --change-volume +5" -volumeDown = spawn "set_volume.sh --unmute --change-volume -5" -mute = spawn "set_volume.sh --toggle-mute" +volumeUp = spawn "set_volume --unmute --change-volume +5" +volumeDown = spawn "set_volume --unmute --change-volume -5" +mute = spawn "set_volume --toggle-mute" shiftToEmptyOnScreen direction = followingWindow (windowToScreen direction True) >> shiftToEmptyAndView @@ -942,9 +865,6 @@ addKeys conf@XConfig { modMask = modm } = , ((modm, xK_x), addHiddenWorkspace "NSP" >> windows (W.shift "NSP")) , ((modalt, xK_space), deactivateFullOr restoreOrMinimizeOtherClasses) , ((modalt, xK_Return), deactivateFullAnd restoreAllMinimized) - , ((modm .|. controlMask, xK_t), - setReplaceTarget >> spawn "chromix-too open chrome://newtab") - , ((modm .|. controlMask, xK_c), chromeReplaceKill) , ((hyper, xK_g), gatherThisClass) @@ -980,7 +900,6 @@ addKeys conf@XConfig { modMask = modm } = -- Non-XMonad , ((modm, xK_v), spawn "xclip -o | xdotool type --file -") - , ((modm .|. controlMask, xK_s), spawn "split_current_chrome_tab.sh") , ((hyper, xK_v), spawn "rofi_clipit.sh") , ((hyper, xK_p), spawn "rofi-pass") , ((hyper, xK_h), spawn "screenshot.sh") @@ -992,14 +911,13 @@ addKeys conf@XConfig { modMask = modm } = , ((hyper .|. shiftMask, xK_k), spawn "rofi_kill_all.sh") , ((hyper, xK_r), spawn "rofi-systemd") - , ((modalt, xK_z), spawn "split_chrome_tab_to_next_screen.sh") , ((hyper, xK_9), spawn "start_synergy.sh") - , ((hyper, xK_slash), spawn "toggle_taffybar.sh") + , ((hyper, xK_slash), spawn "toggle_taffybar") , ((hyper, xK_space), spawn "skippy-xd") , ((hyper, xK_i), spawn "rofi_select_input.hs") - , ((hyper, xK_o), spawn "rofi_paswitch.sh") - , ((modm, xK_apostrophe), spawn "load_default_map.sh") - , ((modalt, xK_apostrophe), spawn "load_xkb_map.sh") + , ((hyper, xK_o), spawn "rofi_paswitch") + , ((modm, xK_apostrophe), spawn "load_default_map") + , ((modalt, xK_apostrophe), spawn "load_xkb_map") -- Media keys diff --git a/dotfiles/lib/bin/dbus-introspect.sh b/dotfiles/lib/bin/dbus-introspect.sh deleted file mode 100755 index 04acf60e..00000000 --- a/dotfiles/lib/bin/dbus-introspect.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh - -dbus-send --session \ - --dest=$1 \ - --type=method_call \ - --print-reply \ - $2 \ - org.freedesktop.DBus.Introspectable.Introspect | tail -n +2 | sed -e "s/^ *string//" diff --git a/dotfiles/lib/bin/get_sink_input_by_pid.sh b/dotfiles/lib/bin/get_sink_input_by_pid.sh deleted file mode 100755 index 39e70c4a..00000000 --- a/dotfiles/lib/bin/get_sink_input_by_pid.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -get_sink_input_info.hs | jq 'select(.application_process_id == "'"$thePID"'")' diff --git a/dotfiles/lib/bin/list_interfaces.sh b/dotfiles/lib/bin/list_interfaces.sh deleted file mode 100755 index b0346ec3..00000000 --- a/dotfiles/lib/bin/list_interfaces.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -ip link show | grep -vE '^ ' | get_cols -F ':' 2 | xargs -n 1 diff --git a/dotfiles/lib/bin/load_xkb_map.sh b/dotfiles/lib/bin/load_xkb_map.sh deleted file mode 100755 index 841b83e8..00000000 --- a/dotfiles/lib/bin/load_xkb_map.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -XKBDIR="$HOME/.xkb" -XKBMAPFILE="$XKBDIR/keymap/$(hostname --fqdn)" -[[ -r "$XKBMAPFILE" ]] || XKBMAPFILE="${XKBMAPFILE%/*}/default" - -echo "loading keymap from $XKBMAPFILE" - -xkbcomp -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}" - -XKB_DEVICE_DIR="$XKBDIR/devices" - -for file in "$XKB_DEVICE_DIR"/* -do - DEVICE_ID=$(xinput | grep "$(basename $file)" | head -n 1 | grep -Eo "id=[0-9]*" | grep -Eo "[0-9]*") - echo $file - echo device - echo "$DEVICE_ID" - # [ ! -z "$DEVICE_ID" ] && xkbcomp -I"$XKBDIR" -i "$DEVICE_ID" "$file" "${DISPLAY%%.*}" -done diff --git a/dotfiles/lib/bin/pager.sh b/dotfiles/lib/bin/pager.sh index 61643ab3..db8c2282 100755 --- a/dotfiles/lib/bin/pager.sh +++ b/dotfiles/lib/bin/pager.sh @@ -1,6 +1,7 @@ -#!/usr/bin/env zsh +#!/usr/bin/env sh + if environment_variable_exists INSIDE_EMACS; then - emacs_pager -a less "$@" + emacsclient -n "$@" else less -FXr fi diff --git a/dotfiles/lib/bin/quill_from_seed.sh b/dotfiles/lib/bin/quill_from_seed.sh deleted file mode 100755 index 6b96ad94..00000000 --- a/dotfiles/lib/bin/quill_from_seed.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -encrypted_seed_file="$1" - -shift - -gpg --decrypt "$encrypted_seed_file" 2>/dev/null | keysmith private-key -f - -o - | quill --pem-file - "$@" diff --git a/dotfiles/lib/bin/rofi_paswitch.sh b/dotfiles/lib/bin/rofi_paswitch.sh deleted file mode 100755 index a0cd326d..00000000 --- a/dotfiles/lib/bin/rofi_paswitch.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -pahelper.sh | tr -d '\n' | tr '>' '|' | rofi -i -dmenu -sep '|' | grep -Eo ' [0-9]*' | xargs pahelper.sh diff --git a/dotfiles/lib/bin/rofi_wallpaper.sh b/dotfiles/lib/bin/rofi_wallpaper.sh deleted file mode 100755 index 4cff025c..00000000 --- a/dotfiles/lib/bin/rofi_wallpaper.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -find ~/Pictures/wallpaper/use -type f -or -type l | rofi -i -dmenu | xargs wallpaper.sh diff --git a/dotfiles/lib/bin/run_haskell_stack.sh b/dotfiles/lib/bin/run_haskell_stack.sh deleted file mode 100755 index 4b2e098e..00000000 --- a/dotfiles/lib/bin/run_haskell_stack.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash - -cd "$( dirname "${BASH_SOURCE[0]}" )" -echo "$@" -stack build -stack runghc "$@" diff --git a/dotfiles/lib/bin/run_unity.sh b/dotfiles/lib/bin/run_unity.sh deleted file mode 100755 index ed8e9aaa..00000000 --- a/dotfiles/lib/bin/run_unity.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -XDG_CURRENT_DESKTOP='Unity' "$@" diff --git a/dotfiles/lib/bin/screenshot.sh b/dotfiles/lib/bin/screenshot.sh deleted file mode 100755 index 9eb0ec11..00000000 --- a/dotfiles/lib/bin/screenshot.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -args="$(rofi -input /dev/null -dmenu)" -sleep 1 -scrot $args diff --git a/dotfiles/lib/bin/set_volume.sh b/dotfiles/lib/bin/set_volume.sh deleted file mode 100755 index f89dedd3..00000000 --- a/dotfiles/lib/bin/set_volume.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env zsh - -function switch_sink_applications() -{ - echo switching applications - pacmd list-sink-inputs | - awk '/index:/{print $2}' | - xargs -r -I{} pacmd move-sink-input {} $1 || - echo failed -} - -current_default=$(pahelper.sh list | grep '*' | all_after_char ":" | xargs) -environment_variable_exists USE_ONLY_O_PASINK && pahelper.sh "$current_default" - -# XXX: this does not prevent volumes higher than 100 -pulsemixer "$@" -pashowvolume diff --git a/dotfiles/lib/bin/shell_command.sh b/dotfiles/lib/bin/shell_command.sh deleted file mode 100755 index 6c53915e..00000000 --- a/dotfiles/lib/bin/shell_command.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -bash -c "$(rofi -input /dev/null -dmenu)" diff --git a/dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh b/dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh deleted file mode 100755 index c472b01e..00000000 --- a/dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env zsh - -split_current_chrome_tab.sh -xdotool key --clearmodifiers "Shift_L+Super_L+z" diff --git a/dotfiles/lib/bin/split_current_chrome_tab.sh b/dotfiles/lib/bin/split_current_chrome_tab.sh deleted file mode 100755 index 32a20659..00000000 --- a/dotfiles/lib/bin/split_current_chrome_tab.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -chromix-too raw chrome.windows.getLastFocused '{"populate": true}' | jq -cM '.tabs[]' | jq 'select(.active)' | jq .id | xargs split_tab_by_id.sh diff --git a/dotfiles/lib/bin/split_tab_by_id.sh b/dotfiles/lib/bin/split_tab_by_id.sh deleted file mode 100755 index fcd4a940..00000000 --- a/dotfiles/lib/bin/split_tab_by_id.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env zsh - -echo $1 -chromix-too raw chrome.windows.create '{"tabId": '"$1}" diff --git a/dotfiles/lib/bin/start_chrome.sh b/dotfiles/lib/bin/start_chrome.sh deleted file mode 100755 index 7a88fbdd..00000000 --- a/dotfiles/lib/bin/start_chrome.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -${IMALISON_CHROME_EX:-google-chrome-stable} $@ diff --git a/dotfiles/lib/bin/start_hangouts.sh b/dotfiles/lib/bin/start_hangouts.sh deleted file mode 100755 index 91bb07f4..00000000 --- a/dotfiles/lib/bin/start_hangouts.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -HANGOUTS_PROFILE="Default" - -[ -e $HOME/.hangouts_profile ] && HANGOUTS_PROFILE="$(cat $HOME/.hangouts_profile)" - -start_chrome.sh \ - --profile-directory="$HANGOUTS_PROFILE" \ - --app-id=knipolnnllmklapflnccelgolnpehhpl diff --git a/dotfiles/lib/bin/start_synergy.sh b/dotfiles/lib/bin/start_synergy.sh deleted file mode 100755 index 33542c86..00000000 --- a/dotfiles/lib/bin/start_synergy.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -synergy_init_with_client imalison-home.local diff --git a/dotfiles/lib/bin/toggle_taffybar.sh b/dotfiles/lib/bin/toggle_taffybar.sh deleted file mode 100755 index 5f690c2a..00000000 --- a/dotfiles/lib/bin/toggle_taffybar.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -dbus-send --print-reply=literal --dest=taffybar.toggle /taffybar/toggle taffybar.toggle.toggleCurrent diff --git a/dotfiles/lib/bin/type_system_password.sh b/dotfiles/lib/bin/type_system_password.sh deleted file mode 100755 index 2e4a15f6..00000000 --- a/dotfiles/lib/bin/type_system_password.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -xdotool type --clearmodifiers "$(keepass_system_password)" diff --git a/dotfiles/lib/bin/wallpaper.sh b/dotfiles/lib/bin/wallpaper.sh deleted file mode 100755 index 8d28320b..00000000 --- a/dotfiles/lib/bin/wallpaper.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env zsh - -wallpaper "$@" diff --git a/dotfiles/lib/bin/xsettingsd-setup b/dotfiles/lib/bin/xsettingsd-setup deleted file mode 100755 index 754254f7..00000000 --- a/dotfiles/lib/bin/xsettingsd-setup +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env sh - -dpi="$1" - -if [ -z $dpi ]; then - # Don't try to guess DPI. For a laptop, we don't want the same DPI as - # for an external screen. Just hardcode stuff... - case $(hostname),$(xrandr --current | \ - sed -n 's/\([^ ]*\) connected .*[0-9][0-9]*x[0-9][0-9]*+[0-9][0-9]*+[0-9][0-9]* .*/\1/p' | \ - sort | tr '\n' ':') in - imalison-arch,DVI-D-0:HDMI-0:) dpi=96 ;; - imalison-uber-loaner,eDP1:) dpi=96 ;; - imalison-mpb-arch,eDP-1:) dpi=144 ;; - imalison-mpb-arch,*:) dpi=144 ;; - *) dpi=96 ;; - esac -fi - -echo "Setting dpi to $dpi" - -# Build xsettingsd.local -cp ~/.xsettingsd ~/.xsettingsd.local -echo Xft/DPI $(( $dpi * 1024 )) >> ~/.xsettingsd.local - -# # Also use xrdb for very old stuff (you know, LibreOffice) -echo Xft.dpi: "$dpi" | xrdb -merge - -# Signal xsettingsd -pid=$(xprop -name xsettingsd _NET_WM_PID 2> /dev/null | awk '{print $NF}') -if [ x"$pid" = x ]; then - xsettingsd -c ~/.xsettingsd.local -else - kill -HUP $pid -fi diff --git a/dotfiles/lib/functions/all_after_char b/dotfiles/lib/functions/all_after_char new file mode 100755 index 00000000..93773bf7 --- /dev/null +++ b/dotfiles/lib/functions/all_after_char @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +function all_after_char { + while read -r line; do + echo ${line##*$1} + done; +} + +all_after_char "$@" diff --git a/dotfiles/lib/functions/command_exists b/dotfiles/lib/functions/command_exists new file mode 100755 index 00000000..18ce3a80 --- /dev/null +++ b/dotfiles/lib/functions/command_exists @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +function command_exists { + hash "$1" 2>/dev/null 1>/dev/null +} + +command_exists diff --git a/dotfiles/lib/functions/dbus_introspect b/dotfiles/lib/functions/dbus_introspect new file mode 100755 index 00000000..1ca6302d --- /dev/null +++ b/dotfiles/lib/functions/dbus_introspect @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +function dbus-introspect { + dbus-send --session \ + --dest=$1 \ + --type=method_call \ + --print-reply \ + $2 \ + org.freedesktop.DBus.Introspectable.Introspect | tail -n +2 | sed -e "s/^ *string//" +} + +dbus-introspect diff --git a/dotfiles/lib/functions/environment_variable_exists b/dotfiles/lib/functions/environment_variable_exists new file mode 100755 index 00000000..c2915651 --- /dev/null +++ b/dotfiles/lib/functions/environment_variable_exists @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +function environment_variable_exists { + eval "value=\"\${$1+x}\"" + [ ! -z $value ] +} + +environment_variable_exists + diff --git a/dotfiles/lib/functions/get_sink_input_by_pid b/dotfiles/lib/functions/get_sink_input_by_pid new file mode 100755 index 00000000..41e8ff1d --- /dev/null +++ b/dotfiles/lib/functions/get_sink_input_by_pid @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +function get_sink_input_by_pid { + get_sink_input_info.hs | jq 'select(.application_process_id == "'"$thePID"'")' +} + +get_sink_input_by_pid + diff --git a/dotfiles/lib/functions/list_interfaces b/dotfiles/lib/functions/list_interfaces new file mode 100755 index 00000000..d7f12657 --- /dev/null +++ b/dotfiles/lib/functions/list_interfaces @@ -0,0 +1,7 @@ +#!/usr/bin/env zsh + +function list_interfaces { + ip link show | grep -vE '^ ' | get_cols -F ':' 2 | xargs -n 1 +} + +list_interfaces diff --git a/dotfiles/lib/functions/load_default_map b/dotfiles/lib/functions/load_default_map new file mode 100755 index 00000000..7df7ab01 --- /dev/null +++ b/dotfiles/lib/functions/load_default_map @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +function load_default_map { + XKBDIR="$HOME/.xkb" + XKBMAPFILE="$XKBDIR/keymap/default" + + echo "loading keymap from $XKBMAPFILE" + + xkbcomp -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}" +} + +load_default_map diff --git a/dotfiles/lib/functions/load_xkb_map b/dotfiles/lib/functions/load_xkb_map new file mode 100755 index 00000000..8053699c --- /dev/null +++ b/dotfiles/lib/functions/load_xkb_map @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +function load_xkb_map { + XKBDIR="$HOME/.xkb" + XKBMAPFILE="$XKBDIR/keymap/$(hostname --fqdn)" + [[ -r "$XKBMAPFILE" ]] || XKBMAPFILE="${XKBMAPFILE%/*}/default" + + echo "loading keymap from $XKBMAPFILE" + + xkbcomp -I"$XKBDIR" "$XKBMAPFILE" "${DISPLAY%%.*}" + + XKB_DEVICE_DIR="$XKBDIR/devices" + + for file in "$XKB_DEVICE_DIR"/* + do + DEVICE_ID=$(xinput | grep "$(basename $file)" | head -n 1 | grep -Eo "id=[0-9]*" | grep -Eo "[0-9]*") + echo $file + echo device + echo "$DEVICE_ID" + # [ ! -z "$DEVICE_ID" ] && xkbcomp -I"$XKBDIR" -i "$DEVICE_ID" "$file" "${DISPLAY%%.*}" + done +} + +load_xkb_map diff --git a/dotfiles/lib/functions/localip b/dotfiles/lib/functions/localip new file mode 100755 index 00000000..fa2b122d --- /dev/null +++ b/dotfiles/lib/functions/localip @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +function localip { + case `uname` in + 'Darwin') + ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' + ;; + 'Linux') + ip -4 addr | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v 127.0.0.1 | head -n 1 + ;; + esac +} + +localip diff --git a/dotfiles/lib/bin/pahelper.sh b/dotfiles/lib/functions/pahelper similarity index 91% rename from dotfiles/lib/bin/pahelper.sh rename to dotfiles/lib/functions/pahelper index 8a4c219d..b21c8f27 100755 --- a/dotfiles/lib/bin/pahelper.sh +++ b/dotfiles/lib/functions/pahelper @@ -52,7 +52,7 @@ function switch_sink_kmix_master() function switch_sink() { - switch_sink_default "$@" + xexswitch_sink_default "$@" switch_sink_applications "$@" switch_sink_kmix_master "$@" } @@ -90,9 +90,13 @@ function help_me() echo "Usage: $0 [gui|list|]" } -case "${1:-}" in - (""|list) list_sinks ;; - ([0-9]*) switch_sink "$@" ;; - (gui) switch_gui ;; - (*) help_me ;; -esac +function pahelper { + case "${1:-}" in + (""|list) list_sinks ;; + ([0-9]*) switch_sink "$@" ;; + (gui) switch_gui ;; + (*) help_me ;; + esac +} + +pahelper diff --git a/dotfiles/lib/functions/paismuted b/dotfiles/lib/functions/paismuted new file mode 100755 index 00000000..286d6a12 --- /dev/null +++ b/dotfiles/lib/functions/paismuted @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +function paismuted { + pactl list sinks | grep "$(pasink)" -A 10 | grep Mute | grep -q yes +} + +paismuted diff --git a/dotfiles/lib/functions/parse_timestamp b/dotfiles/lib/functions/parse_timestamp new file mode 100755 index 00000000..810cd50e --- /dev/null +++ b/dotfiles/lib/functions/parse_timestamp @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +function parse_timestamp { + date -d "@$1" +} + +parse_timestamp diff --git a/dotfiles/lib/functions/pashowvolume b/dotfiles/lib/functions/pashowvolume new file mode 100755 index 00000000..e5c9ed9f --- /dev/null +++ b/dotfiles/lib/functions/pashowvolume @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +function pashowvolume { + if paismuted; then + volnoti-show -m + else + actual=$(pavolume) + max=100 + show=$(( actual < max ? actual : max )) + volnoti-show "$show" + fi +} + +pashowvolume + diff --git a/dotfiles/lib/functions/pasink b/dotfiles/lib/functions/pasink new file mode 100755 index 00000000..ef652e63 --- /dev/null +++ b/dotfiles/lib/functions/pasink @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +function pasink { + pacmd stat | awk -F": " '/^Default sink name: /{print $2}' +} + +pasink "$@" diff --git a/dotfiles/lib/functions/path_lines b/dotfiles/lib/functions/path_lines new file mode 100755 index 00000000..8f80e660 --- /dev/null +++ b/dotfiles/lib/functions/path_lines @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +function path_lines { + IFS=':' read -A ADDR <<< "$PATH" + for one_path in "${ADDR[@]}"; do + echo $one_path + done +} + +path_lines diff --git a/dotfiles/lib/functions/pavolume b/dotfiles/lib/functions/pavolume new file mode 100755 index 00000000..732f514c --- /dev/null +++ b/dotfiles/lib/functions/pavolume @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +function pavolume { + pacmd list-sinks | + awk '/^\s+name: /{indefault = $2 == "<'"$(pasink)"'>"} + /^\s+volume: / && indefault {print $5; exit}' | grep -Eo "[0-9]*" +} + +pavolume diff --git a/dotfiles/lib/functions/rlwhich b/dotfiles/lib/functions/rlwhich new file mode 100755 index 00000000..bd9f5c5e --- /dev/null +++ b/dotfiles/lib/functions/rlwhich @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +function rlwhich { + readlink -f "$(which $1)" +} + +rlwhich "$@" + diff --git a/dotfiles/lib/functions/rofi_paswitch b/dotfiles/lib/functions/rofi_paswitch new file mode 100755 index 00000000..dd24a0eb --- /dev/null +++ b/dotfiles/lib/functions/rofi_paswitch @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +function rofi_paswitch { + pahelper | tr -d '\n' | tr '>' '|' | rofi -i -dmenu -sep '|' | grep -Eo ' [0-9]*' | xargs pahelper +} + +rofi_paswitch diff --git a/dotfiles/lib/functions/run_if_exists b/dotfiles/lib/functions/run_if_exists new file mode 100755 index 00000000..9709dea1 --- /dev/null +++ b/dotfiles/lib/functions/run_if_exists @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +function run_if_exists { + command_exists "$0" && "$@" +} + +run_if_exists diff --git a/dotfiles/lib/functions/run_unity b/dotfiles/lib/functions/run_unity new file mode 100755 index 00000000..68a4fa9b --- /dev/null +++ b/dotfiles/lib/functions/run_unity @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +function run_unity { + XDG_CURRENT_DESKTOP='Unity' "$@" +} + +run_unity "$@" + diff --git a/dotfiles/lib/functions/set_volume b/dotfiles/lib/functions/set_volume new file mode 100755 index 00000000..4784f3b2 --- /dev/null +++ b/dotfiles/lib/functions/set_volume @@ -0,0 +1,19 @@ +#!/usr/bin/env sh + +function switch_sink_applications() +{ + echo switching applications + pacmd list-sink-inputs | + awk '/index:/{print $2}' | + xargs -r -I{} pacmd move-sink-input {} $1 || + echo failed +} + +function set_volume { + current_default=$(pahelper list | grep '*' | all_after_char ":" | xargs) + environment_variable_exists USE_ONLY_O_PASINK && pahelper "$current_default" + + # XXX: this does not prevent volumes higher than 100 + pulsemixer "$@" + pashowvolume +} diff --git a/dotfiles/lib/functions/shell_contains b/dotfiles/lib/functions/shell_contains new file mode 100755 index 00000000..a59153ae --- /dev/null +++ b/dotfiles/lib/functions/shell_contains @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +function shell_contains () { + local e + for e in "${@:2}"; do + [[ "$1" == *"$e"* ]] && return 0 + done + return 1 +} + +shell_contains diff --git a/dotfiles/lib/functions/source_if_exists b/dotfiles/lib/functions/source_if_exists new file mode 100755 index 00000000..59a895f1 --- /dev/null +++ b/dotfiles/lib/functions/source_if_exists @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +function source_if_exists { + test -r "$1" && source "$1" +} + +source_if_exists diff --git a/dotfiles/lib/functions/timestamp b/dotfiles/lib/functions/timestamp new file mode 100755 index 00000000..623a7c02 --- /dev/null +++ b/dotfiles/lib/functions/timestamp @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +function timestamp { + date +%s +} + +timestamp + diff --git a/dotfiles/lib/functions/toggle_taffybar b/dotfiles/lib/functions/toggle_taffybar new file mode 100755 index 00000000..5b13b244 --- /dev/null +++ b/dotfiles/lib/functions/toggle_taffybar @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +function toggle_taffybar { + dbus-send --print-reply=literal --dest=taffybar.toggle /taffybar/toggle taffybar.toggle.toggleCurrent +} + +toggle_taffybar + diff --git a/dotfiles/lib/shellenv/functions.sh b/dotfiles/lib/shellenv/functions.sh deleted file mode 100644 index cfe0705d..00000000 --- a/dotfiles/lib/shellenv/functions.sh +++ /dev/null @@ -1,298 +0,0 @@ -function command_exists { - hash "$1" 2>/dev/null 1>/dev/null -} - -function run_if_exists { - command_exists "$@" && "$@" -} - -function shell_contains () { - local e - for e in "${@:2}"; do - [[ "$1" == *"$e"* ]] && return 0 - done - return 1 -} - -function environment_variable_exists { - eval "value=\"\${$1+x}\"" - [ ! -z $value ] -} - -function get_python_scripts_path { - python -c "import sysconfig; print sysconfig.get_path('scripts')" -} - -function path_lines { - IFS=':' read -A ADDR <<< "$PATH" - for one_path in "${ADDR[@]}"; do - echo $one_path - done -} - -function indirect_expand { - eval "value=\"\${$1}\"" - echo $value -} - -function exists_in_path_var { - target=${2-PATH} - local path_contents="$(indirect_expand $target)" - [[ ":$path_contents:" == *":$1:"* ]] -} - -function split_into_vars { - local string IFS - - string="$1" - IFS="$2" - shift 2 - read -r -- "$@" <"} - /^\s+volume: / && indefault {print $5; exit}' | grep -Eo "[0-9]*" -} - -function paismuted { - pactl list sinks | grep "$(pasink)" -A 10 | grep Mute | grep -q yes -} - -function pashowvolume { - if paismuted; then - volnoti-show -m - else - volnoti-show "$(min $(pavolume) 100)" - fi -} - -function pashowinputbypid { - get_sink_input_info.hs | jq 'select(.application_process_id == "'"$1"'")' -} diff --git a/dotfiles/zshrc b/dotfiles/zshrc index a218e8f5..1050ce54 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -1,7 +1,7 @@ # This is necessary for tramp. [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return -test -r ~/.custom.sh && source ~/.custom.sh +source_if_exists ~/.custom.sh source_if_exists ~/.this-machine.sh function emacs_ansi_term_support { diff --git a/nixos/base.nix b/nixos/base.nix index 323ac64d..02e1dfab 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -4,6 +4,7 @@ ./users.nix ./fonts.nix ./essential.nix + ./environment.nix ]; # Allow all the things @@ -67,19 +68,6 @@ # TODO: Add a comment explaining what this does. services.gnome.at-spi2-core.enable = true; - # Shell configuration - programs.zsh = { - enable = true; - syntaxHighlighting = { - enable = true; - }; - ohMyZsh = { - enable = true; - plugins = [ "git" "sudo" "pip" ]; - }; - spaceship-prompt.enable = true; - }; - services.openssh.enable = true; services.autorandr.enable = true; @@ -90,14 +78,6 @@ hardware.keyboard.zsa.enable = true; - environment = { - homeBinInPath = true; - localBinInPath = true; - extraInit = '' - export PATH="$HOME/.lib/bin:$PATH" - ''; - }; - services.xserver = { exportConfiguration = true; enable = true; diff --git a/nixos/flake.lock b/nixos/flake.lock index 49ac2dae..384c94bf 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -134,7 +134,7 @@ }, "git-ignore-nix_4": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1626413882, @@ -153,7 +153,7 @@ }, "git-ignore-nix_5": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1626413882, @@ -188,37 +188,19 @@ "type": "github" } }, - "gitIgnoreNix_2": { - "inputs": { - "nixpkgs": "nixpkgs_11" - }, - "locked": { - "lastModified": 1626413882, - "narHash": "sha256-ZHw1YVsrs7rG9jPEH0ZabbbCTdnVr48FAwK6GCQPSF4=", - "owner": "IvanMalison", - "repo": "gitignore.nix", - "rev": "a2ffb0bfd0145ca57d792a6f9f76f5c305ca29b7", - "type": "github" - }, - "original": { - "owner": "IvanMalison", - "repo": "gitignore.nix", - "type": "github" - } - }, "gtk-sni-tray": { "inputs": { - "flake-utils": "flake-utils_4", - "git-ignore-nix": "git-ignore-nix_4", - "nixpkgs": "nixpkgs_7", + "flake-utils": "flake-utils_3", + "git-ignore-nix": "git-ignore-nix_3", + "nixpkgs": "nixpkgs_6", "status-notifier-item": "status-notifier-item" }, "locked": { - "lastModified": 1627097793, - "narHash": "sha256-/VADe26PqxUCUav3gVtDp0ov8irDyYMWINFBDGmP2Ik=", + "lastModified": 1627764331, + "narHash": "sha256-AgJGmLGNSraNr/zL+IIYF/qFUY0fEfivxfIoqIsiRWk=", "owner": "taffybar", "repo": "gtk-sni-tray", - "rev": "07a8b24db5245b58ca39ed6c2fd6bac4e51ccc13", + "rev": "ceb15d9c0980d4359ad1b0374ba221229a14acb7", "type": "github" }, "original": { @@ -235,7 +217,7 @@ ] }, "locked": { - "narHash": "sha256-Yz2tpRVaNPxKiBkw8lEzH77/MuI4zVOiCk4LE61pOII=", + "narHash": "sha256-FNXyt5dlC8JG/0Tsf8nrJ+DDP5uip9Tsqt3WllmAkk8=", "path": "./home-manager", "type": "path" }, @@ -300,7 +282,7 @@ }, "nixpkgs": { "locked": { - "narHash": "sha256-XaIGzF86aDiWYO4pHH3v4KsCmr3kSzIQV2+OX3kUH8M=", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", "path": "./nixpkgs", "type": "path" }, @@ -311,19 +293,8 @@ }, "nixpkgs_10": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", - "type": "path" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_11": { - "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -333,8 +304,8 @@ }, "nixpkgs_2": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -344,8 +315,8 @@ }, "nixpkgs_3": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -355,8 +326,8 @@ }, "nixpkgs_4": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -366,8 +337,8 @@ }, "nixpkgs_5": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -377,8 +348,8 @@ }, "nixpkgs_6": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -388,8 +359,8 @@ }, "nixpkgs_7": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -399,8 +370,8 @@ }, "nixpkgs_8": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -410,8 +381,8 @@ }, "nixpkgs_9": { "locked": { - "narHash": "sha256-nUOrWoAiH6e3u0+k8FxaqdeVz9JnO3KSLfCo3j+hHFQ=", - "path": "/nix/store/4jd0wffvcy4ljdlxasf201pm57s6cq57-source", + "narHash": "sha256-Iv7J5n9zN4ejsQjnAJLDv+/+/+BH/kgfPAzMXrcqsZ0=", + "path": "./nixpkgs", "type": "path" }, "original": { @@ -426,11 +397,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1626744467, - "narHash": "sha256-YkJkOZTz1yxj63e6kAOkgxPmK0CIFpDNXyMHvxctn9k=", + "lastModified": 1627789093, + "narHash": "sha256-rnQ7vDF9g2xqRpw62lkCyxBiq6cXhWgfoF7lx1WoNMI=", "owner": "IvanMalison", "repo": "notifications-tray-icon", - "rev": "0d83e7fba0592bec4566662140ab197491d99126", + "rev": "2fd47641d0cb046c78de9b4577cb30bc49e607ea", "type": "github" }, "original": { @@ -454,16 +425,16 @@ }, "status-notifier-item": { "inputs": { - "flake-utils": "flake-utils_5", - "git-ignore-nix": "git-ignore-nix_5", - "nixpkgs": "nixpkgs_9" + "flake-utils": "flake-utils_4", + "git-ignore-nix": "git-ignore-nix_4", + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1627094793, - "narHash": "sha256-teycP5kmokSCxtJjRaYEGx8DWnGKKO6qQG37iqdIdEM=", + "lastModified": 1627765570, + "narHash": "sha256-EJHvVtYQvohhOhznY5Iy3GR0zyjwMF+lsCr5hgL3ziw=", "owner": "taffybar", "repo": "status-notifier-item", - "rev": "90f34bc859edbdb8c63802ee8a149d1fefac4415", + "rev": "c5d7d898e4f13ec9864e5047b6da25de62535672", "type": "github" }, "original": { @@ -477,49 +448,31 @@ "inputs": { "flake-utils": "flake-utils_2", "git-ignore-nix": "git-ignore-nix_2", - "nixpkgs": [ - "nixpkgs" - ], - "taffybar": "taffybar_2" - }, - "locked": { - "narHash": "sha256-gHDOm6LziKcuXsmFnVD58cE3VBo0zBEZ+3mw++bJwZs=", - "path": "../dotfiles/config/taffybar", - "type": "path" - }, - "original": { - "path": "../dotfiles/config/taffybar", - "type": "path" - } - }, - "taffybar_2": { - "inputs": { - "flake-utils": "flake-utils_3", - "git-ignore-nix": "git-ignore-nix_3", "gtk-sni-tray": "gtk-sni-tray", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "narHash": "sha256-8/Jliml56I/GahY4fG6F+nEwJubtCjJgbd06dk78pQU=", - "path": "./taffybar", + "narHash": "sha256-mN5ZDg16JysS4+JYBgfr8klx34lND5c6qLS/DOYMWZA=", + "path": "../dotfiles/config/taffybar/taffybar", "type": "path" }, "original": { - "path": "./taffybar", + "path": "../dotfiles/config/taffybar/taffybar", "type": "path" } }, "xmonad": { "inputs": { - "gitIgnoreNix": "gitIgnoreNix", + "flake-utils": "flake-utils_5", + "git-ignore-nix": "git-ignore-nix_5", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "narHash": "sha256-tRk4foS5QiPx/GwTSl6+lfY15d1Y3822DjDxqMHjf34=", + "narHash": "sha256-LsqmlW82Zmyj4PW8T3kJTm+p599/lG1fOcEa1Sgcjg4=", "path": "../dotfiles/config/xmonad/xmonad", "type": "path" }, @@ -530,13 +483,13 @@ }, "xmonad-contrib": { "inputs": { - "gitIgnoreNix": "gitIgnoreNix_2", + "gitIgnoreNix": "gitIgnoreNix", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "narHash": "sha256-jbikN00AydMA542fcPuVgMcVobagwf6/Wbgj804PjYA=", + "narHash": "sha256-RsCxI72sx+LIQTz8uAj+8qvgmPhENOhFDDyZjHbPohU=", "path": "../dotfiles/config/xmonad/xmonad-contrib", "type": "path" },