From f0863085c7f865069e0d49a99488734abe044c6a Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 13 Apr 2016 16:37:26 +0200 Subject: l 5: add mk_sql_pair --- lass/5pkgs/default.nix | 1 + lass/5pkgs/mk_sql_pair/default.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 lass/5pkgs/mk_sql_pair/default.nix (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/default.nix b/lass/5pkgs/default.nix index 0c9dd94ca..e113af91f 100644 --- a/lass/5pkgs/default.nix +++ b/lass/5pkgs/default.nix @@ -8,6 +8,7 @@ ublock = pkgs.callPackage ./firefoxPlugins/ublock.nix {}; vimperator = pkgs.callPackage ./firefoxPlugins/vimperator.nix {}; }; + mk_sql_pair = pkgs.callPackage ./mk_sql_pair/default.nix {}; mpv-poll = pkgs.callPackage ./mpv-poll/default.nix {}; xmonad-lass = let src = pkgs.writeNixFromCabal "xmonad-lass.nix" ./xmonad-lass; in diff --git a/lass/5pkgs/mk_sql_pair/default.nix b/lass/5pkgs/mk_sql_pair/default.nix new file mode 100644 index 000000000..a9f0d2797 --- /dev/null +++ b/lass/5pkgs/mk_sql_pair/default.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: + +pkgs.writeScriptBin "mk_sql_pair" '' + #!/bin/sh + + name=$1 + password=$2 + + if [ $# -ne 2 ]; then + echo '$1=name, $2=password' + exit 23; + fi + + cat < Date: Wed, 13 Apr 2016 16:40:33 +0200 Subject: l 5: add urban --- lass/5pkgs/default.nix | 1 + lass/5pkgs/urban/default.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 lass/5pkgs/urban/default.nix (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/default.nix b/lass/5pkgs/default.nix index e113af91f..1dacf6c7a 100644 --- a/lass/5pkgs/default.nix +++ b/lass/5pkgs/default.nix @@ -10,6 +10,7 @@ }; mk_sql_pair = pkgs.callPackage ./mk_sql_pair/default.nix {}; mpv-poll = pkgs.callPackage ./mpv-poll/default.nix {}; + urban = pkgs.callPackage ./urban/default.nix {}; xmonad-lass = let src = pkgs.writeNixFromCabal "xmonad-lass.nix" ./xmonad-lass; in pkgs.haskellPackages.callPackage src {}; diff --git a/lass/5pkgs/urban/default.nix b/lass/5pkgs/urban/default.nix new file mode 100644 index 000000000..fb8adaed9 --- /dev/null +++ b/lass/5pkgs/urban/default.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +pkgs.writeScriptBin "urban" '' + #!/bin/sh + set -euf + term=$1 + curl -LsS 'http://www.urbandictionary.com/define.php?term='"$term" \ + | sed 's/<\/\?a\>[^>]*>//g' \ + | sed 's/<\([^>]*\)>/\n<\1\n/g' \ + | grep . \ + | sed -n '/
' \ + | grep -v '^' \ + | sed ' + s/"/"/g + s/'/'\'''/g + s/>/>/g + s/</>/g + ' +'' -- cgit v1.2.3 From 2e8743934061ecb8019c34ee4b1010238e158bf1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 13 Apr 2016 16:48:32 +0200 Subject: l 5 acronym: refactor code --- lass/5pkgs/acronym/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/acronym/default.nix b/lass/5pkgs/acronym/default.nix index 53d5d015a..9f6f95587 100644 --- a/lass/5pkgs/acronym/default.nix +++ b/lass/5pkgs/acronym/default.nix @@ -1,13 +1,16 @@ { pkgs, ... }: pkgs.writeScriptBin "acronym" '' + #! ${pkgs.bash}/bin/bash acro=$1 curl -s http://www.acronymfinder.com/$acro.html \ - | grep 'class="result-list__body__rank"' \ - | sed 's/.*title="\([^"]*\)".*/\1/' \ - | sed 's/^.* - //' \ - | sed "s/'/'/g" + | grep 'class="result-list__body__rank"' \ + | sed ' + s/.*title="\([^"]*\)".*/\1/ + s/^.* - // + s/'/'\'''/g + ' '' -- cgit v1.2.3 From 99b8bfeaec5f3d70148354f128568e15be249b9d Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 25 Apr 2016 15:25:04 +0200 Subject: l: use i3lock instead of slock --- lass/5pkgs/xmonad-lass/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index 503df3be7..4c267359c 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -119,7 +119,7 @@ displaySomeException = displayException myKeyMap = - [ ("M4-", spawn "/var/setuid-wrappers/slock") + [ ("M4-", spawn "i3lock -i /tmp/wallpaper.png -f") , ("M4-p", spawn "passmenu --type") --, ("M4-r", spawn "exe=$(yeganesh -x) && eval \"exec $exe\"") , ("", spawn "pactl -- set-sink-volume 0 +4%") -- cgit v1.2.3 From c53e97a0240c566aa73b257d9e59c0dffa224a68 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 25 Apr 2016 15:25:47 +0200 Subject: l: clean up xmonad config --- lass/5pkgs/xmonad-lass/Main.hs | 134 ++++++---------------- lass/5pkgs/xmonad-lass/Util/PerWorkspaceConfig.hs | 52 --------- 2 files changed, 38 insertions(+), 148 deletions(-) delete mode 100644 lass/5pkgs/xmonad-lass/Util/PerWorkspaceConfig.hs (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index 4c267359c..577dc6fe6 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -5,49 +5,32 @@ module Main where +import XMonad +import qualified XMonad.StackSet as W import Control.Exception -import Text.Read (readEither) -import XMonad +import Data.List (isInfixOf) +import System.Environment (getArgs, withArgs, getEnv) import System.IO (hPutStrLn, stderr) -import System.Environment (getArgs, withArgs, getEnv, getEnvironment) -import System.Posix.Process (executeFile) -import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace - , removeEmptyWorkspace) -import XMonad.Actions.GridSelect +import Text.Read (readEither) +import XMonad.Actions.CopyWindow (copy, kill1) import XMonad.Actions.CycleWS (toggleWS) ---import XMonad.Actions.CopyWindow ( copy ) -import XMonad.Layout.NoBorders ( smartBorders ) -import qualified XMonad.StackSet as W -import Data.Map (Map) -import qualified Data.Map as Map --- TODO import XMonad.Layout.WorkspaceDir +import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace, removeEmptyWorkspace) +import XMonad.Actions.DynamicWorkspaces (withWorkspace) +import XMonad.Actions.GridSelect (GSConfig(..), gridselectWorkspace, navNSearch) +import XMonad.Hooks.FloatNext (floatNext) +import XMonad.Hooks.FloatNext (floatNextHook) +import XMonad.Hooks.ManageDocks (avoidStruts, ToggleStruts(ToggleStruts)) +import XMonad.Hooks.Place (placeHook, smart) +import XMonad.Hooks.UrgencyHook (focusUrgent) import XMonad.Hooks.UrgencyHook (SpawnUrgencyHook(..), withUrgencyHook) --- import XMonad.Layout.Tabbed ---import XMonad.Layout.MouseResizableTile -import XMonad.Layout.Reflect (reflectVert) import XMonad.Layout.FixedColumn (FixedColumn(..)) -import XMonad.Hooks.Place (placeHook, smart) -import XMonad.Hooks.FloatNext (floatNextHook) -import XMonad.Actions.PerWorkspaceKeys (chooseAction) -import XMonad.Layout.PerWorkspace (onWorkspace) ---import XMonad.Layout.BinarySpacePartition +import XMonad.Layout.NoBorders ( smartBorders ) +import XMonad.Prompt (autoComplete, searchPredicate, XPConfig) +import XMonad.Prompt.Window (windowPromptGoto, windowPromptBringCopy) +import XMonad.Stockholm.Shutdown (sendShutdownEvent, handleShutdownEvent) import XMonad.Util.EZConfig (additionalKeysP) -import XMonad.Prompt (autoComplete, defaultXPConfig, XPConfig, mkXPrompt) -import XMonad.Hooks.UrgencyHook (focusUrgent, withUrgencyHook, urgencyBorderColor, BorderUrgencyHook(BorderUrgencyHook)) -import XMonad.Actions.DynamicWorkspaces (addWorkspacePrompt, removeEmptyWorkspace, renameWorkspace, withWorkspace) -import XMonad.Hooks.FloatNext (floatNext, floatNextHook) -import XMonad.Prompt.Workspace -import XMonad.Actions.CopyWindow (copy, kill1) -import qualified Data.Map as M -import XMonad.Hooks.ManageDocks (avoidStruts, manageDocks, ToggleStruts(ToggleStruts)) - ---import XMonad.Actions.Submap -import XMonad.Stockholm.Pager -import XMonad.Stockholm.Rhombus -import XMonad.Stockholm.Shutdown - myTerm :: String myTerm = "urxvtc" @@ -67,18 +50,12 @@ mainNoArgs :: IO () mainNoArgs = do workspaces0 <- getWorkspaces0 xmonad' - -- $ withUrgencyHookC dzenUrgencyHook { args = ["-bg", "magenta", "-fg", "magenta", "-h", "2"], duration = 500000 } - -- urgencyConfig { remindWhen = Every 1 } - -- $ withUrgencyHook borderUrgencyHook "magenta" - -- $ withUrgencyHookC BorderUrgencyHook { urgencyBorderColor = "magenta" } urgencyConfig { suppressWhen = Never } $ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ") $ def { terminal = myTerm , modMask = mod4Mask , workspaces = workspaces0 , layoutHook = smartBorders $ myLayoutHook - -- , handleEventHook = myHandleEventHooks <+> handleTimerEvent - --, handleEventHook = handleTimerEvent , manageHook = placeHook (smart (1,0)) <+> floatNextHook , startupHook = spawn "echo emit XMonadStartup" , normalBorderColor = "#1c1c1c" @@ -118,19 +95,19 @@ displaySomeException :: SomeException -> String displaySomeException = displayException +myKeyMap :: [([Char], X ())] myKeyMap = [ ("M4-", spawn "i3lock -i /tmp/wallpaper.png -f") , ("M4-p", spawn "passmenu --type") - --, ("M4-r", spawn "exe=$(yeganesh -x) && eval \"exec $exe\"") , ("", spawn "pactl -- set-sink-volume 0 +4%") , ("", spawn "pactl -- set-sink-volume 0 -4%") , ("", spawn "pactl -- set-sink-mute 0 toggle") , ("", spawn "pactl -- set-source-mute 1 toggle") - , ("", gridselectWorkspace myWSConfig W.view) + , ("", gridselectWorkspace gridConfig W.view) , ("M4-a", focusUrgent) - , ("M4-S-r", renameWorkspace defaultXPConfig) - , ("M4-S-a", addWorkspacePrompt defaultXPConfig) + , ("M4-S-r", renameWorkspace def) + , ("M4-S-a", addWorkspacePrompt def) , ("M4-S-", removeEmptyWorkspace) , ("M4-S-c", kill1) , ("M4-", toggleWS) @@ -139,66 +116,31 @@ myKeyMap = , ("M4-f", floatNext True) , ("M4-b", sendMessage ToggleStruts) - , ("M4-v", withWorkspace myXPConfig (windows . W.view)) - , ("M4-S-v", withWorkspace myXPConfig (windows . W.shift)) - , ("M4-C-v", withWorkspace myXPConfig (windows . copy)) + , ("M4-v", withWorkspace autoXPConfig (windows . W.view)) + , ("M4-S-v", withWorkspace autoXPConfig (windows . W.shift)) + , ("M4-C-v", withWorkspace autoXPConfig (windows . copy)) - -- , (_4 , xK_q ) & \k -> (k, goToSelected myCNConfig { gs_navigate = makeGSNav k } ) - -- , (_4S, xK_q ) & \k -> (k, bringSelected myCNConfig { gs_navigate = makeGSNav k } ) - -- , (_4C, xK_q ) & \k -> (k, withSelectedWindow ( \a -> get >>= \s -> put s { windowset = copyWindow a (W.tag $ W.workspace $ W.current $ windowset s) (windowset s) } ) myCNConfig { gs_navigate = makeGSNav k } ) + , ("M4-q", windowPromptGoto infixAutoXPConfig) + , ("M4-C-q", windowPromptBringCopy infixAutoXPConfig) - --, ("M4-", perWorkspaceAction workspaceConfigs) , ("M4-S-q", return ()) ] -myGSConfig = defaultGSConfig - { gs_cellheight = 50 - , gs_cellpadding = 2 - , gs_navigate = navNSearch - , gs_font = myFont - } - -myXPConfig :: XPConfig -myXPConfig = defaultXPConfig +autoXPConfig :: XPConfig +autoXPConfig = def { autoComplete = Just 5000 } -myWSConfig = myGSConfig - { gs_cellwidth = 50 +infixAutoXPConfig :: XPConfig +infixAutoXPConfig = autoXPConfig + { searchPredicate = isInfixOf } -pagerConfig :: PagerConfig -pagerConfig = def - { pc_font = myFont - , pc_cellwidth = 64 - --, pc_cellheight = 36 -- TODO automatically keep screen aspect - --, pc_borderwidth = 1 - --, pc_matchcolor = "#f0b000" - , pc_matchmethod = MatchPrefix - --, pc_colors = pagerWorkspaceColors - , pc_windowColors = windowColors - } - where - windowColors _ _ _ True _ = ("#ef4242","#ff2323") - windowColors wsf m c u wf = do - let y = defaultWindowColors wsf m c u wf - if m == False && wf == True - then ("#402020", snd y) - else y - -wGSConfig :: GSConfig Window -wGSConfig = def - { gs_cellheight = 20 - , gs_cellwidth = 192 - , gs_cellpadding = 5 - , gs_font = myFont +gridConfig :: GSConfig WorkspaceId +gridConfig = def + { gs_cellwidth = 50 + , gs_cellheight = 50 + , gs_cellpadding = 2 , gs_navigate = navNSearch + , gs_font = myFont } - - -(&) :: a -> (a -> c) -> c -(&) = flip ($) - -allWorkspaceNames :: W.StackSet i l a sid sd -> X [i] -allWorkspaceNames ws = - return $ map W.tag (W.hidden ws) ++ [W.tag $ W.workspace $ W.current ws] diff --git a/lass/5pkgs/xmonad-lass/Util/PerWorkspaceConfig.hs b/lass/5pkgs/xmonad-lass/Util/PerWorkspaceConfig.hs deleted file mode 100644 index bba7c8c60..000000000 --- a/lass/5pkgs/xmonad-lass/Util/PerWorkspaceConfig.hs +++ /dev/null @@ -1,52 +0,0 @@ -module Util.PerWorkspaceConfig - ( WorkspaceConfig (..) - , WorkspaceConfigs - , switchToWorkspace - , defaultWorkspaceConfig - , perWorkspaceAction - , perWorkspaceTermAction --- , myLayoutHack - ) -where - -import XMonad -import XMonad.Core (LayoutClass) -import Control.Monad (when) - -import qualified Data.Map as M -import qualified XMonad.StackSet as W - -data WorkspaceConfig l = - WorkspaceConfig - { switchAction :: X () - , startAction :: X () - , keyAction :: X () - , termAction :: X () - } - -type WorkspaceConfigs l = M.Map WorkspaceId (WorkspaceConfig l) - -defaultWorkspaceConfig = WorkspaceConfig - { switchAction = return () - , startAction = return () - , keyAction = return () - , termAction = spawn "urxvtc" - } - -whenLookup wsId cfg a = - when (M.member wsId cfg) (a $ cfg M.! wsId) - -switchToWorkspace :: WorkspaceConfigs l -> WorkspaceId -> X () -switchToWorkspace cfg wsId = do - windows $ W.greedyView wsId - wins <- gets (W.integrate' . W.stack . W.workspace . W.current . windowset) - when (null wins) $ whenLookup wsId cfg startAction - whenLookup wsId cfg switchAction - -perWorkspaceAction :: WorkspaceConfigs l -> X () -perWorkspaceAction cfg = withWindowSet $ \s -> whenLookup (W.currentTag s) cfg keyAction - -perWorkspaceTermAction :: WorkspaceConfigs l -> X () -perWorkspaceTermAction cfg = withWindowSet $ \s -> case M.lookup (W.currentTag s) cfg of - Just x -> termAction x - _ -> termAction defaultWorkspaceConfig -- cgit v1.2.3 From 55e6a59afc94136d994e8041390d4ce2fb2ac9df Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 25 Apr 2016 16:31:08 +0200 Subject: l 5 xmonad-lass: add minimize windows --- lass/5pkgs/xmonad-lass/Main.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index 577dc6fe6..fe39da4f0 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -25,7 +25,9 @@ import XMonad.Hooks.Place (placeHook, smart) import XMonad.Hooks.UrgencyHook (focusUrgent) import XMonad.Hooks.UrgencyHook (SpawnUrgencyHook(..), withUrgencyHook) import XMonad.Layout.FixedColumn (FixedColumn(..)) +import XMonad.Layout.Minimize (minimize, minimizeWindow, MinimizeMsg(RestoreNextMinimizedWin)) import XMonad.Layout.NoBorders ( smartBorders ) +import XMonad.Operations (withFocused) import XMonad.Prompt (autoComplete, searchPredicate, XPConfig) import XMonad.Prompt.Window (windowPromptGoto, windowPromptBringCopy) import XMonad.Stockholm.Shutdown (sendShutdownEvent, handleShutdownEvent) @@ -65,7 +67,7 @@ mainNoArgs = do myLayoutHook = defLayout where - defLayout = (avoidStruts $ Tall 1 (3/100) (1/2) ||| Full ||| Mirror (Tall 1 (3/100) (1/2))) ||| FixedColumn 2 80 80 1 + defLayout = minimize $ ((avoidStruts $ Tall 1 (3/100) (1/2) ||| Full ||| Mirror (Tall 1 (3/100) (1/2))) ||| FixedColumn 2 80 80 1) xmonad' :: (LayoutClass l Window, Read (l Window)) => XConfig l -> IO () @@ -120,6 +122,9 @@ myKeyMap = , ("M4-S-v", withWorkspace autoXPConfig (windows . W.shift)) , ("M4-C-v", withWorkspace autoXPConfig (windows . copy)) + , ("M4-m", withFocused minimizeWindow) + , ("M4-S-m", sendMessage RestoreNextMinimizedWin) + , ("M4-q", windowPromptGoto infixAutoXPConfig) , ("M4-C-q", windowPromptBringCopy infixAutoXPConfig) -- cgit v1.2.3 From 42b649ddfc0cd24078a8da334e15e8184dddc491 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 25 Apr 2016 16:31:37 +0200 Subject: l 5 xmonad-lass: show xmonad state on resume --- lass/5pkgs/xmonad-lass/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index fe39da4f0..2415b9d83 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -75,7 +75,7 @@ xmonad' conf = do path <- getEnv "XMONAD_STATE" try (readFile path) >>= \case Right content -> do - hPutStrLn stderr ("resuming from " ++ path) + hPutStrLn stderr ("resuming from " ++ path ++ "; state = " ++ show content) withArgs ("--resume" : lines content) (xmonad conf) Left e -> do hPutStrLn stderr (displaySomeException e) -- cgit v1.2.3 From 0266f17bdd9f197234465143de5e558cb6990556 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 25 Apr 2016 17:24:54 +0200 Subject: l 5 xmonad-lass: style & warnings --- lass/5pkgs/xmonad-lass/Main.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index 2415b9d83..1385be33c 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -26,8 +26,7 @@ import XMonad.Hooks.UrgencyHook (focusUrgent) import XMonad.Hooks.UrgencyHook (SpawnUrgencyHook(..), withUrgencyHook) import XMonad.Layout.FixedColumn (FixedColumn(..)) import XMonad.Layout.Minimize (minimize, minimizeWindow, MinimizeMsg(RestoreNextMinimizedWin)) -import XMonad.Layout.NoBorders ( smartBorders ) -import XMonad.Operations (withFocused) +import XMonad.Layout.NoBorders (smartBorders) import XMonad.Prompt (autoComplete, searchPredicate, XPConfig) import XMonad.Prompt.Window (windowPromptGoto, windowPromptBringCopy) import XMonad.Stockholm.Shutdown (sendShutdownEvent, handleShutdownEvent) -- cgit v1.2.3 From e2683844b48cfc1c2e37bc5c3cb116d6782eb593 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 25 Apr 2016 17:57:32 +0200 Subject: l 5 xmonad-lass: use wallpaper from /var/lib/.. --- lass/5pkgs/xmonad-lass/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index 1385be33c..277034240 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -98,7 +98,7 @@ displaySomeException = displayException myKeyMap :: [([Char], X ())] myKeyMap = - [ ("M4-", spawn "i3lock -i /tmp/wallpaper.png -f") + [ ("M4-", spawn "i3lock -i /var/lib/wallpaper/wallpaper -f") , ("M4-p", spawn "passmenu --type") , ("", spawn "pactl -- set-sink-volume 0 +4%") , ("", spawn "pactl -- set-sink-volume 0 -4%") -- cgit v1.2.3 From 1cc4fb02187f51dd0bec89bf53b8d88e6bae8ebe Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 27 Apr 2016 12:51:47 +0200 Subject: l: add brightness controls to xmonad --- lass/5pkgs/xmonad-lass/Main.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index 277034240..3b9f22c18 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -105,6 +105,8 @@ myKeyMap = , ("", spawn "pactl -- set-sink-mute 0 toggle") , ("", spawn "pactl -- set-source-mute 1 toggle") , ("", gridselectWorkspace gridConfig W.view) + , ("", spawn "xbacklight -steps 1 -time 1 -inc 3") + , ("", spawn "xbacklight -steps 1 -time 1 -dec 3") , ("M4-a", focusUrgent) , ("M4-S-r", renameWorkspace def) -- cgit v1.2.3 From 4b389a3569a14a6a81f4b22d72e676843408b29e Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 27 Apr 2016 12:52:16 +0200 Subject: l 5 mk_sql_pair: fix indent --- lass/5pkgs/mk_sql_pair/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/mk_sql_pair/default.nix b/lass/5pkgs/mk_sql_pair/default.nix index a9f0d2797..738a8daf6 100644 --- a/lass/5pkgs/mk_sql_pair/default.nix +++ b/lass/5pkgs/mk_sql_pair/default.nix @@ -12,8 +12,8 @@ pkgs.writeScriptBin "mk_sql_pair" '' fi cat < Date: Wed, 27 Apr 2016 12:53:06 +0200 Subject: l 5 xmonad-lass: remove unused code --- lass/5pkgs/xmonad-lass/Main.hs | 3 --- 1 file changed, 3 deletions(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index 3b9f22c18..ddf7b4e6e 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -36,9 +36,6 @@ import XMonad.Util.EZConfig (additionalKeysP) myTerm :: String myTerm = "urxvtc" -myRootTerm :: String -myRootTerm = "urxvtc -name root-urxvt -e su -" - myFont :: String myFont = "-schumacher-*-*-*-*-*-*-*-*-*-*-*-iso10646-*" -- cgit v1.2.3 From 8014c485507bcf32c52ffe179b25b6b45e705afd Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 27 Apr 2016 12:53:59 +0200 Subject: l 5 xmonad-lass: change GridSelect size --- lass/5pkgs/xmonad-lass/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/xmonad-lass/Main.hs b/lass/5pkgs/xmonad-lass/Main.hs index ddf7b4e6e..d7c66bf4d 100644 --- a/lass/5pkgs/xmonad-lass/Main.hs +++ b/lass/5pkgs/xmonad-lass/Main.hs @@ -141,8 +141,8 @@ infixAutoXPConfig = autoXPConfig gridConfig :: GSConfig WorkspaceId gridConfig = def - { gs_cellwidth = 50 - , gs_cellheight = 50 + { gs_cellwidth = 100 + , gs_cellheight = 30 , gs_cellpadding = 2 , gs_navigate = navNSearch , gs_font = myFont -- cgit v1.2.3 From 3fea8d651f49ac6a57f99bc6b49a5689e3c74fd8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 20 May 2016 00:12:43 +0200 Subject: l: add untilport --- lass/5pkgs/default.nix | 1 + lass/5pkgs/untilport/default.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 lass/5pkgs/untilport/default.nix (limited to 'lass/5pkgs') diff --git a/lass/5pkgs/default.nix b/lass/5pkgs/default.nix index 1dacf6c7a..467867f63 100644 --- a/lass/5pkgs/default.nix +++ b/lass/5pkgs/default.nix @@ -10,6 +10,7 @@ }; mk_sql_pair = pkgs.callPackage ./mk_sql_pair/default.nix {}; mpv-poll = pkgs.callPackage ./mpv-poll/default.nix {}; + untilport = pkgs.callPackage ./untilport/default.nix {}; urban = pkgs.callPackage ./urban/default.nix {}; xmonad-lass = let src = pkgs.writeNixFromCabal "xmonad-lass.nix" ./xmonad-lass; in diff --git a/lass/5pkgs/untilport/default.nix b/lass/5pkgs/untilport/default.nix new file mode 100644 index 000000000..61bcc2b89 --- /dev/null +++ b/lass/5pkgs/untilport/default.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: + +pkgs.writeDashBin "untilport" '' + set -euf + + usage() { + echo 'untiport $target $port' + echo 'Sleeps until the destinated port is reachable.' + echo 'ex: untilport google.de 80 && echo "google is now reachable"' + } + + + if [ $# -ne 2 ]; then + usage + else + until ${pkgs.netcat-openbsd}/bin/nc -z "$@"; do sleep 1; done + fi +'' -- cgit v1.2.3