From b40f2610c47de83c7a9a2f057767ba8d6f688631 Mon Sep 17 00:00:00 2001 From: 4Lost Date: Fri, 15 Mar 2024 15:49:55 +0100 Subject: [PATCH] xmonad -> add hotkeys || rofi -> set Theme --- home/TODOS.md | 5 ----- home/programs/rofi/theme.rafi | 18 ++++++++--------- home/programs/xmonad/default.nix | 2 +- home/programs/xmonad/src/xmonad.hs | 32 +++++++++++++++++++++++------- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/home/TODOS.md b/home/TODOS.md index c13872e..24566b7 100644 --- a/home/TODOS.md +++ b/home/TODOS.md @@ -53,11 +53,6 @@ # Optimierung -## Rofi - -- Theme wählen -- Oder Theme an Farben anpassen - ## Neovim - Sidebar diff --git a/home/programs/rofi/theme.rafi b/home/programs/rofi/theme.rafi index c59fb5d..8b62ad3 100644 --- a/home/programs/rofi/theme.rafi +++ b/home/programs/rofi/theme.rafi @@ -1,15 +1,15 @@ * { - bg-col: #24273a; - bg-col-light: #24273a; - border-col: #24273a; - selected-col: #24273a; - blue: #8aadf4; - fg-col: #cad3f5; - fg-col2: #ed8796; - grey: #6e738d; + bg-col: #1e1e2e; + bg-col-light: #1e1e2e; + border-col: #1e1e2e; + selected-col: #1e1e2e; + blue: #89b4fa; + fg-col: #cdd6f4; + fg-col2: #f38ba8; + grey: #6c7086; width: 600; - font: "Fira Code 14"; + font: "JetBrainsMono Nerd Font 14"; } element-text, element-icon , mode-switcher { diff --git a/home/programs/xmonad/default.nix b/home/programs/xmonad/default.nix index f50aeda..ba7e1e3 100644 --- a/home/programs/xmonad/default.nix +++ b/home/programs/xmonad/default.nix @@ -12,5 +12,5 @@ }; }; - home.packages = with pkgs; [ xmobar maim ]; + home.packages = with pkgs; [ xmobar maim xdotool ]; } diff --git a/home/programs/xmonad/src/xmonad.hs b/home/programs/xmonad/src/xmonad.hs index 1a7bb8a..aecb732 100644 --- a/home/programs/xmonad/src/xmonad.hs +++ b/home/programs/xmonad/src/xmonad.hs @@ -11,24 +11,38 @@ import XMonad.Util.ClickableWorkspaces import XMonad.Util.Loggers import Data.ByteString (maximum) import Distribution.Compat.Prelude (print) +import Control.Monad.RWS (All(All)) +import XMonad.Hooks.ManageHelpers main = xmonad . ewmhFullscreen . ewmh . withEasySB (statusBarProp "xmobar" (pure myXmobarPP)) defToggleStrutsKey $ myconfig myconfig = def { - layoutHook = myLayout - , terminal = "alacritty" - , normalBorderColor = "#f5c2e7" - , focusedBorderColor = "#cdd6f4" + modMask = mod4Mask + , layoutHook = myLayout + , terminal = "alacritty" + , normalBorderColor = "#f5c2e7" + , focusedBorderColor = "#cdd6f4" + , manageHook = myManageHooks } `additionalKeysP` [ -- System ("M-p", spawn "rofi -show \"drun\"") - , ("", spawn "maim --format=png \"/home/elias/Pictures/screenshot-$(date -u +%Y-%m-%d-%H:%M:%S).png\"") + -- Screenshots + , ("", spawn "maim --format=png \"/home/$USER/Pictures/screenshot-$(date -u +%Y-%m-%d-%H:%M:%S).png\"") -- Whole Screen to File + , ("M-", spawn "maim --format=png --window $(xdotool getactivewindow) \"/home/$USER/Pictures/screenshot-$(date -u +%Y-%m-%d-%H:%M:%S).png\"") -- Focused Window to File + , ("S-", spawn "maim --format=png --select \"/home/$USER/Pictures/screenshot-$(date -u +%Y-%m-%d-%H:%M:%S).png\"") -- Selection to File + , ("C-", spawn "maim --format=png | xclip -selection clipboard -t image/png") -- Whole Screen to Clipboard + , ("M-C-", spawn "maim --format=png --window $(xdotool getactivewindow) | xclip -section clipboard -t image/png") -- Focused Window to Clipboard + , ("C-S-", spawn "maim --format=png --select | xclip -selection clipboard -t image/png") -- Selection to Clipboard --Program , ("M-c", spawn "firefox") + , ("M-y", spawn "signal-desktop") + , ("M-x", spawn "telegram-desktop") + , ("M-c", spawn "firefox") + , ("M-v", spawn "thunderbird") -- Brightness , ("", spawn "xbacklight -inc 10") , ("", spawn "xbacklight -dec 10") @@ -37,8 +51,6 @@ myconfig = def , ("", spawn "pulseaudio-ctl up 5") , ("", spawn "pulseaudio-ctl down 5") , ("", spawn "pulseaudio-ctl mute-input") - -- Print - , ("", spawn "pulseaudio-ctl mute-input") ] `removeKeysP` [] @@ -73,6 +85,12 @@ myXmobarPP = def myLayout = Tall 1 (3/100) (1/2) ||| Mirror (Tall 1 (3/100) (1/2)) ||| Full ||| ThreeColMid 1 (3/100) (1/2) -- wenn wieder zoom von fokusierten Seitenfenstern gewünscht, dann Fireox fixn und: magnifiercz' 1.3 (ThreeColMid 1 (3/100) (1/2)) +myManageHooks :: ManageHook +myManageHooks = composeAll + [ + isDialog --> doFloat + ] + myStartupHook :: X () myStartupHook = do mapM_ spawnOnce ["xmobar -x " ++ show sid | sid <- [0..9]]