From 913139d4b5fcf330fb67d4a9a4519d534131cb4f Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sun, 16 Jan 2022 15:37:07 -0700 Subject: add more emoticons. Fix emoticon script. --- extras/HOME/.local/bin/emoticon-select.sh | 3 +-- extras/HOME/.xmobarrc | 2 +- extras/HOME/.xmonad/emoticons.txt | 1 + src/Internal/Keys.hs | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/extras/HOME/.local/bin/emoticon-select.sh b/extras/HOME/.local/bin/emoticon-select.sh index e1637d1..5674e44 100755 --- a/extras/HOME/.local/bin/emoticon-select.sh +++ b/extras/HOME/.local/bin/emoticon-select.sh @@ -11,7 +11,6 @@ else fi -selection="$("${menu[@]}" < $HOME/.xmonad/emoticons.txt)" -emoticon="$(echo ${selection/*-})" +emoticon="$("${menu[@]}" < $HOME/.xmonad/emoticons.txt | sed 's#^[^-]*-\s*##')" echo "$emoticon" | xclip -selection clipboard diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index 299877f..4e7aed3 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -57,7 +57,7 @@ Config "--normal", "#88ff88", "--high", "#ff8888" ] 10, - Run Mpris2 "spotifyd" [ + Run Mpris2 "spotify" [ "-t", "</fn>", "--nastring", "<fc=#404040> </fc>"] 20, Run Com ".xmonad/xmobar-weather" [] "weather" 9000, diff --git a/extras/HOME/.xmonad/emoticons.txt b/extras/HOME/.xmonad/emoticons.txt index 65289c4..f919a81 100644 --- a/extras/HOME/.xmonad/emoticons.txt +++ b/extras/HOME/.xmonad/emoticons.txt @@ -1,5 +1,6 @@ Bear - (''')(0.0)(''') Cry - ಥ_ಥ +Cry - ಥ︵ಥ Deal with it - (•_•) ( •_•)>⌐■-■ (⌐■_■) Deal with it. - (▀̿Ĺ̯▀̿ ̿) Disapprove - ಠ_ಠ diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 27315cd..8731f42 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -11,7 +11,7 @@ import Graphics.X11.ExtraTypes.XorgDefault import System.Process import XMonad.Util.Ungrab import XMonad.Layout.Spacing -import Data.Maybe (isJust) +import Data.Maybe (isJust, fromMaybe) import Debug.Trace import Control.Applicative import Prelude hiding ((!!)) @@ -51,7 +51,8 @@ keymap :: KeyMap l keymap = runKeys $ do config <- getConfig - let subkeys = submap . flip runKeys config + let defaultKey key = fromMaybe (return ()) $ Map.lookup key (keymap config) + subkeys = submapDefaultWithKey defaultKey . flip runKeys config bind xK_apostrophe $ do justMod $ subkeys $ do -- cgit