Updated xmonad startup, xmobar syncthing, + networkmanager_dmenu keybind

This commit is contained in:
Emmet 2023-06-19 16:33:46 -05:00
parent bb72f84d13
commit 83d7e41249
6 changed files with 56 additions and 30 deletions

View file

@ -7,30 +7,21 @@ colorSecondary=$4
# #
## Kill previous instances of applications (Prevents multiple instances of the following if XMonad is restarted durin the X session) ## Kill previous instances of applications (Prevents multiple instances of the following if XMonad is restarted durin the X session)
killall xmobar killall xmobar
killall trayer
killall nm-applet killall nm-applet
killall nextcloud
killall xautolock
killall caffeine
killall syncthing-gtk
killall gtkcord4
killall qjoypad
# Launch necessary desktop applications # Launch necessary desktop applications
emacs --daemon & autorandr;
picom --animations --animation-window-mass 1 --animation-for-open-window zoom --animation-stiffness 200 --experimental-backends && # requires picom-pijulius picom --animations --animation-window-mass 1 --animation-for-open-window zoom --animation-stiffness 200 --experimental-backends && # requires picom-pijulius
xset r rate 350 50 & xset r rate 350 50 &
setxkbmap -option caps:escape & setxkbmap -option caps:escape &
~/.fehbg-stylix & ~/.fehbg-stylix &
~/.config/xmobar/xmobar-st-check.sh &
twmnd & twmnd &
alttab -w 1 -t 240x160 -i 64x64 -sc 1 -bg $colorBg -fg $colorFg -frame $colorSecondary -inact $colorFg & alttab -w 1 -t 240x160 -i 64x64 -sc 1 -bg $colorBg -fg $colorFg -frame $colorSecondary -inact $colorFg &
##/usr/bin/trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --transparent true --alpha 0 --height 28 --tint $trayertint --monitor "primary" & ##/usr/bin/trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --transparent true --alpha 0 --height 28 --tint $trayertint --monitor "primary" &
nm-applet & nm-applet &
GOMAXPROCS=1 syncthing --no-browser & GOMAXPROCS=1 syncthing --no-browser &
rclone mount adantium-nextcloud:/ ~/Nextcloud &
syncthing-gtk -m &
protonmail-bridge --noninteractive protonmail-bridge --noninteractive
~/.local/bin/setup-external-monitor.sh & emacs --daemon; rm -rf ~/org &
rm -rf ~/org &
gnome-keyring-daemon --daemonize --login & gnome-keyring-daemon --daemonize --login &
gnome-keyring-daemon --start --components=secrets & gnome-keyring-daemon --start --components=secrets &

View file

@ -0,0 +1,7 @@
#!/bin/sh
while true
do
curl localhost:8384 &> /dev/null || echo '<fc=#{{base08-hex}}>❄ st off</fc>' > ~/.st-status;
curl localhost:8384 &> /dev/null && echo '<fc=#{{base0E-hex}}>↺ st on</fc>' > ~/.st-status;
sleep 5;
done

View file

@ -38,16 +38,18 @@ Config { font = "Inconsolata 16"
] 1 ] 1
, Run DynNetwork , Run DynNetwork
[ "-t", "<fc=#{{base0D-hex}}><fn=1>\xf0200</fn> <dev></fc>"] 1 [ "-t", "<fc=#{{base0D-hex}}><fn=1>\xf0200</fn> <dev></fc>"] 1
, Run Com "cat"
[ "/home/emmet/.st-status"] "syncthing" 10
, Run Com "echo" , Run Com "echo"
[ "<fc=#{{base0E-hex}}><fn=1>\xea77</fn> st</fc>"] "syncthing" 0 [ "<fn=1>\xea77</fn> "] "syncthingsymbol" 0
, Run Com "echo" , Run Com "echo"
[ "<fn=1>\xeb5c</fn> "] "currentthemesymbol" 0 [ "<fn=1>\xeb5c</fn> "] "artsymbol" 0
, Run Com "cat" , Run Com "cat"
[ "/home/emmet/.currenttheme"] "currenttheme" 0 [ "/home/emmet/.currenttheme"] "currenttheme" 0
, Run Memory [ "-t", "<fc=#{{base08-hex}}><fn=1>\xf035b</fn> <usedratio>% (<used> GB)</fc>", "-d", "1", "--", "--scale", "1024"] 20 , Run Memory [ "-t", "<fc=#{{base08-hex}}><fn=1>\xf035b</fn> <usedratio>% (<used> GB)</fc>", "-d", "1", "--", "--scale", "1024"] 20
] ]
, sepChar = "%" , sepChar = "%"
, alignSep = "}{" , alignSep = "}{"
, template = " %battery% %bright%<action=`xdotool key Super_L+y`>%default:Master%</action> %memory% %currentthemesymbol%%currenttheme%}%XMonadLog%{<action=`librewolf localhost:8384`>%syncthing%</action> <action='networkmanager_dmenu'>%dynnetwork%</action> <action=`xdotool key Super_L+c`>%date%</action> " , template = " %battery% %bright%<action=`xdotool key Super_L+y`>%default:Master%</action> %memory% %artsymbol%%currenttheme%}%XMonadLog%{<action=`librewolf localhost:8384`>%syncthing%</action> <action='networkmanager_dmenu'>%dynnetwork%</action> <action=`xdotool key Super_L+c`>%date%</action> "
} }
} }

View file

@ -229,6 +229,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) =
-- launch rofi -- launch rofi
((modm, xK_semicolon), spawn ("rofi -show drun -show-icons")), ((modm, xK_semicolon), spawn ("rofi -show drun -show-icons")),
((modm, xK_p), spawn ("keepmenu")), ((modm, xK_p), spawn ("keepmenu")),
((modm, xK_i), spawn ("networkmanager_dmenu")),
-- close focused window -- close focused window
((modm, xK_q), kill), ((modm, xK_q), kill),

View file

@ -11,6 +11,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
xmobar xmobar
networkmanagerapplet
dunst dunst
pamixer pamixer
autorandr autorandr
@ -49,6 +50,15 @@
extension = ""; extension = "";
}; };
home.file.".config/xmobar/xmobar-st-check.sh" = {
source = config.lib.stylix.colors {
template = builtins.readFile ./xmobar-st-check.sh.mustache;
extension = ".sh";
};
executable = true;
};
services.autorandr.enable = true; services.autorandr.enable = true;
programs.autorandr.enable = true; programs.autorandr.enable = true;
programs.autorandr.profiles = { programs.autorandr.profiles = {

View file

@ -314,6 +314,7 @@ I have =rofi= bound to =S-;= for quick app access.
-- launch rofi -- launch rofi
((modm, xK_semicolon), spawn ("rofi -show drun -show-icons")), ((modm, xK_semicolon), spawn ("rofi -show drun -show-icons")),
((modm, xK_p), spawn ("keepmenu")), ((modm, xK_p), spawn ("keepmenu")),
((modm, xK_i), spawn ("networkmanager_dmenu")),
#+END_SRC #+END_SRC
**** Window Management Keybinds **** Window Management Keybinds
@ -645,35 +646,26 @@ The autostart script kills all applications I am autostarting, which prevents mu
# #
## Kill previous instances of applications (Prevents multiple instances of the following if XMonad is restarted durin the X session) ## Kill previous instances of applications (Prevents multiple instances of the following if XMonad is restarted durin the X session)
killall xmobar killall xmobar
killall trayer
killall nm-applet killall nm-applet
killall nextcloud
killall xautolock
killall caffeine
killall syncthing-gtk
killall gtkcord4
killall qjoypad
#+END_SRC #+END_SRC
Then, desktop applications are started in the background. Then, desktop applications are started in the background.
#+BEGIN_SRC sh :tangle startup.sh :tangle-mode (identity #o755) #+BEGIN_SRC sh :tangle startup.sh :tangle-mode (identity #o755)
# Launch necessary desktop applications # Launch necessary desktop applications
emacs --daemon & autorandr;
picom --animations --animation-window-mass 1 --animation-for-open-window zoom --animation-stiffness 200 --experimental-backends && # requires picom-pijulius picom --animations --animation-window-mass 1 --animation-for-open-window zoom --animation-stiffness 200 --experimental-backends && # requires picom-pijulius
xset r rate 350 50 & xset r rate 350 50 &
setxkbmap -option caps:escape & setxkbmap -option caps:escape &
~/.fehbg-stylix & ~/.fehbg-stylix &
~/.config/xmobar/xmobar-st-check.sh &
twmnd & twmnd &
alttab -w 1 -t 240x160 -i 64x64 -sc 1 -bg $colorBg -fg $colorFg -frame $colorSecondary -inact $colorFg & alttab -w 1 -t 240x160 -i 64x64 -sc 1 -bg $colorBg -fg $colorFg -frame $colorSecondary -inact $colorFg &
##/usr/bin/trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --transparent true --alpha 0 --height 28 --tint $trayertint --monitor "primary" & ##/usr/bin/trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --transparent true --alpha 0 --height 28 --tint $trayertint --monitor "primary" &
nm-applet & nm-applet &
GOMAXPROCS=1 syncthing --no-browser & GOMAXPROCS=1 syncthing --no-browser &
rclone mount adantium-nextcloud:/ ~/Nextcloud &
syncthing-gtk -m &
protonmail-bridge --noninteractive protonmail-bridge --noninteractive
~/.local/bin/setup-external-monitor.sh & emacs --daemon; rm -rf ~/org &
rm -rf ~/org &
gnome-keyring-daemon --daemonize --login & gnome-keyring-daemon --daemonize --login &
gnome-keyring-daemon --start --components=secrets & gnome-keyring-daemon --start --components=secrets &
#+END_SRC #+END_SRC
@ -756,21 +748,34 @@ Config { font = "Inconsolata 16"
] 1 ] 1
, Run DynNetwork , Run DynNetwork
[ "-t", "<fc=#{{base0D-hex}}><fn=1>\xf0200</fn> <dev></fc>"] 1 [ "-t", "<fc=#{{base0D-hex}}><fn=1>\xf0200</fn> <dev></fc>"] 1
, Run Com "cat"
[ "/home/emmet/.st-status"] "syncthing" 10
, Run Com "echo" , Run Com "echo"
[ "<fc=#{{base0E-hex}}><fn=1>\xea77</fn> st</fc>"] "syncthing" 0 [ "<fn=1>\xea77</fn> "] "syncthingsymbol" 0
, Run Com "echo" , Run Com "echo"
[ "<fn=1>\xeb5c</fn> "] "currentthemesymbol" 0 [ "<fn=1>\xeb5c</fn> "] "artsymbol" 0
, Run Com "cat" , Run Com "cat"
[ "/home/emmet/.currenttheme"] "currenttheme" 0 [ "/home/emmet/.currenttheme"] "currenttheme" 0
, Run Memory [ "-t", "<fc=#{{base08-hex}}><fn=1>\xf035b</fn> <usedratio>% (<used> GB)</fc>", "-d", "1", "--", "--scale", "1024"] 20 , Run Memory [ "-t", "<fc=#{{base08-hex}}><fn=1>\xf035b</fn> <usedratio>% (<used> GB)</fc>", "-d", "1", "--", "--scale", "1024"] 20
] ]
, sepChar = "%" , sepChar = "%"
, alignSep = "}{" , alignSep = "}{"
, template = " %battery% %bright%<action=`xdotool key Super_L+y`>%default:Master%</action> %memory% %currentthemesymbol%%currenttheme%}%XMonadLog%{<action=`librewolf localhost:8384`>%syncthing%</action> <action='networkmanager_dmenu'>%dynnetwork%</action> <action=`xdotool key Super_L+c`>%date%</action> " , template = " %battery% %bright%<action=`xdotool key Super_L+y`>%default:Master%</action> %memory% %artsymbol%%currenttheme%}%XMonadLog%{<action=`librewolf localhost:8384`>%syncthing%</action> <action='networkmanager_dmenu'>%dynnetwork%</action> <action=`xdotool key Super_L+c`>%date%</action> "
} }
} }
#+END_SRC #+END_SRC
#+BEGIN_SRC shell :tangle xmobar-st-check.sh.mustache
#!/bin/sh
while true
do
curl localhost:8384 &> /dev/null || echo '<fc=#{{base08-hex}}>❄ st off</fc>' > ~/.st-status;
curl localhost:8384 &> /dev/null && echo '<fc=#{{base0E-hex}}>↺ st on</fc>' > ~/.st-status;
sleep 5;
done
#+END_SRC
* Nix Integration * Nix Integration
In order to have Nix put my xmonad/xmobar configuration in the proper places, I have [[./xmonad.nix][xmonad.nix]], which I source in the =imports= block of my [[../../home.nix][home.nix]]. In order to have Nix put my xmonad/xmobar configuration in the proper places, I have [[./xmonad.nix][xmonad.nix]], which I source in the =imports= block of my [[../../home.nix][home.nix]].
#+BEGIN_SRC nix :tangle xmonad.nix #+BEGIN_SRC nix :tangle xmonad.nix
@ -787,6 +792,7 @@ In order to have Nix put my xmonad/xmobar configuration in the proper places, I
home.packages = with pkgs; [ home.packages = with pkgs; [
xmobar xmobar
networkmanagerapplet
dunst dunst
pamixer pamixer
autorandr autorandr
@ -825,6 +831,15 @@ In order to have Nix put my xmonad/xmobar configuration in the proper places, I
extension = ""; extension = "";
}; };
home.file.".config/xmobar/xmobar-st-check.sh" = {
source = config.lib.stylix.colors {
template = builtins.readFile ./xmobar-st-check.sh.mustache;
extension = ".sh";
};
executable = true;
};
services.autorandr.enable = true; services.autorandr.enable = true;
programs.autorandr.enable = true; programs.autorandr.enable = true;
programs.autorandr.profiles = { programs.autorandr.profiles = {