about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-26 17:32:09 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-26 17:32:09 +0200
commit38002f0b63035aa0ef2d2583ea41c564506880b2 (patch)
tree2a5aa90f2315f3cad2c5dbf4215b8f7433206057
parentAdd automatically updating prebuilt nix-index and comma (diff)
downloadnixos-config-38002f0b63035aa0ef2d2583ea41c564506880b2.tar.gz
nixos-config-38002f0b63035aa0ef2d2583ea41c564506880b2.tar.bz2
nixos-config-38002f0b63035aa0ef2d2583ea41c564506880b2.zip
Separate sxhkd config and add host-specific config
-rw-r--r--dotfiles/sxhkd/base15
-rw-r--r--dotfiles/sxhkd/dwm60
-rw-r--r--dotfiles/sxhkd/sxhkdrc177
-rw-r--r--hosts/home.nix1
-rw-r--r--hosts/luna/home.nix76
-rw-r--r--hosts/phobos/home.nix110
-rw-r--r--hosts/vm/home.nix111
7 files changed, 340 insertions, 210 deletions
diff --git a/dotfiles/sxhkd/base b/dotfiles/sxhkd/base
new file mode 100644
index 0000000..0a2b681
--- /dev/null
+++ b/dotfiles/sxhkd/base
@@ -0,0 +1,15 @@
+# terminal emulator
+alt + Return
+	st -e zsh
+
+# program launcher
+alt + d
+	dmenu_run -i
+
+# exit menu
+alt + shift + e
+	bash ~/.scripts/exit
+
+# clipboard
+alt + c
+  clipmenu
\ No newline at end of file
diff --git a/dotfiles/sxhkd/dwm b/dotfiles/sxhkd/dwm
new file mode 100644
index 0000000..1ff1258
--- /dev/null
+++ b/dotfiles/sxhkd/dwm
@@ -0,0 +1,60 @@
+##################################
+#
+##### DWM #####
+##################################
+
+alt + shift + q
+    dwmc quit
+
+alt + q
+    dwmc killclient
+
+alt + {1-9}
+    dwmc viewex {1-9}
+
+alt + shift + {1-9}
+    dwmc tagex {1-9}
+
+alt + Tab
+   dwmc view
+
+alt + 0
+    dwmc viewall
+
+alt + shift + 0
+    dwmc tagall
+
+#move clockwise & anticlockwise
+alt + k
+    dwmc focusstack 1
+alt + j
+    dwmc focusstack -1
+
+#move windows clockwise and anticlockwsie
+alt + shift + k
+    dwmc movestack 1
+alt + shift + j
+    dwmc movestack -1
+
+#cycle layout clockwise and anticlockwise
+alt + ctrl + period
+    dwmc cyclelayout 1
+alt + space
+    dwmc cyclelayout 1
+alt + ctrl + comma
+    dwmc cyclelayout -1
+
+
+alt + f
+    dwmc togglefullscreen
+alt + F11
+    dwmc togglefullscreen
+
+alt + shift + space
+    dwmc togglefloating
+
+alt + b
+    dwmc togglebar
+
+##################################
+##################################
\ No newline at end of file
diff --git a/dotfiles/sxhkd/sxhkdrc b/dotfiles/sxhkd/sxhkdrc
deleted file mode 100644
index ee5d56a..0000000
--- a/dotfiles/sxhkd/sxhkdrc
+++ /dev/null
@@ -1,177 +0,0 @@
-##################################
-#
-##### DWM #####
-##################################
-
-alt + shift + q
-    dwmc quit
-
-alt + q
-    dwmc killclient
-
-alt + {1-9}
-    dwmc viewex {1-9}
-
-alt + shift + {1-9}
-    dwmc tagex {1-9}
-
-alt + Tab
-   dwmc view
-
-alt + 0
-    dwmc viewall
-
-alt + shift + 0
-    dwmc tagall
-
-
-#move clockwise & anticlockwise
-alt + k
-    dwmc focusstack 1
-alt + j
-    dwmc focusstack -1
-
-#move windows clockwise and anticlockwsie
-alt + shift + k
-    dwmc movestack 1
-alt + shift + j
-    dwmc movestack -1
-
-#cycle layout clockwise and anticlockwise
-alt + ctrl + period
-    dwmc cyclelayout 1
-alt + space
-    dwmc cyclelayout 1
-alt + ctrl + comma
-    dwmc cyclelayout -1
-
-
-alt + f
-    dwmc togglefullscreen
-alt + F11
-    dwmc togglefullscreen
-
-alt + shift + space
-    dwmc togglefloating
-
-alt + b
-    dwmc togglebar
-
-##################################
-##################################
-
-
-#enter and leave game mode
-alt + shift + F11: ctrl + shift + F11 
-    pkill -ALRM sxhkd
-
-# Make sxhkd reload its configuration files
-alt + Escape
-	pkill -USR1 -x sxhkd
-
-#Screenshot
-alt + grave
-        bash ~/.scripts/screenshot
-
-####################
-##### PROGRAMS #####
-####################
-
-# terminal emulator
-alt + Return
-	st -e zsh
-
-# program launcher
-alt + d
-	dmenu_run -i
-
-# exit menu
-alt + shift + e
-	bash ~/.scripts/exit
-
-# video play menu
-alt + y
-	bash ~/.scripts/videos
-
-# lock session
-alt + shift + x
-	bash ~/.scripts/i3lock.sh
-
-# file viewer
-alt + p
-  st -e bash ~/.config/vifm/scripts/vifmrun
-
-# browser
-alt + w
-	surf -p https://searx.be
-
-# email client
-alt + m
-  st -e neomutt
-
-# music player
-alt + n
-	st -e ncmpcpp
-
-# calendar player
-alt + u
-	st -e calcurse
-
-# program launcher
-alt + c
-  clipmenu
-
-
-##################
-##### VOLUME #####
-##################
-
-# Raise volume
-XF86AudioRaiseVolume
-  amixer sset Master 5%+
-	#pactl set-sink-volume 0 +5%
-
-# Lower volume
-XF86AudioLowerVolume
-  amixer sset Master 5%-
-	#pactl set-sink-volume 0 -5%
-
-# Mute audio
-# note: mute always sets audio off (toggle)
-XF86AudioMute
-  amixer sset Master toggle
-	#pactl set-sink-mute 0 toggle
-
-
-######################
-##### BRIGHTNESS #####
-######################
-
-XF86MonBrightnessUp
-  light -A 5
-
-XF86MonBrightnessDown
-  light -U 5
-
-######################
-######## MEDIA #######
-######################
-
-XF86AudioPlay
-  playerctl play
-
-XF86AudioPause
-  playerctl pause
-
-XF86AudioNext
-  playerctl next
-
-XF86AudioPrev
-  playerctl previous
-
-######################
-######## OTHER #######
-######################
-
-XF86TouchpadToggle
-	exec ~/.config/i3/scripts/toggletouchpad.sh
diff --git a/hosts/home.nix b/hosts/home.nix
index 4437f48..b63afb9 100644
--- a/hosts/home.nix
+++ b/hosts/home.nix
@@ -159,7 +159,6 @@ in
 
   xdg = {
     configFile."zathura/zathurarc".source = dotfiles + "/zathurarc";
-    configFile."sxhkd/".source = dotfiles + "/sxhkd/";
     configFile."dunst/dunstrc".source = dotfiles + "/dunstrc";
   };
 
diff --git a/hosts/luna/home.nix b/hosts/luna/home.nix
index 43aecfd..1523495 100644
--- a/hosts/luna/home.nix
+++ b/hosts/luna/home.nix
@@ -1,4 +1,7 @@
 { config, lib, pkgs, inputs, user, hostname, secrets, ... }:
+let
+  dotfiles = ../../dotfiles;
+in
 {
   home.packages = with pkgs; [
     #minecraft
@@ -42,6 +45,79 @@
       LEFT_PADDING=" "
     '';
 
+    "sxhkd/sxhkdrc".text =
+      builtins.readFile (dotfiles + "/sxhkd/dwm") +
+      builtins.readFile (dotfiles + "/sxhkd/base") +
+      ''
+            #enter and leave game mode
+        alt + shift + F11: ctrl + shift + F11 
+            pkill -ALRM sxhkd
+
+        # Make sxhkd reload its configuration files
+        alt + Escape
+        	pkill -USR1 -x sxhkd
+
+        #Screenshot
+        alt + grave
+                bash ~/.scripts/screenshot
+
+
+        ##################
+        ##### VOLUME #####
+        ##################
+
+        # Raise volume
+        XF86AudioRaiseVolume
+          amixer sset Master 5%+
+        	#pactl set-sink-volume 0 +5%
+
+        # Lower volume
+        XF86AudioLowerVolume
+          amixer sset Master 5%-
+        	#pactl set-sink-volume 0 -5%
+
+        # Mute audio
+        # note: mute always sets audio off (toggle)
+        XF86AudioMute
+          amixer sset Master toggle
+        	#pactl set-sink-mute 0 toggle
+
+
+        ######################
+        ##### BRIGHTNESS #####
+        ######################
+
+        XF86MonBrightnessUp
+          light -A 5
+
+        XF86MonBrightnessDown
+          light -U 5
+
+        ######################
+        ######## MEDIA #######
+        ######################
+
+        XF86AudioPlay
+          playerctl play
+
+        XF86AudioPause
+          playerctl pause
+
+        XF86AudioNext
+          playerctl next
+
+        XF86AudioPrev
+          playerctl previous
+
+        ######################
+        ######## OTHER #######
+        ######################
+
+        XF86TouchpadToggle
+        	exec ~/.config/i3/scripts/toggletouchpad.sh
+
+      '';
+
     "mpv/mpv.conf".text = ''
       ytdl-format=bestvideo[height<=?720][fps<=?60][vcodec!=?vp9]+bestaudio/best
       hwdec
diff --git a/hosts/phobos/home.nix b/hosts/phobos/home.nix
index b56be45..3e666ef 100644
--- a/hosts/phobos/home.nix
+++ b/hosts/phobos/home.nix
@@ -1,4 +1,7 @@
 { config, lib, pkgs, inputs, user, hostname, secrets, ... }:
+let
+  dotfiles = ../../dotfiles;
+in
 {
   home.packages = with pkgs; [
     minecraft
@@ -12,28 +15,103 @@
     kcc
   ];
 
-  xdg.configFile."dwmbar/config".text = ''
-    #!/bin/sh
+  xdg.configFile = {
+    "dwmbar/config".text = ''
+      #!/bin/sh
 
-    # What modules, in what order
-    MODULES="weather wifi internet volume ram_perc cpuload cputemp battery date time"
+      # What modules, in what order
+      MODULES="weather wifi internet volume ram_perc cpuload cputemp battery date time"
 
-    # Modules that require an active internet connection
-    ONLINE_MODULES="weather internet"
+      # Modules that require an active internet connection
+      ONLINE_MODULES="weather internet"
 
-    # Delay between showing the status bar
-    DELAY="0.05"
+      # Delay between showing the status bar
+      DELAY="0.05"
 
-    # Where the custom modules are stored
-    CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/"
+      # Where the custom modules are stored
+      CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/"
 
-    # Separator between modules
-    SEPARATOR=" | "
+      # Separator between modules
+      SEPARATOR=" | "
 
-    # Padding at the end and beggining of the status bar
-    RIGHT_PADDING=" "
-    LEFT_PADDING=" "
-  '';
+      # Padding at the end and beggining of the status bar
+      RIGHT_PADDING=" "
+      LEFT_PADDING=" "
+    '';
+
+    "sxhkd/sxhkdrc".text =
+      builtins.readFile (dotfiles + "/sxhkd/dwm") +
+      builtins.readFile (dotfiles + "/sxhkd/base") +
+      ''
+            #enter and leave game mode
+        alt + shift + F11: ctrl + shift + F11 
+            pkill -ALRM sxhkd
+
+        # Make sxhkd reload its configuration files
+        alt + Escape
+        	pkill -USR1 -x sxhkd
+
+        #Screenshot
+        alt + grave
+                bash ~/.scripts/screenshot
+
+
+        ##################
+        ##### VOLUME #####
+        ##################
+
+        # Raise volume
+        XF86AudioRaiseVolume
+          amixer sset Master 5%+
+        	#pactl set-sink-volume 0 +5%
+
+        # Lower volume
+        XF86AudioLowerVolume
+          amixer sset Master 5%-
+        	#pactl set-sink-volume 0 -5%
+
+        # Mute audio
+        # note: mute always sets audio off (toggle)
+        XF86AudioMute
+          amixer sset Master toggle
+        	#pactl set-sink-mute 0 toggle
+
+
+        ######################
+        ##### BRIGHTNESS #####
+        ######################
+
+        XF86MonBrightnessUp
+          light -A 5
+
+        XF86MonBrightnessDown
+          light -U 5
+
+        ######################
+        ######## MEDIA #######
+        ######################
+
+        XF86AudioPlay
+          playerctl play
+
+        XF86AudioPause
+          playerctl pause
+
+        XF86AudioNext
+          playerctl next
+
+        XF86AudioPrev
+          playerctl previous
+
+        ######################
+        ######## OTHER #######
+        ######################
+
+        XF86TouchpadToggle
+        	exec ~/.config/i3/scripts/toggletouchpad.sh
+
+      '';
+  };
 
   home.file.".cache/nix-index/files".source = inputs.nix-index.legacyPackages.x86_64-linux.database;
 }
diff --git a/hosts/vm/home.nix b/hosts/vm/home.nix
index 8686c6a..13fa378 100644
--- a/hosts/vm/home.nix
+++ b/hosts/vm/home.nix
@@ -1,30 +1,109 @@
 { config, lib, pkgs, inputs, user, hostname, secrets, ... }:
+let
+  dotfiles = ../../dotfiles;
+in
 {
   home.packages = with pkgs; [
     #jetbrains.idea-community
     #qtcreator
   ];
 
-  xdg.configFile."dwmbar/config".text = ''
-    #!/bin/sh
+  xdg.configFile = {
+    "dwmbar/config".text = ''
+      #!/bin/sh
 
-    # What modules, in what order
-    MODULES="weather wifi internet volume ram_perc cpuload cputemp date time"
+      # What modules, in what order
+      MODULES="weather internet volume ram_perc cpuload date time"
 
-    # Modules that require an active internet connection
-    ONLINE_MODULES="weather internet"
+      # Modules that require an active internet connection
+      ONLINE_MODULES="weather internet"
 
-    # Delay between showing the status bar
-    DELAY="0.05"
+      # Delay between showing the status bar
+      DELAY="0.05"
 
-    # Where the custom modules are stored
-    CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/"
+      # Where the custom modules are stored
+      CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/"
 
-    # Separator between modules
-    SEPARATOR=" | "
+      # Separator between modules
+      SEPARATOR=" | "
+
+      # Padding at the end and beggining of the status bar
+      RIGHT_PADDING=" "
+      LEFT_PADDING=" "
+    '';
+
+    "sxhkd/sxhkdrc".text =
+      builtins.readFile (dotfiles + "/sxhkd/dwm") +
+      builtins.readFile (dotfiles + "/sxhkd/base") +
+      ''
+            #enter and leave game mode
+        alt + shift + F11: ctrl + shift + F11 
+            pkill -ALRM sxhkd
+
+        # Make sxhkd reload its configuration files
+        alt + Escape
+        	pkill -USR1 -x sxhkd
+
+        #Screenshot
+        alt + grave
+                bash ~/.scripts/screenshot
+
+
+        ##################
+        ##### VOLUME #####
+        ##################
+
+        # Raise volume
+        XF86AudioRaiseVolume
+          amixer sset Master 5%+
+        	#pactl set-sink-volume 0 +5%
+
+        # Lower volume
+        XF86AudioLowerVolume
+          amixer sset Master 5%-
+        	#pactl set-sink-volume 0 -5%
+
+        # Mute audio
+        # note: mute always sets audio off (toggle)
+        XF86AudioMute
+          amixer sset Master toggle
+        	#pactl set-sink-mute 0 toggle
+
+
+        ######################
+        ##### BRIGHTNESS #####
+        ######################
+
+        XF86MonBrightnessUp
+          light -A 5
+
+        XF86MonBrightnessDown
+          light -U 5
+
+        ######################
+        ######## MEDIA #######
+        ######################
+
+        XF86AudioPlay
+          playerctl play
+
+        XF86AudioPause
+          playerctl pause
+
+        XF86AudioNext
+          playerctl next
+
+        XF86AudioPrev
+          playerctl previous
+
+        ######################
+        ######## OTHER #######
+        ######################
+
+        XF86TouchpadToggle
+        	exec ~/.config/i3/scripts/toggletouchpad.sh
+
+      '';
+  };
 
-    # Padding at the end and beggining of the status bar
-    RIGHT_PADDING=" "
-    LEFT_PADDING=" "
-  '';
 }