diff options
author | azahi <azahi@teknik.io> | 2018-10-03 14:30:31 +0300 |
---|---|---|
committer | azahi <azahi@teknik.io> | 2018-10-03 14:30:31 +0300 |
commit | 7e19bd16b48bd009a3b4d0f029c445bb49d95615 (patch) | |
tree | ff4fc89baaef3a684294463e18569fd56996f3bd /misc | |
parent | Release 0.2.1.1 (diff) |
Move to 0.15
Fix windows not showing with fullscreen hooks Add misc directory with stuff that should be moved to ~/.xmonad Switch indentation style Add submodules
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/bin/mpc-play-pause.sh | 8 | ||||
-rwxr-xr-x | misc/bin/nsp-console.sh | 8 | ||||
-rwxr-xr-x | misc/bin/screenlock.sh | 7 | ||||
-rwxr-xr-x | misc/bin/toggle-compton.sh | 8 | ||||
-rwxr-xr-x | misc/bin/toggle-redshift.sh | 9 | ||||
-rwxr-xr-x | misc/bin/toggle-touchpad.sh | 11 | ||||
-rwxr-xr-x | misc/bin/toggle-trackpoint.sh | 11 | ||||
-rwxr-xr-x | misc/bin/xmobar/fcitx.sh | 16 | ||||
-rwxr-xr-x | misc/bin/xshot-select-upload.sh | 7 | ||||
-rwxr-xr-x | misc/bin/xshot-select.sh | 5 | ||||
-rwxr-xr-x | misc/bin/xshot-upload.sh | 7 | ||||
-rwxr-xr-x | misc/bin/xshot.sh | 5 | ||||
-rw-r--r-- | misc/xmobarrcBot.hs | 64 | ||||
-rw-r--r-- | misc/xmobarrcTop.hs | 40 |
14 files changed, 206 insertions, 0 deletions
diff --git a/misc/bin/mpc-play-pause.sh b/misc/bin/mpc-play-pause.sh new file mode 100755 index 0000000..3fb4f3b --- /dev/null +++ b/misc/bin/mpc-play-pause.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +if mpc | grep -q "playing" +then + mpc --no-status pause +else + mpc --no-status play +fi diff --git a/misc/bin/nsp-console.sh b/misc/bin/nsp-console.sh new file mode 100755 index 0000000..5d19f46 --- /dev/null +++ b/misc/bin/nsp-console.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +if tmux list-sessions | grep -q "scratchpad" +then + tmux attach-session -t "scratchpad" +else + tmux new-session -s "scratchpad" -n "scratchpad" -c "${HOME}" +fi diff --git a/misc/bin/screenlock.sh b/misc/bin/screenlock.sh new file mode 100755 index 0000000..28dbe0c --- /dev/null +++ b/misc/bin/screenlock.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +i3lock \ + --no-unlock-indicator \ + --image "${HOME}/pictures/wallpapers/mill-lock.png" \ + --pointer default \ + --ignore-empty-password diff --git a/misc/bin/toggle-compton.sh b/misc/bin/toggle-compton.sh new file mode 100755 index 0000000..91ebc4d --- /dev/null +++ b/misc/bin/toggle-compton.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +if [[ $(pgrep 'compton') ]] +then + pkill "compton" +else + compton -b --config "${XDG_CONFIG_HOME}/compton.conf" +fi diff --git a/misc/bin/toggle-redshift.sh b/misc/bin/toggle-redshift.sh new file mode 100755 index 0000000..8ba6b60 --- /dev/null +++ b/misc/bin/toggle-redshift.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if [[ $(pgrep 'redshift') ]] +then + pkill "redshift" +else + redshift -c "${XDG_CONFIG_HOME}/redshift.conf" & + disown redshift +fi diff --git a/misc/bin/toggle-touchpad.sh b/misc/bin/toggle-touchpad.sh new file mode 100755 index 0000000..5a30528 --- /dev/null +++ b/misc/bin/toggle-touchpad.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +ID=$(xinput list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}') +STATE=$(xinput list-props "$ID" | awk '/Device Enabled/ {print $4}') + +if [ "$STATE" -eq 1 ] +then + xinput disable "$ID" +else + xinput enable "$ID" +fi diff --git a/misc/bin/toggle-trackpoint.sh b/misc/bin/toggle-trackpoint.sh new file mode 100755 index 0000000..b0b3501 --- /dev/null +++ b/misc/bin/toggle-trackpoint.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +ID=$(xinput list | grep -Eo 'TrackPoint\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}') +STATE=$(xinput list-props "$ID" | awk '/Device Enabled/ {print $4}') + +if [ "$STATE" -eq 1 ] +then + xinput disable "$ID" +else + xinput enable "$ID" +fi diff --git a/misc/bin/xmobar/fcitx.sh b/misc/bin/xmobar/fcitx.sh new file mode 100755 index 0000000..ddf1826 --- /dev/null +++ b/misc/bin/xmobar/fcitx.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +status="$(fcitx-remote)" +set out + +if [[ "$status" = 0 ]] +then + out="Off" +elif [[ "$status" = 1 ]] +then + out="Disabled" +else + out="Enabled" +fi + +echo -e "$out" diff --git a/misc/bin/xshot-select-upload.sh b/misc/bin/xshot-select-upload.sh new file mode 100755 index 0000000..e846800 --- /dev/null +++ b/misc/bin/xshot-select-upload.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +PIC="${HOME}/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" + +maim --format=png --hidecursor --quality 8 --select "${PIC}" && \ + curl --form "file=@${PIC}" "https://0x0.st" | \ + xclip -quiet diff --git a/misc/bin/xshot-select.sh b/misc/bin/xshot-select.sh new file mode 100755 index 0000000..53ad782 --- /dev/null +++ b/misc/bin/xshot-select.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +PIC="${HOME}/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" + +maim --format=png --hidecursor --quality 8 --select "${PIC}" diff --git a/misc/bin/xshot-upload.sh b/misc/bin/xshot-upload.sh new file mode 100755 index 0000000..91c23f4 --- /dev/null +++ b/misc/bin/xshot-upload.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +PIC="${HOME}/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" + +maim --format=png --hidecursor --quality 8 "${PIC}" && \ + curl --form "file=@${PIC}" "https://0x0.st" | \ + xclip -quiet diff --git a/misc/bin/xshot.sh b/misc/bin/xshot.sh new file mode 100755 index 0000000..d7984e3 --- /dev/null +++ b/misc/bin/xshot.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +PIC="${HOME}/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png" + +maim --format=png --hidecursor --quality 8 "${PIC}" diff --git a/misc/xmobarrcBot.hs b/misc/xmobarrcBot.hs new file mode 100644 index 0000000..c70689b --- /dev/null +++ b/misc/xmobarrcBot.hs @@ -0,0 +1,64 @@ +Config { font = "xft:lucy tewi:style=Regular:pixelsize=11,Efont Biwidth:pixelsize=12,Misc Fixed Wide:size=8" + , additionalFonts = [ "xft:Wuncon Siji:style=Regular" + , "xft:lucy tewi:style=Bold:pixelsize=11" + ] + , bgColor = "#0b0806" + , fgColor = "#a19782" + , alpha = 255 + , position = Static { xpos = 0 + , ypos = 876 + , width = 1600 + , height = 24 + } + , textOffset = 16 + , iconOffset = -1 + , lowerOnStart = True + , hideOnStart = False + , allDesktops = True + , overrideRedirect = False + , pickBroadest = False + , persistent = False + , border = FullBM 0 + , borderColor = "#2f2b2a" + , borderWidth = 1 + , iconRoot = "." + , commands = [ Run StdinReader + , Run Battery [ "-t", "<fn=1><acstatus></fn><left>%" + , "--" + , "-i", "\57914", "-O", "\57913" , "-o", "\57911" + ] 10 + , Run Cpu [ "-t", "<fn=1>\57381</fn><total>%" ] 10 + , Run CoreTemp [ "-t", "<core0>°C / <core1>°C" ] 10 + , Run Memory [ "-t", "<fn=1>\57384</fn><usedratio>%" ] 10 + , Run ThermalZone 0 ["-t","<fn=1>\57371</fn><temp>°C"] 10 + , Run ThermalZone 1 ["-t","<temp>°C"] 10 + , Run Wireless "wlp3s0" [ "-t", "<fn=1>\57882</fn><essid> @ <quality>%" ] 10 + , Run DynNetwork [ "-t", "<fn=1>\57660</fn><rx> / <fn=1>\57659</fn><tx> kbps" ] 10 + , Run Kbd [ ("us", "<fn=1>\57967</fn>English / <fn=1>\57898</fn>") + , ("ru", "<fn=1>\57967</fn>Russian / <fn=1>\57898</fn>")] + , Run Com "/home/free/.xmonad/bin/xmobar/fcitx.sh" [] "fcitx" 3 + , Run Locks + , Run MPD [ "-t", "<fn=1><statei></fn><artist> - <title>" + , "--" + , "-P", "\57498", "-Z", "\57499", "-S", "\57497" + ] 10 + , Run Volume "default" "Master" [ "-t", "<fn=1><status></fn><volume>%" + , "--" + , "--on" , "\57427" + , "--off" , "\57426" + , "--onc" , "#a19782" + , "--offc" , "#a19782" + ] 10 + ] + , sepChar = "%" + , alignSep = "}{" + , template = " \ + \%battery% %wlp3s0wi% %dynnetwork% %StdinReader%\ + \}\ + \%kbd%%fcitx%\ + \{\ + \%mpd% %default:Master%\ + \ " + } + +-- vim:filetype=haskell:expandtab:tabstop=4:shiftwidth=4 diff --git a/misc/xmobarrcTop.hs b/misc/xmobarrcTop.hs new file mode 100644 index 0000000..6764359 --- /dev/null +++ b/misc/xmobarrcTop.hs @@ -0,0 +1,40 @@ +Config { font = "xft:lucy tewi:style=Regular:pixelsize=11,Efont Biwidth:pixelsize=12,Misc Fixed Wide:size=8" + , additionalFonts = [ "xft:Wuncon Siji:style=Regular" + , "xft:lucy tewi:style=Bold:pixelsize=11" + ] + , bgColor = "#0b0806" + , fgColor = "#a19782" + , alpha = 255 + , position = Static { xpos = 0 + , ypos = 0 + , width = 1600 + , height = 24 + } + , textOffset = 16 + , iconOffset = -1 + , lowerOnStart = True + , hideOnStart = False + , allDesktops = True + , overrideRedirect = False + , pickBroadest = False + , persistent = False + , border = FullBM 0 + , borderColor = "#2f2b2a" + , borderWidth = 1 + , iconRoot = "." + , commands = [ Run StdinReader + , Run Date "<fn=1>\57893</fn>%d.%m.%y / %A / %H:%M" "date" 10 + , Run Weather "UUWW" [ "-t", "<fn=1>\57550</fn><tempC>°C / <rh>% / <pressure> Pa" ] 10000 + ] + , sepChar = "%" + , alignSep = "}{" + , template = " \ + \%StdinReader%\ + \}\ + \\ + \{\ + \%UUWW% %date%\ + \ " + } + +-- vim:filetype=haskell:expandtab:tabstop=4:shiftwidth=4 |