From c8af938f0ff855edcbc8e461486e47678ed9332c Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 28 Apr 2017 14:16:32 -0700 Subject: [PATCH 1/6] [XMonad] Decrease spacing size --- dotfiles/xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 72e7016e..0ea1207d 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -238,7 +238,7 @@ layoutTogglesMap = toggleTuple toggle = fmap (\str -> (str, Toggle toggle)) (toggleToStringWithState toggle) -spacingSize = 20 +spacingSize = 12 togglesXActionsMap = M.fromList [ ("GAPS", sendMessage $ ModifySpacing toggleSpacing ) ] From f3098e31906522c38e7669faa45955387c506c6b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 4 May 2017 14:07:01 -0700 Subject: [PATCH 2/6] [Emacs] Fix helm-org-rifle binding typo --- dotfiles/emacs.d/README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 182dab88..fb16a6fb 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -3420,7 +3420,7 @@ alphanumeric characters only." **** helm-org-rifle #+BEGIN_SRC emacs-lisp (use-package helm-org-rifle - :bind ("C-c C-h" . helm-rog-rifle-agenda-files)) + :bind ("C-c C-h" . helm-org-rifle-agenda-files)) #+END_SRC **** org-notify #+BEGIN_SRC emacs-lisp From b1294ccd3b79983a7bbb3d2d499537f941c40fe5 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 5 May 2017 16:07:48 -0700 Subject: [PATCH 3/6] Ignore clementine --- dotfiles/config/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/config/.gitignore b/dotfiles/config/.gitignore index fea400b1..8d1da8b5 100644 --- a/dotfiles/config/.gitignore +++ b/dotfiles/config/.gitignore @@ -1,5 +1,6 @@ /.mono/keypairs/ /Atom/ +/Clementine/ /Code/ /Popcorn-Time/ /QtProject.conf/ From 03d4ea76acbee802865ddfad0d00cbc0b34c5780 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 7 May 2017 23:35:01 -0700 Subject: [PATCH 4/6] Fix chrome tab handling with chromix --- dotfiles/lib/bin/focus_tab_by_id.sh | 4 +--- dotfiles/lib/bin/split_current_chrome_tab.sh | 3 +++ dotfiles/lib/bin/split_out.sh | 5 ----- dotfiles/lib/bin/split_out_chrome_tab.sh | 4 ---- dotfiles/lib/bin/split_tab_by_id.sh | 1 + dotfiles/xmonad/imalison-xmonad.cabal | 1 + dotfiles/xmonad/xmonad.hs | 9 ++++++--- 7 files changed, 12 insertions(+), 15 deletions(-) create mode 100755 dotfiles/lib/bin/split_current_chrome_tab.sh delete mode 100755 dotfiles/lib/bin/split_out.sh delete mode 100755 dotfiles/lib/bin/split_out_chrome_tab.sh diff --git a/dotfiles/lib/bin/focus_tab_by_id.sh b/dotfiles/lib/bin/focus_tab_by_id.sh index eadf4d9f..5e240b0f 100755 --- a/dotfiles/lib/bin/focus_tab_by_id.sh +++ b/dotfiles/lib/bin/focus_tab_by_id.sh @@ -1,5 +1,3 @@ #!/usr/bin/env sh -windowId=$(chromix-too raw chrome.tabs.update "$1" '{"active": true}' | jq .windowId) -chromix-too raw chrome.windows.update "$windowId" '{"focused": true}' - +chromix-too focus "$1" diff --git a/dotfiles/lib/bin/split_current_chrome_tab.sh b/dotfiles/lib/bin/split_current_chrome_tab.sh new file mode 100755 index 00000000..32a20659 --- /dev/null +++ b/dotfiles/lib/bin/split_current_chrome_tab.sh @@ -0,0 +1,3 @@ +#!/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_out.sh b/dotfiles/lib/bin/split_out.sh deleted file mode 100755 index c0627150..00000000 --- a/dotfiles/lib/bin/split_out.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh -sleep .6 -xdotool key --clearmodifiers Escape -xdotool key --clearmodifiers Tab -xdotool key --clearmodifiers "W" diff --git a/dotfiles/lib/bin/split_out_chrome_tab.sh b/dotfiles/lib/bin/split_out_chrome_tab.sh deleted file mode 100755 index 666eab93..00000000 --- a/dotfiles/lib/bin/split_out_chrome_tab.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env zsh -split_out.sh -sleep .2 -xdotool key --clearmodifiers "Shift_L+Super_L+z" diff --git a/dotfiles/lib/bin/split_tab_by_id.sh b/dotfiles/lib/bin/split_tab_by_id.sh index f66f784f..fcd4a940 100755 --- a/dotfiles/lib/bin/split_tab_by_id.sh +++ b/dotfiles/lib/bin/split_tab_by_id.sh @@ -1,3 +1,4 @@ #!/usr/bin/env zsh +echo $1 chromix-too raw chrome.windows.create '{"tabId": '"$1}" diff --git a/dotfiles/xmonad/imalison-xmonad.cabal b/dotfiles/xmonad/imalison-xmonad.cabal index a905b386..41639a43 100644 --- a/dotfiles/xmonad/imalison-xmonad.cabal +++ b/dotfiles/xmonad/imalison-xmonad.cabal @@ -23,6 +23,7 @@ executable imalison-xmonad gtk-traymanager>=0.1.6, hostname>=1.0, multimap>=1.2.1, + process>=1.4.3.0, split, taffybar>=0.4.6, transformers>=0.5.2.0, diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 0ea1207d..cf7fb532 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -17,6 +17,7 @@ import Graphics.X11.ExtraTypes.XF86 import Network.HostName import System.Directory import System.FilePath.Posix +import System.Process import System.Taffybar.Hooks.PagerHints import Text.Printf @@ -89,6 +90,8 @@ main = writeToHomeDirLog stuff = io $ getLogFile >>= flip appendFile (stuff ++ "\n") where getLogFile = ( "temp" "xmonad.log") <$> getHomeDirectory +xRunCommand cmd = void $ io $ readCreateProcess (shell cmd) "" + (<..>) :: Functor f => (a -> b) -> f (f a) -> f (f b) (<..>) = fmap . fmap @@ -397,7 +400,7 @@ myWindowAct c@WindowBringerConfig { menuCommand = cmd do visible <- visibleWindows ws <- windowMap' c { windowFilter = not . flip elem visible } - let chromeTabs = M.empty -- chromeTabs <- liftIO getChromeTabInfo + chromeTabs <- liftIO getChromeTabInfo let options = M.union (M.map Left ws) (M.map Right chromeTabs) selection <- DM.menuMapArgs cmd args options whenJust selection action @@ -820,7 +823,7 @@ addKeys conf@XConfig { modMask = modm } = , ((modm .|. controlMask, xK_t), spawn taffybarCommand) , ((modm, xK_v), spawn "copyq paste") - , ((modm .|. controlMask, xK_s), spawn "split_out.sh") + , ((modm .|. controlMask, xK_s), spawn "split_current_chrome_tab.sh") , ((hyper, xK_v), spawn "copyq_rofi.sh") , ((hyper, xK_p), spawn "rofi-pass") , ((hyper, xK_h), spawn "screenshot.sh") @@ -834,7 +837,7 @@ addKeys conf@XConfig { modMask = modm } = , ((hyper, xK_r), spawn "rofi_systemd.sh") , ((hyper, xK_0), spawn "tvpower.js") , ((modalt, xK_w), spawn "rofi_wallpaper.sh") - , ((modalt, xK_z), spawn "split_out_chrome_tab.sh") + , ((modalt, xK_z), spawn "split_chrome_tab_to_next_screen.sh") , ((hyper, xK_9), spawn "start_synergy.sh") , ((hyper, xK_8), spawn "rofi_paswitch.sh") , ((hyper, xK_slash), spawn "toggle_taffybar.sh") From 4c2dbc387ae58a1627b64f994179233d4b3785b4 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 9 May 2017 11:55:41 -0700 Subject: [PATCH 5/6] [Emacs] Add coffee script support --- dotfiles/emacs.d/README.org | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index fb16a6fb..893658ed 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2661,6 +2661,11 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877 (interactive) (delete-process "tern")) #+END_SRC +*** coffee script +#+BEGIN_SRC emacs-lisp +(use-package coffee-mode + :mode "\\.coffee\\'") +#+END_SRC *** rust #+BEGIN_SRC emacs-lisp (use-package rust-mode From b7cf1230c8e2788375a8de6d75f6c7506b52dc47 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 9 May 2017 11:56:15 -0700 Subject: [PATCH 6/6] [Linux] Add split_chrome_tab_to_next_screen.sh --- dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh diff --git a/dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh b/dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh new file mode 100755 index 00000000..c472b01e --- /dev/null +++ b/dotfiles/lib/bin/split_chrome_tab_to_next_screen.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh + +split_current_chrome_tab.sh +xdotool key --clearmodifiers "Shift_L+Super_L+z"