diff --git a/.local/bin/plexamp b/.local/bin/plexamp new file mode 100755 index 0000000..291c78d --- /dev/null +++ b/.local/bin/plexamp @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ -f /usr/bin/Plexamp.AppImage ]; then + /usr/bin/Plexamp.AppImage +fi diff --git a/.local/bin/server-setup-commands b/.local/bin/server-setup-commands old mode 100644 new mode 100755 diff --git a/.local/bin/xmonad-keys b/.local/bin/xmonad-keys new file mode 100755 index 0000000..1916947 --- /dev/null +++ b/.local/bin/xmonad-keys @@ -0,0 +1,12 @@ +#!/bin/bash + +sed -n '/--START_KEYS/,/--END_KEYS/p' $HOME/.xmonad/xmonad.hs | \ + grep -e ', ("' \ + -e '\[ ("' \ + -e '--NOTE' | \ + grep -v '\-\- , ' |\ + sed -e 's/^[ \t,]*//' \ + -e 's/\[ (/(/' \ + -e 's/--NOTE /\n/' \ + -e 's/, / --> /' | \ + yad --text-info --back=#121e32 --fore=#dfdfef --geometry=1200x800 \ No newline at end of file diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 98cba41..9368df8 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -32,7 +32,7 @@ import XMonad.Hooks.DynamicLog (dynamicLogWithPP, wrap, xmobarPP, xmobarColor, s import XMonad.Hooks.FadeInactive import XMonad.Hooks.ManageDocks (docks, avoidStruts, docksEventHook, manageDocks, ToggleStruts(..)) -import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat) +import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat, doCenterFloat) import XMonad.Hooks.EwmhDesktops (ewmh, fullscreenEventHook) import XMonad.Hooks.ServerMode import XMonad.Hooks.SetWMName @@ -150,134 +150,96 @@ clickable ws = ""++ws++"" myEZKeys :: [(String, X ())] myEZKeys = - -- xmonad - [ ("M-'", spawn "xmonad --recompile; xmonad --restart") +--START_KEYS + --NOTE xmonad + [ ("M-'", spawn "xmonad --recompile; xmonad --restart") -- restart xmonad - -- open my terminal - , ("M-S-", spawn (myTerminal)) + --NOTE launchers + , ("M-a", spawn "dmenu_run -bw 3 -c -l 15 -h 26") -- open dmenu + , ("M-o", spawn "rofi -show run") -- open rofi - -- run launchers - , ("M-a", spawn "dmenu_run -bw 3 -c -l 15 -h 26") - , ("M-o", spawn "rofi -show run") + --NOTE keybound programs + , ("M-S-", spawn (myTerminal)) -- open a terminal + , ("M-l", spawn (myFileManager)) -- open a file manager - -- keybound programs - , ("M-l", spawn (myFileManager)) + --NOTE wm controls + , ("M-S-j", kill1) -- kill focused windown + , ("M-", sendMessage NextLayout) -- rotate through layouts + -- , ("M-S-", setLayout $ Xmonad.layoutHook conf) -- reset layout to default + , ("M-S-y", refresh) -- reset current window to correct size + , ("M-", windows W.focusDown) -- focus next window + , ("M-S-", windows W.focusUp) -- focus previous window + , ("M-m", windows W.focusMaster) -- focus master window + , ("M-", windows W.swapMaster) -- swap window with master + , ("M-S-", windows W.swapDown) -- swap window with next window + , ("M-S-", windows W.swapUp) -- swap window with previous window + , ("M-", sendMessage Shrink) -- shrink master area + , ("M-", sendMessage Expand) -- grow master area + , ("M-", sendMessage MirrorShrink) -- shrink master area + , ("M-", sendMessage MirrorExpand) -- grow master area + , ("M-y", withFocused $ windows . W.sink) -- push floating window back into tiling + , ("M-w", sendMessage (IncMasterN 1)) -- increment windows in master + , ("M-v", sendMessage (IncMasterN (-1))) -- decrement windows in master + , ("M-b", sendMessage ToggleStruts) -- toggle bar - -- wm controls - -- kill focused windown - , ("M-S-j", kill1) - -- rotate through layouts - , ("M-", sendMessage NextLayout) - -- reset layout to default - -- , ("M-S-", setLayout $ Xmonad.layoutHook conf) - -- reset current window to correct size - , ("M-S-y", refresh) - -- focus next window - , ("M-", windows W.focusDown) - -- focus previous window - , ("M-S-", windows W.focusUp) - -- focus master window - , ("M-m", windows W.focusMaster) - -- swap window with master - , ("M-", windows W.swapMaster) - -- swap window with next window - , ("M-S-", windows W.swapDown) - -- swap window with previous window - , ("M-S-", windows W.swapUp) - -- shrink master area - , ("M-", sendMessage Shrink) - -- grow master area - , ("M-", sendMessage Expand) - -- shrink master area - , ("M-", sendMessage MirrorShrink) - -- grow master area - , ("M-", sendMessage MirrorExpand) - -- push floating window back into tiling - , ("M-y", withFocused $ windows . W.sink) - -- increment windows in master - , ("M-w", sendMessage (IncMasterN 1)) - -- decrement windows in master - , ("M-v", sendMessage (IncMasterN (-1))) - -- toggle bar - , ("M-b", sendMessage ToggleStruts) - -- show keybinds - -- , ("M-S-z", spawn "spawn ("echo \"" ++ help ++ "\" | xmessage -file -") + --NOTE my custom keybind/script combinations + --NOTE system controls + , ("M-S-s", spawn "$HOME/.local/bin/prompt \"Are you sure you want to Shutdown?\" \"shutdown now\"") -- prompt computer shutdown + , ("M-S-r", spawn "$HOME/.local/bin/prompt \"Are you sure you want to Restart?\" \"reboot\"") -- prompt computer restart + , ("M-", spawn "$HOME/.local/bin/prompt \"Are you sure you want to lock?\" \"slock\" 1") -- prompt computer lock - -- My custom keybind/script combinations - -- prompt computer shutdown - , ("M-S-s", spawn "$HOME/.local/bin/prompt \"Are you sure you want to Shutdown?\" \"shutdown now\"") - -- prompt computer restart - , ("M-S-r", spawn "$HOME/.local/bin/prompt \"Are you sure you want to Restart?\" \"reboot\"") - -- prompt computer lock - , ("M-", spawn "$HOME/.local/bin/prompt \"Are you sure you want to lock?\" \"slock\" 1") + --NOTE bitwarden controls + , ("M-S-x", spawn "$HOME/.local/bin/bw-unlock") -- unlock bitwarden cli + , ("M-x", spawn "$HOME/.local/bin/passwords") -- get password from bw cli + + --NOTE demenu search + , ("M-s s", spawn "$HOME/.local/bin/dmenusearch") -- launch searcher (dmenu and surf) + , ("M-s d", spawn "$HOME/.local/bin/dmenusearch duckduckgo") -- launch searcher, default to duckduckgo - -- unlock bitwarden cli - , ("M-S-x", spawn "$HOME/.local/bin/bw-unlock") - -- get password from bw cli - , ("M-x", spawn "$HOME/.local/bin/passwords") + --NOTE drive mounting + , ("M-d m", spawn "$HOME/.local/bin/dmenumount") -- launch mounter + , ("M-d u", spawn "$HOME/.local/bin/dmenuumount") -- launch unmounter - -- launch searcher (dmenu and surf) - , ("M-s s", spawn "$HOME/.local/bin/dmenusearch") - -- launch searcher, default to duckduckgo - , ("M-s d", spawn "$HOME/.local/bin/dmenusearch duckduckgo") + --NOTE backlight controls + , ("", spawn "$HOME/.local/bin/mod_backlight +10") -- increase backlight brightness by 10 + , ("", spawn "$HOME/.local/bin/mod_backlight -10") -- decrease backlight brightness by 10 - -- launch mounter - , ("M-d m", spawn "$HOME/.local/bin/dmenumount") - -- launch unmounter - , ("M-d u", spawn "$HOME/.local/bin/dmenuumount") + --NOTE music and audio controls + , ("M-S-o", spawn "$HOME/.local/bin/set-default-sink") -- set default output + , ("M-S-i", spawn "$HOME/.local/bin/set-default-source") -- set default input + , ("", spawn "$HOME/.local/bin/dec-sink-volume") -- decrease output volume + , ("", spawn "$HOME/.local/bin/inc-sink-volume") -- increase output volume + , ("", spawn "$HOME/.local/bin/toggle-sink-mute") -- toggle output mute + , ("S-", spawn "$HOME/.local/bin/dec-source-volume") -- decrease input volume + , ("S-", spawn "$HOME/.local/bin/inc-source-volume") -- increase input volume + , ("S-", spawn "$HOME/.local/bin/toggle-source-mute") -- toggle input mute - -- backlight controls - -- increase backlight brightness by 10 - , ("", spawn "$HOME/.local/bin/mod_backlight +10") - -- decrease backlight brightness by 10 - , ("", spawn "$HOME/.local/bin/mod_backlight -10") - - -- music and audio controls - -- decrease output volume - , ("", spawn "$HOME/.local/bin/dec-sink-volume") - -- increase output volume - , ("", spawn "$HOME/.local/bin/inc-sink-volume") - -- toggle output mute - , ("", spawn "$HOME/.local/bin/toggle-sink-mute") - -- decrease input volume - , ("S-", spawn "$HOME/.local/bin/dec-source-volume") - -- increase input volume - , ("S-", spawn "$HOME/.local/bin/inc-source-volume") - -- toggle input mute - , ("S-", spawn "$HOME/.local/bin/toggle-source-mute") - -- set default output - , ("M-S-o", spawn "$HOME/.local/bin/set-default-sink") - -- set default input - , ("M-S-i", spawn "$HOME/.local/bin/set-default-source") - - -- extras - , ("", spawn "flameshot gui") + --NOTE extras + , ("M-S-/", spawn "$HOME/.local/bin/xmonad-keys") -- show keybinds + , ("", spawn "scrot") -- take full (all monitors) screenshot + , ("M-", spawn "flameshot gui") -- launch flameshot for snipping ] + + myKeys conf@XConfig {XMonad.modMask = modm} = M.fromList $ -- mod-[1..9], Switch to workspace N -- mod-shift-[1..9], Move client to workspace N - -- [((m .|. modm, k), windows $ f i) | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] -- Mouse bindings: default actions bound to mouse events myMouseBindings XConfig {XMonad.modMask = modm} = M.fromList - -- mod-button1, Set the window to floating mode and move by dragging - [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w - >> windows W.shiftMaster)) - - -- mod-button2, Raise the window to the top of the stack + [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster)) + -- mod-button2, Raise the window to the top of the stack, push to master. , ((modm, button2), (\w -> focus w >> windows W.shiftMaster)) - -- mod-button3, Set the window to floating mode and resize by dragging - , ((modm, button3), (\w -> focus w >> mouseResizeWindow w - >> windows W.shiftMaster)) - + , ((modm, button3), (\w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)) -- you may also bind events to the mouse scroll wheel (button4 and button5) ] +--END_KEYS ------------------------------------------------------------------------ -- Layouts: @@ -384,8 +346,9 @@ myManageHook = composeAll , className =? "guake" --> doIgnore , className =? "barrier" --> doFloat , className =? "net-runelite-client-RuneLite" --> doFloat + , className =? "Yad" --> doCenterFloat , className =? "net-runelite-launcher-Launcher" --> doIgnore - , className =? "steam_app_221380" --> doIgnore + , className =? "steam_app_221380" --> doIgnore , resource =? "desktop_window" --> doIgnore , (className =? "firefox" <&&> resource =? "Dialog")--> doFloat -- Float Firefox Dialog , resource =? "kdesktop" --> doIgnore @@ -436,6 +399,7 @@ myStartupHook = do spawnOnce "slack &" spawnOnce "todoist &" spawnOnce "element-desktop --hidden &" + spawnOnce "flameshot" -- Start trayer last spawnOnce "trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x121e32 --height 20 &" @@ -502,53 +466,75 @@ main = do -- | Finally, a copy of the default bindings in simple textual tabular format. help :: String -help = unlines ["The default modifier key is 'alt'. Default keybindings:", +help = unlines ["The default modifier key is 'super'. Default keybindings:", "", "-- launching and killing programs", "mod-Shift-Enter Launch terminal", - "mod-a Launch run menu", - "mod-Shift-a Launch ssh menu", - "mod-o Launch dmenu", - "mod-l Launch file manager", + "mod-a Launch dmenu", + "mod-o Launch rofi", "mod-Shift-j Close/kill the focused window", "mod-Space Rotate through the available layout algorithms", "mod-Shift-Space Reset the layouts on the current workSpace to default", "mod-n Resize/refresh viewed windows to the correct size", "", + "-- Keybound programs", + "mod-Shift-x Unlock bitwarden cli", + "mod-x Password prompt", + "mod-l Launch file manager", + "", + "-- Misc scripts", + "mod-s s Dmenu search script", + "mod-s d Dmenu search script, default duckduckgo", + "mod-d m Dmenu mount script", + "mod-d u Dmenu unmount script", + "", + "-- Media control", + "mod-Shift-o Select output device", + "mod-Shift-i Select input device", + "The rest use standard media keys.", + "", + "-- Backlight controls", + "Uses standard system keys", + "", + "-- system control", + "mod-Shift-s Shutdown prompt, default no", + "mod-Shift-r Restart prompt, default no", + "mod-Escape Lock prompt, default yes", + " Take full (all monitors) screenshot", + "mod- Open flameshot gui for better snipping", + "", "-- move focus up or down the window stack", - "mod-Tab Move focus to the next window", - "mod-Shift-Tab Move focus to the previous window", - "mod-h Move focus to the next window", - "mod-t Move focus to the previous window", - "mod-m Move focus to the master window", + "mod-Tab Move focus to the next window", + "mod-Shift-Tab Move focus to the previous window", + "mod-m Move focus to the master window", "", "-- modifying the window order", - "mod-Return Swap the focused window and the master window", - "mod-Shift-h Swap the focused window with the next window", - "mod-Shift-t Swap the focused window with the previous window", + "mod-Return Swap the focused window and the master window", + "mod-Shift-Up Swap the focused window with the next window", + "mod-Shift-Down Swap the focused window with the previous window", "", "-- resizing the master/slave ratio", - "mod-d Shri sk the master area", - "mod-n Expand the master area", + "mod-Left Shrink the master area (horizontally)", + "mod-Right Expand the master area", + "mod-Up Mirror shrink master area (vertically)", + "mod-Down Mirror grow master area", "", "-- floating layer support", - "mod-y Push window back into tiling; unfloat and re-tile it", + "mod-y Push window back into tiling; unfloat and re-tile it", + "mod-b Toggle whether the bar shows or not", "", "-- increase or decrease number of windows in the master area", - "mod-w (mod-,) Increment the number of windows in the master area", - "mod-vL (mod-.) Deincrement the number of windows in the master area", + "mod-w Increment the number of windows in the master area", + "mod-v Deincrement the number of windows in the master area", "", - "-- quit, or restart", - "mod-Shift-' Quit xmonad", - "mod-' Restart xmonad", - "mod-[1..9] Switch to workSpace N", + "-- restarting Xmonad", + "mod-' Restart xmonad", "", "-- Workspaces & screens", - "mod-Shift-[1..9] Move client to workspace N", - "mod-{',','.','p'} Switch to physical/Xinerama screens 1, 2, or 3", - "mod-Shift-{',','.','p'} Move client to screen 1, 2, or 3", + "mod-[1..9] Switch to workSpace N", + "mod-Shift-[1..9] Move client to workspace N", "", "-- Mouse bindings: default actions bound to mouse events", - "mod-button1 Set the window to floating mode and move by dragging", - "mod-button2 Raise the window to the top of the stack", - "mod-button3 Set the window to floating mode and resize by dragging"] + "mod-button1 Set the window to floating mode and move by dragging", + "mod-button2 Raise the window to the top of the stack (switch push to master and cascade)", + "mod-button3 Set the window to floating mode and resize by dragging"] diff --git a/default-programs b/default-programs index 32cfea6..921d6c2 100644 --- a/default-programs +++ b/default-programs @@ -1,5 +1,7 @@ git-flow-completion-git +yad +scrot pulseaudio-bluetooth bluez-utils sshfs