Compare commits
4
Commits
43758f2c0e
...
3e5824a590
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e5824a590
|
||
|
|
b10970bf36
|
||
|
|
12ba85b83b
|
||
|
|
3ff5c20cb5
|
No files matched your search
@@ -168,8 +168,8 @@ SRCEXT='.src.tar.gz'
|
|||||||
export CCACHE_DIR=/home/fuxino/.cache/ccache
|
export CCACHE_DIR=/home/fuxino/.cache/ccache
|
||||||
|
|
||||||
# clang + lld + ThinLTO, only when aurb prepends AURB_CLANG=1 (its default; `aurb --gcc` doesn't).
|
# clang + lld + ThinLTO, only when aurb prepends AURB_CLANG=1 (its default; `aurb --gcc` doesn't).
|
||||||
# update-kernel uses this file as is, so the kernels stay on gcc. Linker flags live in clang.cfg
|
# update-kernel uses this file as is; the kernels' toolchain is set only by their PKGBUILDs (LLVM=1).
|
||||||
# (lld + ThinLTO cache); aurb bind-mounts its dir and the ThinLTO cache dir.
|
# Linker flags live in clang.cfg (lld + ThinLTO cache); aurb bind-mounts its dir and the ThinLTO cache dir.
|
||||||
if [[ -n ${AURB_CLANG-} ]]; then
|
if [[ -n ${AURB_CLANG-} ]]; then
|
||||||
export CC="clang --config=/home/fuxino/.config/aurb/clang.cfg"
|
export CC="clang --config=/home/fuxino/.config/aurb/clang.cfg"
|
||||||
export CXX="clang++ --config=/home/fuxino/.config/aurb/clang.cfg"
|
export CXX="clang++ --config=/home/fuxino/.config/aurb/clang.cfg"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import Data.Monoid
|
|||||||
import Graphics.X11.ExtraTypes.XF86
|
import Graphics.X11.ExtraTypes.XF86
|
||||||
import Control.Monad (forM_, liftM2, when)
|
import Control.Monad (forM_, liftM2, when)
|
||||||
import XMonad
|
import XMonad
|
||||||
|
import XMonad.Actions.OnScreen (greedyViewOnScreen)
|
||||||
import XMonad.Actions.PhysicalScreens
|
import XMonad.Actions.PhysicalScreens
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
@@ -34,10 +35,10 @@ main :: IO ()
|
|||||||
main =
|
main =
|
||||||
xmonad
|
xmonad
|
||||||
. ewmhFullscreen
|
. ewmhFullscreen
|
||||||
. setEwmhSwitchDesktopHook W.greedyView
|
. setEwmhSwitchDesktopHook safeView
|
||||||
. ewmh
|
. ewmh
|
||||||
. docks
|
. docks
|
||||||
. addAfterRescreenHook restartStatusBars
|
. rescreenHook def {afterRescreenHook = restartStatusBars, rescreenWorkspacesHook = Last (Just safeRescreen)}
|
||||||
. addRandrChangeHook (spawn myScreenHotplug)
|
. addRandrChangeHook (spawn myScreenHotplug)
|
||||||
$ myConfig
|
$ myConfig
|
||||||
|
|
||||||
@@ -145,6 +146,32 @@ myConfig =
|
|||||||
| (key, sc) <- zip [xK_w, xK_e] [0 ..],
|
| (key, sc) <- zip [xK_w, xK_e] [0 ..],
|
||||||
(f, mask) <- [(viewScreen def, 0), (sendToScreen def, shiftMask)]
|
(f, mask) <- [(viewScreen def, 0), (sendToScreen def, shiftMask)]
|
||||||
]
|
]
|
||||||
|
++ [((myModMask, key), windows $ safeView ws) | (ws, key) <- zip myWorkspaces [xK_1 .. xK_9]]
|
||||||
|
|
||||||
|
-- greedyView that keeps wsGames on screen 0 (HDMI): Wine games lose the mouse when moved between screens
|
||||||
|
safeView :: WorkspaceId -> WindowSet -> WindowSet
|
||||||
|
safeView i ws
|
||||||
|
| i == wsGames = greedyViewOnScreen 0 i ws
|
||||||
|
| W.currentTag ws == wsGames && i `elem` map (W.tag . W.workspace) (W.visible ws) = W.view i ws
|
||||||
|
| otherwise = W.greedyView i ws
|
||||||
|
|
||||||
|
-- xmonad's rescreen, except that a hidden wsGames is never put on a secondary screen
|
||||||
|
safeRescreen :: X ()
|
||||||
|
safeRescreen = do
|
||||||
|
screens <- withDisplay getCleanedScreenInfo
|
||||||
|
case screens of
|
||||||
|
[] -> return ()
|
||||||
|
xinesc : xinescs ->
|
||||||
|
windows $ \ws ->
|
||||||
|
let notGames = (/= wsGames) . W.tag
|
||||||
|
pool = map W.workspace (W.visible ws) ++ filter notGames (W.hidden ws)
|
||||||
|
(xs, _) = splitAt (length xinescs) pool
|
||||||
|
shown = map W.tag (W.workspace (W.current ws) : xs)
|
||||||
|
in ws
|
||||||
|
{ W.current = W.Screen (W.workspace (W.current ws)) 0 (SD xinesc),
|
||||||
|
W.visible = zipWith3 W.Screen xs [1 ..] (map SD xinescs),
|
||||||
|
W.hidden = filter ((`notElem` shown) . W.tag) (map W.workspace (W.visible ws) ++ W.hidden ws)
|
||||||
|
}
|
||||||
|
|
||||||
-- Workspaces
|
-- Workspaces
|
||||||
myWorkspaces :: [String]
|
myWorkspaces :: [String]
|
||||||
@@ -233,8 +260,10 @@ myStartupHook = do
|
|||||||
spawnOnce myScreenSetup
|
spawnOnce myScreenSetup
|
||||||
spawnOnce "systemctl --user start fehbg.timer"
|
spawnOnce "systemctl --user start fehbg.timer"
|
||||||
spawnOnce "xsetroot -cursor_name left_ptr"
|
spawnOnce "xsetroot -cursor_name left_ptr"
|
||||||
spawnOnce "xautolock -time 10 -locker slock -detectsleep"
|
spawnOnce "xset s 590 10"
|
||||||
spawnOnce "systemctl --user start xautolock-inhibit"
|
spawnOnce "xset dpms 0 0 900"
|
||||||
|
spawnOnce "xss-lock -n xidle-dim -l -- screen-lock"
|
||||||
|
spawnOnce "systemctl --user start xidle-inhibit"
|
||||||
spawnOnce "redshift-gtk"
|
spawnOnce "redshift-gtk"
|
||||||
spawnOnce "systemctl --user start udiskie"
|
spawnOnce "systemctl --user start udiskie"
|
||||||
spawnOnce "nm-applet"
|
spawnOnce "nm-applet"
|
||||||
@@ -289,7 +318,7 @@ myManageHook =
|
|||||||
isFullscreen --> doFullFloat
|
isFullscreen --> doFullFloat
|
||||||
]
|
]
|
||||||
<+> namedScratchpadManageHook myScratchpads
|
<+> namedScratchpadManageHook myScratchpads
|
||||||
where viewShift = doF . liftM2 (.) W.greedyView W.shift
|
where viewShift = doF . liftM2 (.) safeView W.shift
|
||||||
|
|
||||||
-- Handle event hook
|
-- Handle event hook
|
||||||
myHandleEventHook :: Event -> X All
|
myHandleEventHook :: Event -> X All
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Sets a random wallpaper on each monitor; with --keep, redraws the last ones picked instead.
|
||||||
|
|
||||||
|
cache=${XDG_CACHE_HOME:-$HOME/.cache}/wallpapers
|
||||||
|
|
||||||
|
if [[ $1 != --keep || ! -s $cache ]]; then
|
||||||
|
# One image per connected output, so --keep still has enough after an output was off
|
||||||
|
count=$(xrandr --query | grep -c ' connected')
|
||||||
|
shuf -n "$count" -e ~/.local/share/backgrounds/random/* > "$cache"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mapfile -t walls < "$cache"
|
||||||
|
exec /usr/bin/feh --no-fehbg --bg-fill "${walls[@]}"
|
||||||
+1
-1
@@ -7,7 +7,7 @@ if ! xrandr --query | grep -q '^HDMI-1-0 connected'; then
|
|||||||
exec mpv "$@"
|
exec mpv "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap ~/.local/bin/screen-layout EXIT
|
trap '"$HOME"/.local/bin/screen-layout --keep-wallpaper' EXIT
|
||||||
trap 'exit 130' INT TERM HUP
|
trap 'exit 130' INT TERM HUP
|
||||||
|
|
||||||
xrandr --output eDP-1 --off
|
xrandr --output eDP-1 --off
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Sets up the outputs, wallpaper and trayer for whatever monitors are connected.
|
# Sets up the outputs, wallpaper and trayer for whatever monitors are connected.
|
||||||
# Called by xmonad at startup and on monitor (dis)connect, and by `movie` on exit.
|
# Called by xmonad at startup and on monitor (dis)connect, and by `movie` on exit.
|
||||||
|
# --keep-wallpaper redraws the current wallpaper instead of picking new random ones.
|
||||||
|
|
||||||
if xrandr --query | grep -q '^HDMI-1-0 connected'; then
|
if xrandr --query | grep -q '^HDMI-1-0 connected'; then
|
||||||
xrandr --output HDMI-1-0 --preferred --primary --output eDP-1 --right-of HDMI-1-0 --preferred
|
xrandr --output HDMI-1-0 --preferred --primary --output eDP-1 --right-of HDMI-1-0 --preferred
|
||||||
@@ -10,7 +11,11 @@ else
|
|||||||
tray=0
|
tray=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
~/.fehbg
|
if [[ $1 == --keep-wallpaper ]]; then
|
||||||
|
~/.fehbg --keep
|
||||||
|
else
|
||||||
|
~/.fehbg
|
||||||
|
fi
|
||||||
|
|
||||||
# Replace any running trayer, so there's never more than one
|
# Replace any running trayer, so there's never more than one
|
||||||
pkill -x trayer
|
pkill -x trayer
|
||||||
|
|||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# i3lock-color with a background image and the keyboard layout shown.
|
||||||
|
|
||||||
|
image=/usr/share/backgrounds/arch_1920x1080.png
|
||||||
|
|
||||||
|
# -n: stay in the foreground, as xss-lock needs to see when the screen is unlocked.
|
||||||
|
# --indicator keeps the ring (and the layout text) visible before typing.
|
||||||
|
# The layout's default spot (dx:dy+30) falls inside the ring: put it below.
|
||||||
|
exec i3lock -n -i "$image" -F -c 000000ff \
|
||||||
|
-e -f --indicator --keylayout 0 \
|
||||||
|
--layout-pos='ix:iy+r+40' --layout-color=ffffffff \
|
||||||
|
--layout-size=24 \
|
||||||
|
--time-color=ffffffff --date-color=ffffffff --date-str='%A, %d %B' \
|
||||||
|
--ring-color=1793d1ff --line-uses-ring "$@"
|
||||||
Reference in new issue
Block a user