diff --git a/files/.config/configstore/update-notifier-npm.json b/files/.config/configstore/update-notifier-npm.json index e01704c..bf390d3 100644 --- a/files/.config/configstore/update-notifier-npm.json +++ b/files/.config/configstore/update-notifier-npm.json @@ -1,10 +1,4 @@ { "optOut": false, - "lastUpdateCheck": 1597606728076, - "update": { - "latest": "6.14.7", - "current": "6.14.6", - "type": "patch", - "name": "npm" - } + "lastUpdateCheck": 1597756945539 } \ No newline at end of file diff --git a/files/.config/htop/htoprc b/files/.config/htop/htoprc index 96d1464..210f8d0 120000 --- a/files/.config/htop/htoprc +++ b/files/.config/htop/htoprc @@ -1 +1 @@ -/nix/store/hz5lddpqns8cg8zwrc68jy8abklcvn1h-home-manager-files/.config/htop/htoprc \ No newline at end of file +/nix/store/h2i643kribbs0wngd2sinhr1p3dj2ib0-home-manager-files/.config/htop/htoprc \ No newline at end of file diff --git a/files/.config/picom.conf b/files/.config/picom.conf index fbce98e..dfa2194 100644 --- a/files/.config/picom.conf +++ b/files/.config/picom.conf @@ -13,7 +13,7 @@ glx-copy-from-front = false; # }}} # Shadows -------------------------------- {{{ -shadow = true; +shadow = false; #shadow-radius = 20; #shadow-offset-x = -20; #shadow-offset-y = -20; diff --git a/files/.config/polybar/config.ini b/files/.config/polybar/config.ini index a55d48c..7b8f203 100644 --- a/files/.config/polybar/config.ini +++ b/files/.config/polybar/config.ini @@ -104,7 +104,7 @@ font-0 = "cherry:size=12;2" ;font-0 = "cozette:size=10;2" font-1 = "Symbola:size=8;1" font-2 = "FontAwesome5Free:style=Solid:size=8;2" -font-3 = "Iosevka Nerd Font:size=10;2" +;font-3 = "Iosevka Nerd Font:size=10;2" font-4 = "Symbola:size=9;2" ;font-1 = "FontAwesome:fontformat=truetype:size=12;1" diff --git a/files/.config/polybar/launch.sh b/files/.config/polybar/launch.sh index fb8d532..4310a0c 100755 --- a/files/.config/polybar/launch.sh +++ b/files/.config/polybar/launch.sh @@ -1,6 +1,6 @@ #!/bin/bash -killall -q polybar +pkill polybar echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log diff --git a/files/.xmonad/lib/Config.hs b/files/.xmonad/lib/Config.hs index 265cd92..a301629 100644 --- a/files/.xmonad/lib/Config.hs +++ b/files/.xmonad/lib/Config.hs @@ -23,6 +23,7 @@ import qualified XMonad.Util.ExtensibleState as XS import qualified Rofi import qualified DescribedSubmap import qualified TiledDragging +import qualified FancyBorders --import qualified WindowSwallowing import XMonad.Hooks.WindowSwallowing as WindowSwallowing @@ -74,18 +75,15 @@ import XMonad.Layout.LayoutModifier import XMonad.Util.NamedScratchpad import XMonad.Util.Run import XMonad.Util.SpawnOnce (spawnOnce) -import qualified XMonad.Hooks.UrgencyHook as Urgency import XMonad.Util.WorkspaceCompare ( getSortByXineramaPhysicalRule , getSortByIndex) import qualified Data.Monoid import Data.Monoid ( Endo ) -import Data.Traversable ( for ) import Data.Semigroup ( All(..) ) import qualified System.IO as SysIO import qualified XMonad.Actions.Navigation2D as Nav2d import qualified XMonad.Config.Desktop as Desktop import qualified XMonad.Hooks.EwmhDesktops as Ewmh -import XMonad.Hooks.FadeInactive import qualified XMonad.Hooks.ManageHelpers as ManageHelpers import XMonad.Hooks.DebugStack ( debugStackString , debugStackFullString @@ -96,9 +94,7 @@ import qualified XMonad.Layout.MultiToggle.Instances as MTog import qualified XMonad.Layout.ToggleLayouts as ToggleLayouts import qualified XMonad.StackSet as W import qualified XMonad.Util.XSelection as XSel -import XMonad.Util.WindowProperties import qualified XMonad.Layout.PerScreen as PerScreen -import XMonad.Layout.WindowArranger {-# ANN module "HLint: ignore Redundant $" #-} {-# ANN module "HLint: ignore Redundant bracket" #-} {-# ANN module "HLint: ignore Move brackets to avoid $" #-} @@ -175,7 +171,9 @@ data EmptyShrinker = EmptyShrinker deriving (Show, Read) instance Shrinker EmptyShrinker where shrinkIt _ _ = [] :: [String] + myLayout = avoidStruts + -- $ FancyBorders.fancyBorders borderTheme $ smartBorders $ MTog.mkToggle1 MTog.FULL $ ToggleLayouts.toggleLayouts (rename "Tabbed" . makeTabbed . spacingAndGaps $ ResizableTall 1 (3/100) (1/2) []) @@ -200,6 +198,11 @@ myLayout = avoidStruts ((rename "ThreeCol" $ makeTabbed $ spacingAndGaps $ Mirror $ reflectHoriz $ ThreeColMid 1 (3/100) (1/2)) ||| (rename "Horizon" $ spacingAndGaps $ mouseResizableTileMirrored {draggerType = BordersDragger})) + + borderTheme = FancyBorders.FancyBordersTheme { FancyBorders.outerColor = "#282828" + , FancyBorders.intBorderWidth = 2 + } + rename n = renamed [Replace n] spacingAndGaps = let gap = 15 -- gap = 20 border = Border gap gap gap gap @@ -502,7 +505,6 @@ main = do , logHook = mconcat [ polybarLogHooks, Ewmh.ewmhDesktopsLogHook, logHook Desktop.desktopConfig, logHook def] , startupHook = mconcat [ myStartupHook, Ewmh.ewmhDesktopsStartup, return () >> checkKeymap myConfig myKeys] , manageHook = mconcat [ manageSpawn, myManageHook, manageHook def] - --, focusedBorderColor = aqua , focusedBorderColor = "#427b58" , normalBorderColor = "#282828" , handleEventHook = mconcat [ mySwallowEventHook diff --git a/files/.xmonad/lib/FancyBorders.hs b/files/.xmonad/lib/FancyBorders.hs new file mode 100644 index 0000000..28455c2 --- /dev/null +++ b/files/.xmonad/lib/FancyBorders.hs @@ -0,0 +1,87 @@ +{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, ScopedTypeVariables #-} +module FancyBorders + ( FancyBordersTheme(..) + , FancyBorders + , fancyBorders + , defaultFancyBorders + , defaultFancyTheme + ) +where + +import XMonad +import XMonad.Layout.LayoutModifier + +defaultFancyTheme :: FancyBordersTheme +defaultFancyTheme = FancyBordersTheme "#303030" 1 + +data FancyBordersTheme = FancyBordersTheme { + outerColor :: String, + intBorderWidth:: Integer + } deriving (Show, Read) + +newtype FancyBorders a = FancyBorders FancyBordersTheme + deriving (Show, Read) + +instance LayoutModifier FancyBorders Window where + handleMess (FancyBorders cfg) m + | Just (_ :: Event) <- fromMessage m = withFocused (drawFocusedWindow cfg) + >> return Nothing + | otherwise = return Nothing + + redoLayout (FancyBorders cfg) _ _ wrs = do + mapM_ (flip (drawFancyBorder cfg) False) wrs + return (wrs, Nothing) + +defaultFancyBorders :: l a -> ModifiedLayout FancyBorders l a +defaultFancyBorders = ModifiedLayout (FancyBorders defaultFancyTheme) + +fancyBorders :: FancyBordersTheme -> l a -> ModifiedLayout FancyBorders l a +fancyBorders t = ModifiedLayout (FancyBorders t) + +drawFocusedWindow :: FancyBordersTheme -> Window -> X () +drawFocusedWindow cfg win = do + dpy <- asks display + bw <- asks (borderWidth . config) + (_, x, y, w, h, _, _) <- io $ getGeometry dpy win + drawFancyBorder cfg (win, Rectangle x y (w + 2 * bw) (h + 2 * bw)) True + +drawFancyBorder :: FancyBordersTheme -> (Window, Rectangle) -> Bool -> X () +drawFancyBorder cfg (win, rect) active = do + bw <- asks (borderWidth . config) + dpy <- asks display + nbc <- asks normalBorder + fbc <- asks focusedBorder + let w = rect_width rect - 2 * bw + h = rect_height rect - 2 * bw + fw = rect_width rect + fh = rect_height rect + ibw' = fromIntegral $ intBorderWidth cfg + ibw = if ibw' >= bw then 1 else ibw' + rects = + [ Rectangle (fromIntegral w) 0 ibw (h + ibw) + , Rectangle (fromIntegral fw - fromIntegral ibw) 0 ibw (h + ibw) + , Rectangle 0 (fromIntegral h) (w + ibw) ibw + , Rectangle 0 (fromIntegral fh - fromIntegral ibw) (w + ibw) ibw + , Rectangle (fromIntegral fw - fromIntegral ibw) + (fromIntegral fh - fromIntegral ibw) + ibw + ibw + ] + + io $ do + pix <- createPixmap dpy win fw fh 24 + gc <- createGC dpy win + (Just outerPixel) <- io $ initColor dpy $ outerColor cfg + + -- outer border + setForeground dpy gc outerPixel + fillRectangle dpy pix gc 0 0 fw fh + + -- inner border + setForeground dpy gc $ if active then fbc else nbc + io $ fillRectangles dpy pix gc rects + + setWindowBorderPixmap dpy win pix + freeGC dpy gc + freePixmap dpy pix + diff --git a/files/.xmonad/my-xmonad.cabal b/files/.xmonad/my-xmonad.cabal index 08cfb36..6695f73 100644 --- a/files/.xmonad/my-xmonad.cabal +++ b/files/.xmonad/my-xmonad.cabal @@ -12,6 +12,7 @@ executable my-xmonad DescribedSubmap TiledDragging WindowSwallowing + FancyBorders default-language: Haskell2010 ghc-options: -Wall -threaded -fno-warn-missing-signatures diff --git a/files/firefoxChrome/chrome/userChrome.css b/files/firefoxChrome/chrome/userChrome.css index 488f2e9..d5bb7d2 100644 --- a/files/firefoxChrome/chrome/userChrome.css +++ b/files/firefoxChrome/chrome/userChrome.css @@ -153,7 +153,6 @@ hbox.tab-content[pinned="true"] .tab-text { } #tabs-newtab-button { - list-style-image: url("add.svg") !important; opacity: 0.7; } @@ -249,14 +248,6 @@ hbox.tab-content[pinned="true"] .tab-text { border: none !important; } -#back-button { - list-style-image: url("left-arrow.svg") !important; -} - -#forward-button { - list-style-image: url("right-arrow.svg") !important; -} - toolbar { background-image: none !important; } diff --git a/files/nix-stuff/nixpkgs/modules/desktop.nix b/files/nix-stuff/nixpkgs/modules/desktop.nix index deb855e..77b6623 100644 --- a/files/nix-stuff/nixpkgs/modules/desktop.nix +++ b/files/nix-stuff/nixpkgs/modules/desktop.nix @@ -38,6 +38,7 @@ in elkowar.programs = { alacritty.enable = true; rofi.enable = true; + firefox.enable = false; }; programs = { diff --git a/files/nix-stuff/nixpkgs/modules/desktop/default.nix b/files/nix-stuff/nixpkgs/modules/desktop/default.nix index 9d19248..ee96e22 100644 --- a/files/nix-stuff/nixpkgs/modules/desktop/default.nix +++ b/files/nix-stuff/nixpkgs/modules/desktop/default.nix @@ -1 +1 @@ -{ ... }: { imports = [ ./alacritty.nix ./rofi ./colors ./gtk.nix ]; } +{ ... }: { imports = [ ./alacritty.nix ./rofi ./colors ./gtk.nix ./firefox]; } diff --git a/files/nix-stuff/nixpkgs/modules/desktop/firefox.nix b/files/nix-stuff/nixpkgs/modules/desktop/firefox.nix deleted file mode 100644 index 814c1a4..0000000 --- a/files/nix-stuff/nixpkgs/modules/desktop/firefox.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - enable = true; - profiles.leon = { - isDefault = true; - name = "Main profile"; - extraConfig = builtins.readFile /home/leon/desktop-dotfiles/files/firefoxChrome/chrome/userChrome.js; - userChrome = builtins.readFile /home/leon/desktop-dotfiles/files/firefoxChrome/chrome/userChrome.css; - userContent = builtins.readFile /home/leon/desktop-dotfiles/files/firefoxChrome/chrome/userContent.css; - settings = { - "browser.startup.homepage" = "file:///home/leon/.config/my_startpage/index.html"; - "browser.search.region" = "DE"; - "browser.search.isUS" = false; - "distribution.searchplugins.defaultLocale" = "de-DE"; - "general.useragent.locale" = "de-DE"; - "browser.bookmarks.showMobileBookmarks" = true; - }; - }; -} diff --git a/files/nix-stuff/nixpkgs/modules/desktop/firefox/default.nix b/files/nix-stuff/nixpkgs/modules/desktop/firefox/default.nix new file mode 100644 index 0000000..02537d9 --- /dev/null +++ b/files/nix-stuff/nixpkgs/modules/desktop/firefox/default.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.elkowar.programs.firefox; +in +{ + options.elkowar.programs.firefox = { + enable = lib.mkEnableOption "Enable firefox"; + }; + + config = lib.mkIf cfg.enable { + programs.firefox = { + enable = true; + profiles.leon = { + isDefault = true; + name = "Main profile"; + extraConfig = builtins.readFile /home/leon/desktop-dotfiles/files/firefoxChrome/chrome/userChrome.js; + userChrome = builtins.readFile /home/leon/desktop-dotfiles/files/firefoxChrome/chrome/userChrome.css; + userContent = builtins.readFile /home/leon/desktop-dotfiles/files/firefoxChrome/chrome/userContent.css; + settings = { + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "browser.startup.homepage" = "file:///home/leon/.config/my_startpage/index.html"; + "browser.search.region" = "DE"; + "browser.search.isUS" = false; + "distribution.searchplugins.defaultLocale" = "de-DE"; + "general.useragent.locale" = "de-DE"; + "browser.bookmarks.showMobileBookmarks" = true; + "general.smoothScroll" = true; + }; + }; + }; + + }; +} diff --git a/files/nix-stuff/nixpkgs/packages/scr.nix b/files/nix-stuff/nixpkgs/packages/scr.nix index 635307a..44a2b39 100644 --- a/files/nix-stuff/nixpkgs/packages/scr.nix +++ b/files/nix-stuff/nixpkgs/packages/scr.nix @@ -1,18 +1,21 @@ -{ pkgs ? import { } }: -pkgs.stdenv.mkDerivation rec { +{ fetchFromGitHub, stdenvNoCC, lib, makeWrapper, wmutils-core, procps-ng, slop, ffmpeg, xclip, shotgun, extraPackages ? [] }: +let + binPath = lib.makeBinPath ([ wmutils-core xclip shotgun procps-ng slop ffmpeg ] ++ extraPackages); +in +stdenvNoCC.mkDerivation rec { pname = "scr"; - version = "2.0"; - src = pkgs.fetchFromGitHub { + version = "2.1"; + src = fetchFromGitHub { owner = "6gk"; repo = "scr"; rev = "v${version}"; - sha256 = "18srzjkbhh3n10ayq5nnbnx37vjfzfw0adhkwbg1s157y8hfnlcy"; + sha256 = "0fgmv99zlppi5wa2qylbvnblk9kc6i201byz8m79ld8cwiymabi2"; }; - nativeBuildInputs = [ pkgs.makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; installPhase = "install -m755 -D ./scr $out/bin/scr"; postFixup = '' - wrapProgram "$out/bin/scr" --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [ slop ffmpeg dmenu xclip shotgun ])} + wrapProgram "$out/bin/scr" --prefix PATH : ${binPath} ''; meta = { description = "Super CRappy SCReenshot SCRipt"; @@ -22,7 +25,8 @@ pkgs.stdenv.mkDerivation rec { A SCRipt for Sound Cloud Rappers ''; homepage = "https://github.com/6gk/scr"; - license = pkgs.lib.licenses.mit; - platforms = pkgs.lib.platforms.all; + maintainers = with lib.maintainers; [ elkowar ]; + license = lib.licenses.mit; + platforms = lib.platforms.all; }; } diff --git a/files/nix-stuff/nixpkgs/result b/files/nix-stuff/nixpkgs/result new file mode 120000 index 0000000..a60e11d --- /dev/null +++ b/files/nix-stuff/nixpkgs/result @@ -0,0 +1 @@ +/nix/store/pk0kjc9f85yyb4y1rb5hralpwr4ai3rp-options.json \ No newline at end of file diff --git a/files/scripts/bazecor.sh b/files/scripts/bazecor.sh index 38a00f7..c08bb53 100755 --- a/files/scripts/bazecor.sh +++ b/files/scripts/bazecor.sh @@ -1,4 +1,5 @@ #!/bin/bash sudo chmod 666 /dev/ttyACM0 -~/Downloads/Bazecor-0.2.0.AppImage +#~/Downloads/Bazecor-0.2.0.AppImage +~/Downloads/Bazecor-0.2.2.AppImage