aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/apps/dev.nix2
-rw-r--r--gui/conf/touchegg.conf18
-rw-r--r--gui/conf/xmonad.hs60
-rw-r--r--gui/gtk.nix1
-rw-r--r--gui/hidpi.nix28
-rw-r--r--gui/kitty.nix4
-rw-r--r--gui/networkmanager.nix2
-rw-r--r--gui/redshift.nix10
-rw-r--r--gui/stalonetray.nix20
-rw-r--r--gui/touchegg.nix22
-rw-r--r--gui/twmn.nix2
-rw-r--r--gui/xmonad.nix5
-rw-r--r--host/asterix.nix1
-rw-r--r--host/athena.nix16
-rw-r--r--host/obelix.nix1
15 files changed, 156 insertions, 36 deletions
diff --git a/gui/apps/dev.nix b/gui/apps/dev.nix
index 2d7397c..4f3bf2e 100644
--- a/gui/apps/dev.nix
+++ b/gui/apps/dev.nix
@@ -9,6 +9,8 @@
qcachegrind
gitg
paraview
+ # language utilities
+ artha
];
};
}
diff --git a/gui/conf/touchegg.conf b/gui/conf/touchegg.conf
new file mode 100644
index 0000000..2afb98b
--- /dev/null
+++ b/gui/conf/touchegg.conf
@@ -0,0 +1,18 @@
+<touchégg>
+
+<application name="All">
+
+<gesture type="DRAG" fingers="3" direction="LEFT">
+ <action type="SEND_KEYS">Control+j</action>
+</gesture>
+
+<gesture type="DRAG" fingers="3" direction="RIGHT">
+ <action type="SEND_KEYS">Control+k</action>
+</gesture>
+
+<gesture type="TAP" fingers="2">
+ <action type="MOUSE_CLICK">BUTTON=3</action>
+</gesture>
+
+</application>
+</touchégg>
diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs
index bf067f9..bec0fff 100644
--- a/gui/conf/xmonad.hs
+++ b/gui/conf/xmonad.hs
@@ -4,6 +4,7 @@ import qualified XMonad.StackSet as S
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageHelpers
+import XMonad.Hooks.ManageDocks
import XMonad.Hooks.InsertPosition
import XMonad.Layout.Tabbed
@@ -36,6 +37,7 @@ import XMonad.Actions.UpdatePointer
import Data.Maybe
import Control.Monad (when)
import Data.Map (Map, fromList, member)
+import Data.List (unionBy)
import System.Exit
import System.Posix.Unistd
@@ -43,9 +45,9 @@ import System.Posix.Unistd
workspaces :: [WorkspaceId]
workspaces = map show [1 .. 9 :: Int]
-customTabTheme = (theme xmonadTheme)
+customTabTheme host = (theme xmonadTheme)
{ fontName = "xft:Iosevka Medium-12"
- , decoHeight = 20
+ , decoHeight = decoHeightOn host
, activeTextColor = "#222222"
, activeColor = "#909636"
, inactiveTextColor = "#999999"
@@ -60,7 +62,7 @@ customLayoutHook host = id
$ bsp ||| tabs ||| frame ||| tiles ||| two
where
bsp = name "bsp" $ borderResize (emptyBSP)
- tabs = name "tabs" $ tabbed shrinkText customTabTheme
+ tabs = name "tabs" $ tabbed shrinkText (customTabTheme host)
frame = name "frame" $ id
. mkToggle (single REFLECTX)
. mkToggle (single REFLECTY)
@@ -100,6 +102,8 @@ scratchpads host =
(customFloating $ hideScreenBorder host dropDownLarge)
, NS "documentation" "zeal" (className =? "Zeal")
(customFloating $ hideScreenBorder host dropDown)
+ , NS "thesaurus" "artha" (className =? "Artha")
+ (customFloating $ hideScreenBorder host sideBarLeft)
, NS "messaging" "telegram-desktop" ((className =? "TelegramDesktop") <&&> (title /=? "Media viewer"))
(customFloating $ hideScreenBorder host sideBarRight) ]
@@ -114,11 +118,11 @@ windowBringerDmenuConfig = def { menuCommand = "rofi"
, menuArgs = [ "-p", "win", "-dmenu", "-i" ] }
hostSpecificKeybindings host = case host of
- "asterix" -> [ ("M-i b" , showNotification "Battery"
- "`acpi | cut -c 10-`")
- , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C"
- "`cat /proc/acpi/ibm/fan | awk '/speed/{print $2}'` RPM")
- , ("M-c n" , spawn "networkmanager_dmenu") ]
+ "asterix" -> [ ("M-i b" , showNotification "Battery"
+ "`acpi | cut -c 10-`")
+ , ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C"
+ "`cat /proc/acpi/ibm/fan | awk '/speed/{print $2}'` RPM")
+ , ("M-c n" , spawn "networkmanager_dmenu") ]
"athena" -> [ ("M-i b" , showNotification "Battery"
"`acpi | cut -c 10-`")
, ("M-i c" , showNotification "`acpi --thermal | awk '{print $4}'`°C"
@@ -128,7 +132,8 @@ hostSpecificKeybindings host = case host of
, ("<XF86MonBrightnessDown>" , spawn "xbacklight -dec 5")
, ("<XF86AudioRaiseVolume>" , spawn "amixer sset Master 10%+")
, ("<XF86AudioLowerVolume>" , spawn "amixer sset Master 10%-")
- , ("<XF86AudioMute>" , spawn "amixer sset Master toggle") ]
+ , ("<XF86AudioMute>" , spawn "amixer sset Master toggle")
+ , ("<Print>" , namedScratchpadAction (scratchpads host) "terminal") ]
"obelix" -> [ ("M-i g" , showNotification "GPU"
"`nvidia-smi --query-gpu=name,temperature.gpu,utilization.gpu,utilization.memory --format=csv,noheader | awk -F',' '{print $1 \" running at\" $2 \"°C due to\" $3 \" load and\" $4 \" memory usage\"}'`") ]
_ -> [ ]
@@ -142,34 +147,36 @@ commonKeybindings host =
, ("M-<Space>" , spawn "rofi -show combi")
, ("M-<Return>" , spawn "kitty")
, ("M-S-<Return>" , spawn "nvim-qt --no-ext-tabline")
- , ("<Print>" , spawn "xfce4-screenshooter")
+ , ("<Print>" , spawn "flameshot gui")
-- window management
, ("M-q" , windows $ S.shift "NSP")
, ("M-S-q" , kill)
+ , ("M-h" , sendMessage Shrink)
+ , ("M-l" , sendMessage Expand)
+ , ("M-<Backspace>" , nextMatch History (return True))
+-- window movement
, ("M-j" , windows S.focusDown)
, ("M-k" , windows S.focusUp)
, ("M-S-j" , windows S.swapDown)
, ("M-S-k" , windows S.swapUp)
- , ("M-h" , sendMessage Shrink)
- , ("M-l" , sendMessage Expand)
- , ("M-<Backspace>" , nextMatch History (return True))
-- window bringer
, ("M-a" , gotoMenuConfig windowBringerDmenuConfig)
, ("M-S-a" , bringMenuConfig windowBringerDmenuConfig)
-- scratchpads
, ("M-b" , namedScratchpadAction (scratchpads host) "browser")
, ("M-d" , namedScratchpadAction (scratchpads host) "documentation")
+ , ("M-t" , namedScratchpadAction (scratchpads host) "thesaurus")
, ("M-m" , namedScratchpadAction (scratchpads host) "messaging") ] ++
-- workspace selection
[ (p ++ [k] , windows $ f i) | (i, k) <- zip Main.workspaces ['1' .. '9']
, (p, f) <- [ ("M-" , S.view)
, ("M-S-" , S.shift) ] ] ++
- [ ("M-s p" , toggleWS' ["NSP"])
+ [ ("C-<Backspace>" , toggleWS' ["NSP"])
-- workspace movement
- , ("M-s j" , moveTo Next nonEmptyWS)
- , ("M-s k" , moveTo Prev nonEmptyWS)
- , ("M-S-s j" , shiftTo Next nonEmptyWS >> moveTo Next nonEmptyWS)
- , ("M-S-s k" , shiftTo Prev nonEmptyWS >> moveTo Prev nonEmptyWS)
+ , ("C-j" , moveTo Next nonEmptyWS)
+ , ("C-k" , moveTo Prev nonEmptyWS)
+ , ("C-S-j" , shiftTo Next nonEmptyWS >> moveTo Next nonEmptyWS)
+ , ("C-S-k" , shiftTo Prev nonEmptyWS >> moveTo Prev nonEmptyWS)
-- workspace layout management
, ("M-v" , layoutMenu)
, ("M-s l" , sendMessage NextLayout)
@@ -196,7 +203,9 @@ commonKeybindings host =
, ("M-c s" , spawn "systemctl suspend")
, ("M-c h" , spawn "systemctl hibernate") ]
-customKeybindings host = concatMap ($ host) [commonKeybindings, hostSpecificKeybindings]
+customKeybindings host = unionBy (\(keyA,_) (keyB,_) -> keyA == keyB)
+ (hostSpecificKeybindings host)
+ (commonKeybindings host)
customMousebindings (XConfig {XMonad.modMask = modMask}) = fromList
[ ((modMask .|. shiftMask, button1), \w -> focus w >> mouseMoveWindow w)
@@ -226,9 +235,10 @@ customLogHook = do
main = do
host <- fmap nodeName getSystemID
xmonad $ ewmh
+ $ docks
$ def
{ modMask = mod4Mask -- super key as modifier
- , borderWidth = 3
+ , borderWidth = borderWidthOn host
, normalBorderColor = "#161616"
, focusedBorderColor = "#909636"
, keys = \c -> mkKeymap c (customKeybindings host)
@@ -311,3 +321,13 @@ screenHeightOn host = case host of
"majestix" -> 1050
"asterix" -> 768
"athena" -> 1440
+borderWidthOn host = case host of
+ "obelix" -> 3
+ "majestix" -> 3
+ "asterix" -> 3
+ "athena" -> 6
+decoHeightOn host = case host of
+ "obelix" -> 20
+ "majestix" -> 20
+ "asterix" -> 20
+ "athena" -> 30
diff --git a/gui/gtk.nix b/gui/gtk.nix
index bd1465a..4c59a7f 100644
--- a/gui/gtk.nix
+++ b/gui/gtk.nix
@@ -31,6 +31,7 @@ in {
wm_border_focus = "909636";
wm_border_unfocus = "909636";
gtk3_generate_dark = false;
+ gtk2_hidpi = false;
};
};
diff --git a/gui/hidpi.nix b/gui/hidpi.nix
new file mode 100644
index 0000000..5ea63c2
--- /dev/null
+++ b/gui/hidpi.nix
@@ -0,0 +1,28 @@
+{ pkgs, ... }:
+
+{
+ home.sessionVariables = {
+ GDK_SCALE = "2";
+ GDK_DPI_SCALE = "0.5";
+ };
+
+ xresources.extraConfig = ''
+ Xft.dpi: 160
+ Xft.autohint: 0
+ Xft.lcdfilter: lcddefault
+ Xft.hintstyle: hintfull
+ Xft.hinting: 1
+ Xft.antialias: 1
+ Xft.rgba: rgb
+ '';
+
+ home.file.".config/twmn/twmn.conf".text = ''
+ [gui]
+ font_size=24
+ height=32
+ '';
+
+ programs.rofi.extraConfig = ''
+ rofi.dpi: 160
+ '';
+}
diff --git a/gui/kitty.nix b/gui/kitty.nix
index 9a47dd0..fdd25a3 100644
--- a/gui/kitty.nix
+++ b/gui/kitty.nix
@@ -36,6 +36,10 @@
# white
color7 #F2F2F2
color15 #FFFFFF
+
+ map ctrl+shift+plus change_font_size all +1.0
+ map ctrl+shift+minus change_font_size all -1.0
+ map ctrl+shift+0 change_font_size all 0
'';
};
}
diff --git a/gui/networkmanager.nix b/gui/networkmanager.nix
index daf3977..595bf48 100644
--- a/gui/networkmanager.nix
+++ b/gui/networkmanager.nix
@@ -6,6 +6,8 @@
networkmanagerapplet
];
+ services.network-manager-applet.enable = true;
+
home.file.".config/networkmanager-dmenu/config.ini".text = ''
[dmenu]
dmenu_command = rofi
diff --git a/gui/redshift.nix b/gui/redshift.nix
new file mode 100644
index 0000000..fabdb89
--- /dev/null
+++ b/gui/redshift.nix
@@ -0,0 +1,10 @@
+{ pkgs, ... }:
+
+{
+ services.redshift = {
+ enable = true;
+ tray = true;
+ latitude = "49.0135248";
+ longitude = "8.40435918703854";
+ };
+}
diff --git a/gui/stalonetray.nix b/gui/stalonetray.nix
new file mode 100644
index 0000000..ca3baaf
--- /dev/null
+++ b/gui/stalonetray.nix
@@ -0,0 +1,20 @@
+{ pkgs, ... }:
+
+{
+ services.stalonetray = {
+ enable = true;
+
+ config = {
+ decorations = "none";
+ icon_size = 48;
+ geometry = "5x1+10-10";
+ transparent = false;
+ grow_gravity = "E";
+ background = "#000000";
+ dockapp_mode = "none";
+ window_layer = "bottom";
+ window_strut = "bottom";
+ window_type = "dock";
+ };
+ };
+}
diff --git a/gui/touchegg.nix b/gui/touchegg.nix
new file mode 100644
index 0000000..1455da8
--- /dev/null
+++ b/gui/touchegg.nix
@@ -0,0 +1,22 @@
+{ pkgs, ... }:
+
+{
+ home.file.".config/touchegg/touchegg.conf".source = ./conf/touchegg.conf;
+
+ systemd.user.services.touchegg = {
+ Unit = {
+ Description = "Touchégg multitouch gestures";
+ After = [ "graphical-session-pre.target" ];
+ PartOf = [ "graphical-session.target" ];
+ };
+
+ Install = {
+ WantedBy = [ "graphical-session.target" ];
+ };
+
+ Service = {
+ ExecStart = "${pkgs.touchegg}/bin/touchegg";
+ Restart = "on-failure";
+ };
+ };
+}
diff --git a/gui/twmn.nix b/gui/twmn.nix
index 5d26619..e2dcbcb 100644
--- a/gui/twmn.nix
+++ b/gui/twmn.nix
@@ -30,9 +30,7 @@
background_color=#909737
bounce=true
font=Iosevka
- font_size=15
foreground_color=#111111
- height=20
in_animation=6
in_animation_duration=500
opacity=100
diff --git a/gui/xmonad.nix b/gui/xmonad.nix
index 803cffa..9e8a0a8 100644
--- a/gui/xmonad.nix
+++ b/gui/xmonad.nix
@@ -13,7 +13,6 @@
pointerCursor = {
package = pkgs.vanilla-dmz;
name = "Vanilla-DMZ-AA";
- size = 16;
};
windowManager.xmonad = {
@@ -26,8 +25,6 @@
home.packages = with pkgs; [
# lockscreen
i3lock
- # screenshooter
- xfce4-12.xfce4-screenshooter
];
services.screen-locker = {
@@ -38,4 +35,6 @@
programs.fish.shellAliases = {
mph = "mpv --title hud";
};
+
+ services.flameshot.enable = true;
}
diff --git a/host/asterix.nix b/host/asterix.nix
index ea19353..1830779 100644
--- a/host/asterix.nix
+++ b/host/asterix.nix
@@ -3,6 +3,7 @@
{
imports = [
../gui/default.nix
+ ../gui/lowdpi.nix
../gui/autorandr.nix
../gui/networkmanager.nix
];
diff --git a/host/athena.nix b/host/athena.nix
index 3ed37ab..4e8a824 100644
--- a/host/athena.nix
+++ b/host/athena.nix
@@ -3,21 +3,15 @@
{
imports = [
../gui/default.nix
+ ../gui/hidpi.nix
../gui/networkmanager.nix
+ ../gui/stalonetray.nix
+ ../gui/redshift.nix
+ ../gui/touchegg.nix
];
home.packages = with pkgs; [
acpi
- xorg.xbacklight
+ xorg.xbacklight
];
-
- xresources.extraConfig = ''
- Xft.dpi: 160
- Xft.autohint: 0
- Xft.lcdfilter: lcddefault
- Xft.hintstyle: hintfull
- Xft.hinting: 1
- Xft.antialias: 1
- Xft.rgba: rgb
- '';
}
diff --git a/host/obelix.nix b/host/obelix.nix
index bfd3522..8bbb62a 100644
--- a/host/obelix.nix
+++ b/host/obelix.nix
@@ -3,5 +3,6 @@
{
imports = [
../gui/default.nix
+ ../gui/lowdpi.nix
];
}