diff options
author | Mateja Marić <mail@matejamaric.com> | 2021-02-07 12:49:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-07 12:49:43 +0100 |
commit | 3ed060173b0a3110aac0a5f53a4cb534531b3c28 (patch) | |
tree | ded04f4fe15f8490b8c0e48b9684b7d2e990bfe5 | |
parent | 5d0c80a46c76dd1712f274ff6ddce05526253983 (diff) | |
parent | 3621cc09ea17c771d9c99d684d1e9bafc69fb222 (diff) | |
download | dotfiles-3ed060173b0a3110aac0a5f53a4cb534531b3c28.tar.gz dotfiles-3ed060173b0a3110aac0a5f53a4cb534531b3c28.zip |
Merge pull request #4 from MatejaMaric/fix-scripts
Fix issue #2
-rw-r--r-- | .bashrc | 2 | ||||
-rw-r--r-- | .config/i3/config | 2 | ||||
-rw-r--r-- | .config/qtile/config.py | 4 | ||||
-rwxr-xr-x | .local/bin/mpd_show.sh (renamed from scripts/mpd_show) | 2 | ||||
-rwxr-xr-x | .local/bin/unmount_usb.sh (renamed from scripts/unmount-usb) | 3 | ||||
-rw-r--r-- | .xmonad/xmonad.hs | 2 | ||||
-rw-r--r-- | README.md | 5 |
7 files changed, 11 insertions, 9 deletions
@@ -114,7 +114,7 @@ if ! shopt -oq posix; then fi fi -PATH=$PATH:/home/$USER/stuff/scripts +PATH=$PATH:/home/$USER/.local/bin/ export EDITOR='nvim' export VISUAL='nvim' diff --git a/.config/i3/config b/.config/i3/config index 7c002d1..6a5e3ce 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -14,7 +14,7 @@ bindsym $mod+apostrophe exec amixer -q sset Master 5%- bindsym $mod+p exec amixer -q sset Master toggle bindsym $mod+m exec scrot -ze 'mv $f ~/screenshots/' -bindsym $mod+u exec ~/scripts/unmount-usb +bindsym $mod+u exec ~/.local/bin/unmount_usb.sh #END floating_modifier $mod diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 501d807..aa3abcc 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -28,13 +28,13 @@ keys = [ desc="Toggle mute"), # Programs... - Key([mod], "e", lazy.spawn("bash -c ~/stuff/scripts/unmount-usb"), + Key([mod], "e", lazy.spawn("bash -c ~/.local/bin/unmount_usb.sh"), desc="Eject USB"), Key([mod, "control"], "p", lazy.spawn("scrot -ze 'mv $f ~/stuff/pictures/screenshots/'"), desc="Take a screenshot"), Key([mod], "x", lazy.spawn("mpc toggle"), desc="Pause/Resume MPD playback"), - Key([mod, "shift"], "x", lazy.spawn("bash -c ~/stuff/scripts/mpd_show"), + Key([mod, "shift"], "x", lazy.spawn("bash -c ~/.local/bin/mpd_show.sh"), desc="Display song."), Key([mod], "z", lazy.spawn("mpc next"), desc="MPD next song"), diff --git a/scripts/mpd_show b/.local/bin/mpd_show.sh index 8d14a1d..1d0629a 100755 --- a/scripts/mpd_show +++ b/.local/bin/mpd_show.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash raw="$(mpc)" song=$(echo "$raw" | sed -n '1p') diff --git a/scripts/unmount-usb b/.local/bin/unmount_usb.sh index c90dde4..764365c 100755 --- a/scripts/unmount-usb +++ b/.local/bin/unmount_usb.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash + options=$(lsblk | grep /media/$USER | rev | cut -d ' ' -f 1 | rev) [ -n "$options" ] && opt_num=$(echo "$options" | wc -l) || opt_num=0 if [ $opt_num == 0 ]; then diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index cf2f262..e151dd9 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -86,7 +86,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ , ((modm, xK_bracketleft), spawn "amixer -q sset Master 5%+") , ((modm, xK_apostrophe), spawn "amixer -q sset Master 5%-") , ((modm, xK_semicolon), spawn "amixer -q sset Master toggle") - , ((modm, xK_u ), spawn "~/stuff/scripts/unmount-usb") + , ((modm, xK_u ), spawn "~/.local/bin/unmount_usb.sh") , ((modm, xK_s ), spawn "scrot -ze 'mv $f ~/stuff/pictures/screenshots/'") -- my keybindings stop ----------------------------------------------- @@ -23,8 +23,9 @@ Configuration files for programs I use and used to use, including some helper sc ## Helper scripts: -- mpd_show: Show currently playing song in pop-up. -- unmount-usb: Unmount currently mounted USB drive or one selected from list of currently mounted USB drives. +- mpd_show.sh: Show currently playing song in pop-up. +- unmount_usb.sh: Unmount currently mounted USB drive or one selected from list of currently mounted USB drives. +- save_notification.sh: Save notifications to `/tmp/notifications`. ## Note on Neovim! |