This commit is contained in:
Schrottkatze 2023-04-23 22:49:07 +02:00
parent 92f4f9172f
commit 7eab878a0d
2 changed files with 51 additions and 33 deletions

View file

@ -18,6 +18,10 @@ import qualified XMonad.StackSet as W
import qualified Data.Map as M
import XMonad.Layout.Spacing
import XMonad.Layout.Tabbed
import XMonad.Prompt
import XMonad.Prompt.Layout
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
@ -89,7 +93,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
, ((modm, xK_Tab ), layoutPrompt def)
-- Move focus
, ((modm, xK_j ), windows W.focusDown)
@ -173,8 +177,19 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
--
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
--
myLayout = tiled ||| Mirror tiled ||| Full
tabCfg = def
{ activeColor = "#282828"
, inactiveColor = "#1d2021"
, urgentColor = "#9d0006"
, activeBorderColor = "#504945"
, inactiveBorderColor = "#3c3836"
, urgentBorderColor = "#cc241d"
, activeTextColor = "#ebdbb2"
, inactiveTextColor = "#bdae93"
, urgentTextColor = "#ebdbb2"
}
myLayout = tiled ||| tabbed shrinkText tabCfg ||| Mirror tiled
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio

View file

@ -1,35 +1,38 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "desktopctl" ''
case $@ in
"Lock Screen")
nohup sh -c "i3lock-fancy" > /dev/null &
exit 0
;;
"Log Out")
pkill xmonad
exit 0
;;
"Shut Down")
shutdown now
exit 0
;;
"Reboot")
systemctl reboot
exit 0
;;
esac
run() {
case $@ in
"Lock Screen")
nohup sh -c "i3lock-fancy" > /dev/null &
exit 0
;;
"Log Out")
pkill xmonad
exit 0
;;
"Shut Down")
shutdown now
exit 0
;;
"Reboot")
systemctl reboot
exit 0
;;
esac
# resizes grid
echo -en "\0theme\x1flistview,inputbar,message{columns:4;lines:1;}\n"
# resizes window, moves it to top of screen, adjusts rounded corners
echo -en "\0theme\x1fwindow{width:800px;location:north;y-offset:24px;border-radius:0 0 12px 12px;}\n"
# swaps grid and input bar
echo -en "\0theme\x1fmainbox{children:[listview,inputbar];}\n"
# fixes brown line below input bar
echo -en "\0theme\x1finputbar{margin:0;}\n"
# resizes grid
echo -en "\0theme\x1flistview,inputbar,message{columns:4;lines:1;}\n"
# resizes window, moves it to top of screen, adjusts rounded corners
echo -en "\0theme\x1fwindow{width:800px;location:north;y-offset:24px;border-radius:0 0 12px 12px;}\n"
# swaps grid and input bar
echo -en "\0theme\x1fmainbox{children:[listview,inputbar];}\n"
# fixes brown line below input bar
echo -en "\0theme\x1finputbar{margin:0;}\n"
echo -en "Lock Screen\0icon\x1f${../../../other/assets/desktopctl/lock-screen.svg}\n"
echo -en "Log Out\0icon\x1f${../../../other/assets/desktopctl/logout.svg}\n"
echo -en "Shut Down\0icon\x1f${../../../other/assets/desktopctl/shutdown.svg}\n"
echo -en "Reboot\0icon\x1f${../../../other/assets/desktopctl/reboot.svg}\n"
echo -en "Lock Screen\0icon\x1f${../../../other/assets/desktopctl/lock-screen.svg}\n"
echo -en "Log Out\0icon\x1f${../../../other/assets/desktopctl/logout.svg}\n"
echo -en "Shut Down\0icon\x1f${../../../other/assets/desktopctl/shutdown.svg}\n"
echo -en "Reboot\0icon\x1f${../../../other/assets/desktopctl/reboot.svg}\n"
}
rofi -show "desktopctl" -modes "desktopctl:run"
''