statusbar & tray set up
This commit is contained in:
parent
5bc1b7fc2b
commit
dc1d2b7c2b
4 changed files with 39 additions and 37 deletions
|
@ -11,6 +11,9 @@ import XMonad
|
|||
import Data.Monoid
|
||||
import System.Exit
|
||||
|
||||
import XMonad.Hooks.StatusBar
|
||||
import XMonad.Hooks.StatusBar.PP
|
||||
|
||||
import qualified XMonad.StackSet as W
|
||||
import qualified Data.Map as M
|
||||
|
||||
|
@ -61,18 +64,24 @@ myFocusedBorderColor = "#504945"
|
|||
--
|
||||
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
||||
|
||||
-- launch a terminal
|
||||
[ ((modm, xK_Return), spawn $ XMonad.terminal conf)
|
||||
|
||||
-- launch gmrun
|
||||
, ((modm, xK_d ), spawn "rofi -show drun")
|
||||
|
||||
-- close focused window
|
||||
, ((modm .|. shiftMask, xK_q), kill)
|
||||
|
||||
-- Rotate through the available layout algorithms
|
||||
, ((modm, xK_space ), sendMessage NextLayout)
|
||||
|
||||
-- rofiing
|
||||
, ((modm, xK_d), spawn "rofi -show drun")
|
||||
, ((modm .|. shiftMask, xK_e), spawn "rofi -show \"desktopctl\" -modes \"desktopctl:$(which desktopctl)\"")
|
||||
, ((modm, xK_m), spawn "menu-qalc")
|
||||
, ((modm, xK_i), spawn "rofimoji -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy")
|
||||
|
||||
-- screenshotting
|
||||
-- TODO: Fix/rewrite window-screenshot.sh
|
||||
, ((modm, xK_w), spawn "window-screenshot.sh")
|
||||
, ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots")
|
||||
, ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots")
|
||||
, ((modm, xK_t), spawn "ocr-screenshot.sh")
|
||||
|
||||
-- Reset the layouts on the current workspace to default
|
||||
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
|
||||
|
||||
|
@ -82,37 +91,23 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
|||
-- Move focus to the next window
|
||||
, ((modm, xK_Tab ), windows W.focusDown)
|
||||
|
||||
-- Move focus to the next window
|
||||
-- Move focus
|
||||
, ((modm, xK_j ), windows W.focusDown)
|
||||
|
||||
-- Move focus to the previous window
|
||||
, ((modm, xK_k ), windows W.focusUp )
|
||||
|
||||
-- Move focus to the master window
|
||||
, ((modm, xK_m ), windows W.focusMaster )
|
||||
|
||||
-- Swap the focused window and the master window
|
||||
, ((modm, xK_Return), windows W.swapMaster)
|
||||
|
||||
-- Swap the focused window with the next window
|
||||
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
|
||||
|
||||
-- Swap the focused window with the previous window
|
||||
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
|
||||
|
||||
-- Shrink the master area
|
||||
, ((modm, xK_h ), sendMessage Shrink)
|
||||
|
||||
-- Expand the master area
|
||||
, ((modm, xK_l ), sendMessage Expand)
|
||||
|
||||
-- Push window back into tiling
|
||||
, ((modm, xK_t ), withFocused $ windows . W.sink)
|
||||
--, ((modm, xK_t ), withFocused $ windows . W.sink)
|
||||
|
||||
-- Increment the number of windows in the master area
|
||||
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
|
||||
|
||||
-- Deincrement the number of windows in the master area
|
||||
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
|
||||
|
||||
-- Toggle the status bar gap
|
||||
|
@ -121,7 +116,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
|||
--
|
||||
-- , ((modm , xK_b ), sendMessage ToggleStruts)
|
||||
|
||||
, ((modm .|. shiftMask, xK_e ), io (exitWith ExitSuccess))
|
||||
--, ((modm .|. shiftMask, xK_e ), io (exitWith ExitSuccess))
|
||||
|
||||
-- Restart xmonad
|
||||
--, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
|
||||
|
@ -241,14 +236,20 @@ myLogHook = return ()
|
|||
-- per-workspace layout choices.
|
||||
--
|
||||
-- By default, do nothing.
|
||||
myStartupHook = return ()
|
||||
myStartupHook = do
|
||||
spawn "pkill oneko; oneko -tofocus -tora -position +-1+5 -fg palevioletred3 -bg pink -name 'Rose the desktop kitty'"
|
||||
--spawn "pkill polybar; polybar"
|
||||
spawn "pkill volumeicon; volumeicon"
|
||||
spawn "pkill nm-applet; nm-applet"
|
||||
spawn "mullvad-vpn --background"
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Now run xmonad with all the defaults we set up.
|
||||
|
||||
-- Run xmonad with the settings you specify. No need to modify this.
|
||||
--
|
||||
main = xmonad defaults
|
||||
mySB = statusBarProp "polybar" (pure xmobarPP)
|
||||
main = xmonad $ withEasySB mySB defToggleStrutsKey defaults
|
||||
|
||||
-- A structure containing your configuration settings, overriding
|
||||
-- fields in the default config. Any you don't override, will
|
||||
|
@ -271,7 +272,7 @@ defaults = def
|
|||
, keys = myKeys
|
||||
, mouseBindings = myMouseBindings
|
||||
-- hooks, layouts
|
||||
, layoutHook = spacingRaw True (Border 0 10 10 10) True (Border 10 10 10 10) True $ myLayout
|
||||
, layoutHook = spacingRaw True (Border 0 0 0 0) True (Border 7 7 7 7) True $ myLayout
|
||||
, manageHook = myManageHook
|
||||
, handleEventHook = myEventHook
|
||||
, logHook = myLogHook
|
||||
|
|
|
@ -155,7 +155,7 @@ in with lib; {
|
|||
|
||||
# external
|
||||
libnotify i3lock-fancy rofi rofimoji feh xorg.xinput dunst arandr
|
||||
flameshot tesseract5 imagemagick xclip polybar kitty xmacro
|
||||
flameshot tesseract5 imagemagick xclip kitty xmacro
|
||||
brightnessctl drawing libqalculate ddgr jq brillo
|
||||
|
||||
# custom scripts
|
||||
|
|
|
@ -3,14 +3,15 @@
|
|||
{
|
||||
config = {
|
||||
home-manager.users.jade = { pkgs, ... }: {
|
||||
xsession.windowManager.i3.config.startup = [
|
||||
{
|
||||
command = "pkill polybar; polybar";
|
||||
always = true;
|
||||
}
|
||||
];
|
||||
#xsession.windowManager.i3.config.startup = [
|
||||
#{
|
||||
#command = "pkill polybar; polybar";
|
||||
#always = true;
|
||||
#}
|
||||
#];
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
package = pkgs.polybarFull;
|
||||
|
||||
script = "";
|
||||
settings = {
|
||||
|
@ -44,7 +45,7 @@
|
|||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
enable-ipc = true;
|
||||
wm-restack = "i3";
|
||||
wm-restack = "generic";
|
||||
override-redirect = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ pkgs.writeShellScriptBin "desktopctl" ''
|
|||
exit 0
|
||||
;;
|
||||
"Log Out")
|
||||
pkill i3
|
||||
pkill xmonad
|
||||
exit 0
|
||||
;;
|
||||
"Shut Down")
|
||||
|
|
Loading…
Reference in a new issue