it has been a wile

This commit is contained in:
Zastian Pretorius
2022-04-15 16:35:03 +02:00
parent 0286a1de98
commit 20374593b9
20 changed files with 2824 additions and 1949 deletions

View File

@@ -6,8 +6,8 @@
;; Some functionality uses this to identify you, e.g. GPG configuration, email ;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. ;; clients, file templates and snippets.
(setq user-full-name "John Doe" (setq user-full-name "Zastian Pretorius"
user-mail-address "john@doe.com") user-mail-address "Zastian00@gmail.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here ;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones: ;; are the three important ones:
@@ -33,8 +33,22 @@
;; This determines the style of line numbers in effect. If set to `nil', line ;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'. ;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type t) (setq display-line-numbers-type `relative)
(setq doom-font (font-spec :family "Ubuntu Mono" :size 15)
doom-variable-pitch-font (font-spec :family "Ubuntu Mono" :size 15)
doom-big-font (font-spec :family "Ubuntu Mono" :size 24))
(custom-set-faces
'(org-level-1 ((t (:inherit outline-1 :height 1.4))))
'(org-level-2 ((t (:inherit outline-2 :height 1.3))))
'(org-level-3 ((t (:inherit outline-3 :height 1.2))))
'(org-level-4 ((t (:inherit outline-4 :height 1.1))))
'(org-level-5 ((t (:inherit outline-5 :height 1.0))))
)
(require 'elcord)
(elcord-mode)
;; Here are some additional functions/macros that could help you configure Doom: ;; Here are some additional functions/macros that could help you configure Doom:
;; ;;

View File

@@ -16,7 +16,7 @@
(doom! :input (doom! :input
;;chinese ;;chinese
;;japanese japanese
;;layout ; auie,ctsrnm is the superior home row ;;layout ; auie,ctsrnm is the superior home row
:completion :completion
@@ -35,14 +35,14 @@
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra ;;hydra
indent-guides ; highlighted indent columns indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again ;;(ligatures +hasklig) ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink cursor line after big motions nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim ;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows (popup +defaults) ; tame sudden yet inevitable temporary windows
tabs ; a tab bar for Emacs ;;tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe vc-gutter ; vcs diff in the fringe
@@ -117,13 +117,13 @@
;;common-lisp ; if you've seen one lisp, you've seen them all ;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs ;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c ;;crystal ; ruby at the speed of c
(csharp +lsp) ; unity, .NET, and mono shenanigans (csharp +lsp) ; unity, .NET, and mono shenanigans
;;data ; config/data formats ;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else ;;(dart +flutter) ; paint ui and not much else
;;dhall ;;dhall
;;elixir ; erlang done right ;;elixir ; erlang done right
;;elm ; care for a cup of TEA? ;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age ;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics ;;ess ; emacs speaks statistics
;;factor ;;factor
@@ -132,7 +132,7 @@
;;fstar ; (dependent) types and (monadic) effects and Z3 ;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for ;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect ;;(go +lsp) ; the hipster dialect
(haskell +lsp) ; a language that's lazier than I am (haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python ;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on ;;idris ; a language you can depend on
;;json ; At least it ain't XML ;;json ; At least it ain't XML
@@ -159,7 +159,7 @@
;;rest ; Emacs as a REST client ;;rest ; Emacs as a REST client
;;rst ; ReST in peace ;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good ;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps ;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor sh ; she sells {ba,z,fi}sh shells on the C xor
@@ -170,8 +170,7 @@
;;web ; the tubes ;;web ; the tubes
;;yaml ; JSON, but readable ;;yaml ; JSON, but readable
;;zig ; C, but simpler ;;zig ; C, but simpler
:w:email
:email
;;(mu4e +org +gmail) ;;(mu4e +org +gmail)
;;notmuch ;;notmuch
;;(wanderlust +gmail) ;;(wanderlust +gmail)

View File

@@ -49,3 +49,4 @@
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
(package! rainbow-mode) (package! rainbow-mode)
(package! elcord)

View File

@@ -0,0 +1,19 @@
foreground #f8f8f2
background #282a36
title_fg #f8f8f2
title_bg #282a36
margin_bg #6272a4
margin_fg #44475a
removed_bg #ff5555
highlight_removed_bg #ff5555
removed_margin_bg #ff5555
added_bg #50fa7b
highlight_added_bg #50fa7b
added_margin_bg #50fa7b
filler_bg #44475a
hunk_margin_bg #44475a
hunk_bg #bd93f9
search_bg #8be9fd
search_fg #282a36
select_bg #f1fa8c
select_fg #282a36

View File

@@ -0,0 +1,62 @@
# https://draculatheme.com/kitty
#
# Installation instructions:
#
# cp dracula.conf ~/.config/kitty/
# echo "include dracula.conf" >> ~/.config/kitty/kitty.conf
#
# Then reload kitty for the config to take affect.
# Alternatively copy paste below directly into kitty.conf
foreground #f8f8f2
background #282a36
selection_foreground #ffffff
selection_background #44475a
url_color #8be9fd
# black
color0 #21222c
color8 #6272a4
# red
color1 #ff5555
color9 #ff6e6e
# green
color2 #50fa7b
color10 #69ff94
# yellow
color3 #f1fa8c
color11 #ffffa5
# blue
color4 #bd93f9
color12 #d6acff
# magenta
color5 #ff79c6
color13 #ff92df
# cyan
color6 #8be9fd
color14 #a4ffff
# white
color7 #f8f8f2
color15 #ffffff
# Cursor colors
cursor #f8f8f2
cursor_text_color background
# Tab bar colors
active_tab_foreground #282a36
active_tab_background #f8f8f2
inactive_tab_foreground #282a36
inactive_tab_background #6272a4
# Marks
mark1_foreground #282a36
mark1_background #ff5555

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +1,17 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors] [colors]
background = #95bb93ef background = #282a36
;992299 foreground = #f8f8f2
foreground = #2a2a2a
background-alt = #99444444 background-alt = #99444444
foreground-alt = #2a2a2a foreground-alt = #2a2a2a
primary = #8D2C9E primary = #6e5991
secondary = #A935BD secondary = #363949
alert = #FF0000 alert = #FF0000
[bar/MainWithTray] [bar/MainWithTray]
width = ${env:width} width = ${env:width}
offset-x = ${env:offsetx} offset-x = ${env:offsetx}
monitor = HDMI-A-0 monitor = HDMI-A-0
monitor-fallback =eDP monitor-fallback =eDP
;offset-y = ${env:y}
;width = 100%
height = 27 height = 27
fixed-center = true fixed-center = true
background = ${colors.background} background = ${colors.background}
@@ -46,22 +24,17 @@ padding-left = 0
padding-right = 2 padding-right = 2
module-margin-left = 1 module-margin-left = 1
module-margin-right = 2 module-margin-right = 2
;font-0 = misc fixed:pixelsize=10;1 font-0 = Ubuntu:size=11;2
;font-1 = unifont:fontformat=truetype:size=10:antialias=false;0 font-1 = Iosevka:size=20;3
;font-2 = siji:pixelsize=10;1 font-2 = FontAwesome:style=Regular:pixelsize=11;1
;font-3 = Iosevka:pixelsize=13 font-3 = FontAwesome:style=Solid:pixelsize=11;1
;font-4 = FontAwesome:pixelsize=20;1 font-4 = FontAwesome:pixelsize=11;1
font-0 = "Ubuntu:size=13;2"
font-1 = "Iosevka:size=22;3"
font-2 = "FontAwesome:style=Regular:pixelsize=13;1"
font-3 = "FontAwesome:style=Solid:pixelsize=13;1"
font-4 = "FontAwesome:pixelsize=13;1"
font-5 = siji:pixelsize=10;1 font-5 = siji:pixelsize=10;1
font-6 = Source Han Sans JP:pixelsize=11;1
label-font = label-font =
modules-left = ewmh modules-left = ewmh
modules-center = date modules-center = date
modules-right = filesystem pkgupdates-available pulseaudio light memory cpu battery kdeconnect modules-right = filesystem wlan pkgupdates-available pulseaudio memory cpu battery
tray-position = right tray-position = right
tray-padding = 2 tray-padding = 2
cursor-click = pointer cursor-click = pointer
@@ -71,8 +44,6 @@ cursor-scroll = ns-resize
width = ${env:width} width = ${env:width}
offset-x = ${env:offsetx} offset-x = ${env:offsetx}
monitor = eDP monitor = eDP
;offset-y = ${env:y}
;width = 100%
height = 27 height = 27
fixed-center = true fixed-center = true
background = ${colors.background} background = ${colors.background}
@@ -85,63 +56,42 @@ padding-left = 0
padding-right = 2 padding-right = 2
module-margin-left = 1 module-margin-left = 1
module-margin-right = 2 module-margin-right = 2
;font-0 = misc fixed:pixelsize=10;1 font-0 = Ubuntu:size=11;2
;font-1 = unifont:fontformat=truetype:size=10:antialias=false;0 font-1 = Iosevka:size=20;3
;font-2 = siji:pixelsize=10;1 font-2 = Font Awesome 5 Free:style=Regular:pixelsize=11;1
;font-3 = Iosevka:pixelsize=13 font-3 = Font Awesome 5 Free:style=Solid:pixelsize=11;1
;font-4 = FontAwesome:pixelsize=20;1 font-4 = Font Awesome 5 Brands:pixelsize=11;1
font-0 = "Ubuntu:size=13;2"
font-1 = "Iosevka:size=22;3"
font-2 = "Font Awesome 5 Free:style=Regular:pixelsize=13;1"
font-3 = "Font Awesome 5 Free:style=Solid:pixelsize=13;1"
font-4 = "Font Awesome 5 Brands:pixelsize=13;1"
font-5 = siji:pixelsize=10;1 font-5 = siji:pixelsize=10;1
font-6 = Source Han Sans JP:pixelsize=13;1
label-font = label-font =
modules-left = ewmh modules-left = ewmh
modules-center = date modules-center = date
modules-right = filesystem pulseaudio memory cpu battery modules-right = filesystem wlan pulseaudio memory cpu battery
cursor-click = pointer cursor-click = pointer
cursor-scroll = ns-resize cursor-scroll = ns-resize
[module/xmonad]
type = custom/script
exec = tail -F /tmp/.xmonad-workspace-log
;exec-if = [ -p /tmp/.xmonad-workspace-log ]
tail = true
[module/title-xmonad]
type = custom/script
exec = tail -F /tmp/.xmonad-title-log
;exec-if = [ -p /tmp/.xmonad-title-log ]
tail = true
[module/ewmh] [module/ewmh]
type = internal/xworkspaces type = internal/xworkspaces
pin-workspaces = false pin-workspaces = false
enable-click = true enable-click = true
enable-scroll = false enable-scroll = false
;["", "", "", "", "", "", "", "", ""] icon-0 = 1;一
icon-0 = 1:MAIN;1: icon-1 = 2;二
icon-1 = 2:DEV;2: icon-2 = 3;三
icon-2 = 3:WWW;3: icon-3 = 4;四
icon-3 = 4:TERM;4: icon-4 = 5;五
icon-4 = 5:TEXT;5: icon-5 = 6;六
icon-5 = 6:FOLDER;6: icon-6 = 7;七
icon-6 = 7:SCHOOL;7: icon-7 = 8;八
icon-7 = 8:GAMES;8: icon-8 = 9;九
icon-8 = 9:MUSIC;9:
format = <label-state> format = <label-state>
;label-monitor = %name%
;label-monitor-underline = ${colors.cyan}
label-active = %icon% label-active = %icon%
label-active-foreground = ${colors.green} label-active-foreground = ${colors.green}
label-active-background = #7d16bf label-active-background = #6e5991
label-active-padding = 1 label-active-padding = 1
label-occupied = %icon% label-occupied = %icon%
label-occupied-foreground = ${colors.blue} label-occupied-foreground = ${colors.blue}
label-occupied-background = #9d1cf3 label-occupied-background = #363949
label-occupied-padding = 1 label-occupied-padding = 1
label-urgent = %icon% label-urgent = %icon%
label-urgent-foreground = ${colors.red} label-urgent-foreground = ${colors.red}
@@ -152,213 +102,50 @@ label-empty-foreground = ${colors.fg}
label-empty-underline = ${colors.cyan} label-empty-underline = ${colors.cyan}
label-empty-padding = 1 label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-prefix-underline = ${colors.secondary}
label-layout = %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem] [module/filesystem]
type = internal/fs type = internal/fs
interval = 25 interval = 25
mount-0 = /home mount-0 = /home
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt} label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
; Separator in between workspaces
; label-separator = |
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
;pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
; Separator in between workspaces
; label-separator = |
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 25
label-song-ellipsis = true
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #fff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu] [module/cpu]
type = internal/cpu type = internal/cpu
interval = 2 interval = 2
format-prefix = " " format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #8d2c9e
label = CPU %percentage:2%% label = CPU %percentage:2%%
[module/memory] [module/memory]
type = custom/script type = custom/script
exec = free | grep Mem | awk '{print int($3/$2 * 100.0)}' exec = free | grep Mem | awk '{print int($3/$2 * 100.0)}'
format-prefix = " MEM " format-prefix = " MEM "
format-suffix = "%" format-suffix = "%"
format-foreground = ${colors.foreground-alt} internal = 3
click-left = alacritty -e htop --sort-key=M_RESIDENT click-left = kitty -e btop
tail = true
[module/wlan] [module/wlan]
type = internal/network type = internal/network
interface = wlp2s0 interface = wlan0
interval = 3.0 interval = 3.0
format-connected = <label-connected>
format-connected = <ramp-signal> <label-connected> label-connected = %%signal% %essid%
format-connected-underline = #8d2c9e
label-connected = %essid%
format-disconnected = format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt} ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = enp3s0
interval = 3.0
format-connected-underline = #8d2c9e
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected =
;format-disconnected = <label-disconnected>
;format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname% disconnected
;label-disconnected-foreground = ${colors.foreground-alt}
[module/date] [module/date]
type = internal/date type = internal/date
;date =  %%{F#99}%m/%d/%Y%%{F-} %%{F#99}%I:%M %p%{F-}
;date-alt = %%{F#99}%A, %B %d, %Y %%{F#99}%I:%M %p%{F#99}%%{F#99}%S%%{F-}
;interval = 5
date = %a %d,%b %Y date = %a %d,%b %Y
;date-alt = " %Y-%m-%d"
time = %I:%M %p time = %I:%M %p
;time-alt = %H:%M:%S
;format-prefix = 
;format-prefix-foreground = ${colors.foreground}
;format-underline = #0a6cf5
label = %date% %time% label = %date% %time%
[module/pulseaudio] [module/pulseaudio]
type = internal/pulseaudio type = internal/pulseaudio
format-volume = <label-volume> <bar-volume> format-volume = <label-volume> <bar-volume>
label-volume = VOL %percentage%% label-volume = VOL %percentage%%
label-volume-foreground = ${root.foreground} label-volume-foreground = ${root.foreground}
label-muted =  muted label-muted =  muted
label-muted-foreground = #666 label-muted-foreground = #666
bar-volume-width = 1 bar-volume-width = 1
bar-volume-foreground-0 = #55aa55 bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55 bar-volume-foreground-1 = #55aa55
@@ -376,34 +163,6 @@ bar-volume-empty = ─
bar-volume-empty-font = 2 bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt} bar-volume-empty-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery] [module/battery]
type = internal/battery type = internal/battery
battery = BAT0 battery = BAT0
@@ -411,127 +170,40 @@ adapter = AC
full-at = 98 full-at = 98
label-charging = %percentage%% label-charging = %percentage%%
label-discharging = %percentage%% label-discharging = %percentage%%
format-charging = <animation-charging> <label-charging> format-charging = <animation-charging> <label-charging>
;format-charging-underline = #8d2c9e
format-discharging =<animation-discharging> <label-discharging> format-discharging =<animation-discharging> <label-discharging>
;format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " " format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
;format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 =  ramp-capacity-0 = 
ramp-capacity-1 =  ramp-capacity-1 = 
ramp-capacity-2 =  ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 =  animation-charging-0 = 
animation-charging-1 =  animation-charging-1 = 
animation-charging-2 =  animation-charging-2 = 
animation-charging-3 =  animation-charging-3 = 
animation-charging-4 =  animation-charging-4 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 950 animation-charging-framerate = 950
animation-discharging-0 =  animation-discharging-0 = 
animation-discharging-1 =  animation-discharging-1 = 
animation-discharging-2 =  animation-discharging-2 = 
animation-discharging-3 =  animation-discharging-3 = 
animation-discharging-4 =  animation-discharging-4 = 
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 950 animation-discharging-framerate = 950
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-0-2 = logout
menu-0-2-exec = menu-open-3
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
menu-3-0 = logout
menu-3-0-exec = pkill xmonad
menu-3-1 = cancel
menu-3-1-exec = menu-open-0
[module/kdeconnect] [module/kdeconnect]
type = custom/script type = custom/script
exec = "/home/mrfluffy/.config/script/polybar-kdeconnect.sh -d" exec = "/home/mrfluffy/.config/script/polybar-kdeconnect.sh -d"
tail = true tail = true
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
[module/pkgupdates-available] [module/pkgupdates-available]
type = custom/script type = custom/script
; Available tokens:
; %counter%
; Command to be executed (using "/bin/sh -c [command]")
exec = /home/mrfluffy/.config/script/updateCount.sh exec = /home/mrfluffy/.config/script/updateCount.sh
interval = 3600 interval = 3600
click-left = alacritty -e paru click-left = kitty paru
;[global/wm]
;margin-top = 5
;margin-bottom = 5
; vim:ft=dosini
[module/light] [module/light]
type = custom/script type = custom/script
exec = light -G | awk '{print int($float)}' exec = light -G | awk '{print int($float)}'
interval = 1 interval = 50
format-prefix = " LIGHT " format-prefix = " LIGHT "
scroll-up = light -A 5 scroll-up = light -A 5
scroll-down = light -U 5 scroll-down = light -U 5

Binary file not shown.

View File

@@ -2,4 +2,4 @@
swayidle -w \ swayidle -w \
timeout 900 'sudo systemctl suspend' \ timeout 900 'sudo systemctl suspend' \
before-sleep 'swaylock -i $HOME/Pictures/Wallpapers/15.jpg --ring-color 8218c4 --key-hl-color 3e0c60' before-sleep 'swaylock -i $HOME/Pictures/Wallpapers/015.jpg --ring-color 8218c4 --key-hl-color 3e0c60'

View File

@@ -0,0 +1,361 @@
#+title: XMonad config
#+author: mrfluffy
#+PROPERTY: header-args :tangle xmonad.hs
* imports
This is all the imports needed for this config to work.
#+begin_src haskell
import XMonad
import Data.Monoid
import Data.List (sortBy)
import Data.Function (on)
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
import XMonad.Hooks.WindowSwallowing
import Control.Monad (forM_, join)
import Control.Monad (liftM2)
import System.Exit
import System.IO
import XMonad.Util.SpawnOnce
import XMonad.Util.Scratchpad
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Util.NamedWindows (getName)
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Util.EZConfig
import XMonad.Layout.Spacing
import XMonad.Actions.UpdatePointer
import XMonad.Actions.SwapWorkspaces
import qualified XMonad.StackSet as W
import qualified Data.Map as M
#+end_src
* variables
Setting variables that will be used later in the config.
#+begin_src haskell
myTerminal = "kitty"
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
myClickJustFocuses :: Bool
myClickJustFocuses = False
myBorderWidth = 3
myModMask = mod1Mask
myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
myNormalBorderColor = "#1A1A1A"
myFocusedBorderColor = "#8218c4"
#+end_src
* fullscreen function
Looks to see if focused window is floating and if it is the places it in the stack
else it makes it floating but as full screen
#+begin_src haskell
toggleFull = withFocused (\windowId -> do
{ floats <- gets (W.floating . windowset);
if windowId `M.member` floats
then withFocused $ windows . W.sink
else withFocused $ windows . (flip W.float $ W.RationalRect 0 0 1 1) })
#+end_src
* Keyboard keybindings
Key bindings. Add, modify or remove key bindings here.
#+begin_src haskell
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
[
-- open browser
((modm, xK_b ), spawn "qutebrowser")
-- open calculater
,((modm, xK_c ), spawn "qalculate-gtk")
-- open PcmanFM
, ((modm, xK_f ), spawn "pcmanfm")
-- open kde colour picker
, ((modm, xK_p ), spawn "kcolorchooser")
-- Volume control
, ((0,0x1008ff11), spawn "pamixer --allow-boost -d 5") --Folume down
, ((0,0x1008ff13), spawn "pamixer --allow-boost -i 5") --Folume up
, ((0,0x1008ff12), spawn "pamixer -t") --Mute Toggle
, ((0,0x1008ffb2), spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle") --Mic Toggle
--Brightness control
, ((0,0x1008ff02), spawn "light -A 10") --Brightness Up
, ((0,0x1008ff03), spawn "light -U 10") --Brightness Up
--Media Control
, ((0,0x1008ff14), spawn "playerctl play-pause") -- Play/Pause
, ((0,0x1008ff16), spawn "playerctl previous") -- Play/Pause
, ((0,0x1008ff17), spawn "playerctl next") -- Play/Pause
-- Take screenshot
, ((0,0xff61), spawn "flameshot gui")
-- Lock screen
, ((mod4Mask, xK_l), spawn "betterlockscreen --lock")
, ((mod4Mask, xK_F5), spawn "/home/$USER/.config/script/refreshXmonad.sh")
, ((mod4Mask, xK_F6), spawn "/home/$USER/.config/script/toggelTuchpad.sh")
, ((mod4Mask, xK_F7), spawn "/home/$USER/.config/script/ariplaneMode.sh")
, ((mod4Mask, xK_F10), spawn "arandr")
-- launch a terminal
, ((modm, xK_Return), spawn $ XMonad.terminal conf)
, ((modm, xK_backslash), scratchpadSpawnActionTerminal "kitty --class=scratchpad")
-- launch rofi
, ((modm, xK_d ), spawn "rofi -no-lazy-greb -show drun -icon-theme 'Papirus' -show-icons")
-- launch a scrachpad
, ((modm .|. shiftMask, xK_s ), spawn "kitty --class=scratchpad")
-- close focused window
, ((modm, xK_q ), kill)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((mod4Mask, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm .|. shiftMask, xK_m ), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm .|. controlMask, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm .|. controlMask, xK_l ), sendMessage Expand)
-- toggle between full screen and tieling
, ((modm, xK_t ), toggleFull)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modm .|. shiftMask, xK_r ), spawn "xmonad --recompile; xmonad --restart")
]
++
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_l, xK_h] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
#+end_src
* Mouse bindings
Mouse bindings: default actions bound to mouse events
#+begin_src haskell
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
]
#+end_src
------------------------------------------------------------------------
* Layouts:
You can specify and transform your layouts by modifying these values.
If you change layout bindings be sure to use 'mod-shift-space' after
restarting (with 'mod-q') to reset your layout state to the new
defaults, as xmonad preserves your old layout settings by default.
The available layouts. Note that each layout is separated by |||,
which denotes layout choice.
#+begin_src haskell
myLayout = mySpacing $ avoidStruts ( tiled ||| Mirror tiled ||| noBorders Full ||| spiral (6/7) ||| ThreeCol 1 (3/100) (1/2))
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
#+end_src
* Window spacing (gaps)
sets the spacing of the windows.
#+begin_src haskell
mySpacing = spacingRaw False -- Only for >1 window
-- The bottom edge seems to look narrower than it is
(Border 30 3 3 3) -- Size of screen edge gaps
True -- Enable screen edge gaps
(Border 3 3 3 3) -- Size of window gaps
True -- Enable window gaps
#+end_src
------------------------------------------------------------------------
* Window rules
Execute arbitrary actions and WindowSet manipulations when managing
a new window. You can use this to, for example, always float a
particular program, or have a client always appear on a particular
workspace.
To find the property name associated with a program, use
> xprop | grep WM_CLASS
and click on the client you're interested in.
To match on the WM_NAME, you can use 'title' in the same way that
'className' and 'resource' are used below.
#+begin_src haskell
myManageHook = composeAll
[className =? "Gimp" --> doFloat
, className =? "Qalculate-gtk" --> doFloat
, className =? "Pavucontrol" --> doFloat
, className =? "Minecraft Launcher" --> doShift "8"
, className =? "Microsoft Teams - Preview" --> doShift "7"
, className =? "YouTube Music" --> doShift "9"
, className =? "Thunar" --> viewShift "5"
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore
]
where viewShift = doF . liftM2 (.) W.greedyView W.shift
#+end_src
------------------------------------------------------------------------
* Event handling
EwmhDesktops users should change this to ewmhDesktopsEventHook
Defines a custom handler function for X Events. The function should
return (All True) if the default handler is to be run afterwards. To
combine event hooks use mappend or mconcat from Data.Monoid.
#+begin_src haskell
myEventHook = swallowEventHook (className =? "kitty" <||> className =? "Termite") (return True)
#+end_src
* Log Hooks
Status bars and logging
Perform an arbitrary action on each internal state change or X event.
See the 'XMonad.Hooks.DynamicLog' extension for examples.
#+begin_src haskell
myLogHook = do
winset <- gets windowset
title <- maybe (return "") (fmap show . getName) . W.peek $ winset
let currWs = W.currentTag winset
let wss = map W.tag $ W.workspaces winset
let wsStr = join $ map (fmt currWs) $ sort' wss
io $ appendFile "/tmp/.xmonad-title-log" (title ++ "\n")
io $ appendFile "/tmp/.xmonad-workspace-log" (wsStr ++ "\n")
where fmt currWs ws
| currWs == ws = "[" ++ ws ++ "]"
| otherwise = " " ++ ws ++ " "
sort' = sortBy (compare `on` (!! 0))
#+end_src
* Window swallowing with kitty
#+begin_src haskell
myHandleEventHook = swallowEventHook (className =? "kitty" <||> className =? "Termite") (return True)
#+end_src
* Start up applications
Perform an arbitrary action each time xmonad starts or is restarted
with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
per-workspace layout choices.
By default, do nothing.
#+begin_src haskell
myStartupHook = do
spawnOnce "dunst &"
spawnOnce "pipewire & /usr/bin/pipewire-pulse & /usr/bin/pipewire-media-session &"
spawnOnce "/home/$USER/.config/script/redshift.sh &"
spawnOnce "xss-lock /home/$USER/.config/script/betterlockscreen.sh &"
spawnOnce "nextcloud --background &"
spawnOnce "fcitx -d &"
spawnOnce "copyq --start-server"
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
spawnOnce "nm-applet &"
spawnOnce "picom --backend glx &"
spawnOnce "nitrogen --restore &"
#+end_src
* main (starting xmonad)
Now run xmonad with all the defaults we set up.
Run xmonad with the settings you specify. No need to modify this.
#+begin_src haskell
myPP = def {ppCurrent = xmobarColor "black" "whight"}
mainBar = statusBarPropTo "_XMONAD_LOG_1" "polybar MainWithTray" (pure myPP)
secondBar = statusBarPropTo "_XMONAD_LOG_2" "polybar SeconderyWitNoTray" (pure myPP)
barSpawner :: ScreenId -> IO StatusBarConfig
barSpawner 0 = pure $ mainBar
barSpawner 1 = pure $ secondBar
barSpawner _ = mempty
main = do
xmonad $ docks $ ewmhFullscreen $ ewmh $ dynamicSBs barSpawner def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings ,
-- hooks, layouts
layoutHook = smartBorders $ myLayout,
manageHook = myManageHook <+> scratchpadManageHook (W.RationalRect 0.4 0.3 0.6 0.5),
handleEventHook = myEventHook,
logHook = myLogHook >> updatePointer (0.5, 0.5) (0, 0),
startupHook = myStartupHook -- dynStatusBarStartup barInScreen (return ())
}
forM_ [".xmonad-workspace-log", ".xmonad-title-log"] $ \file -> do
safeSpawn "mkfifo" ["/tmp/" ++ file]
#+end_src

View File

@@ -0,0 +1,276 @@
import XMonad
import Data.Monoid
import Data.List (sortBy)
import Data.Function (on)
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
import XMonad.Hooks.WindowSwallowing
import Control.Monad (forM_, join)
import Control.Monad (liftM2)
import System.Exit
import System.IO
import XMonad.Util.SpawnOnce
import XMonad.Util.Scratchpad
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Util.NamedWindows (getName)
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Util.EZConfig
import XMonad.Layout.Spacing
import XMonad.Actions.UpdatePointer
import XMonad.Actions.SwapWorkspaces
import qualified XMonad.StackSet as W
import qualified Data.Map as M
myTerminal = "kitty"
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
myClickJustFocuses :: Bool
myClickJustFocuses = False
myBorderWidth = 3
myModMask = mod1Mask
myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
myNormalBorderColor = "#1A1A1A"
myFocusedBorderColor = "#8218c4"
toggleFull = withFocused (\windowId -> do
{ floats <- gets (W.floating . windowset);
if windowId `M.member` floats
then withFocused $ windows . W.sink
else withFocused $ windows . (flip W.float $ W.RationalRect 0 0 1 1) })
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
[
-- open browser
((modm, xK_b ), spawn "qutebrowser")
-- open calculater
,((modm, xK_c ), spawn "qalculate-gtk")
-- open PcmanFM
, ((modm, xK_f ), spawn "pcmanfm")
-- open kde colour picker
, ((modm, xK_p ), spawn "kcolorchooser")
-- Volume control
, ((0,0x1008ff11), spawn "pamixer --allow-boost -d 5") --Folume down
, ((0,0x1008ff13), spawn "pamixer --allow-boost -i 5") --Folume up
, ((0,0x1008ff12), spawn "pamixer -t") --Mute Toggle
, ((0,0x1008ffb2), spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle") --Mic Toggle
--Brightness control
, ((0,0x1008ff02), spawn "light -A 10") --Brightness Up
, ((0,0x1008ff03), spawn "light -U 10") --Brightness Up
--Media Control
, ((0,0x1008ff14), spawn "playerctl play-pause") -- Play/Pause
, ((0,0x1008ff16), spawn "playerctl previous") -- Play/Pause
, ((0,0x1008ff17), spawn "playerctl next") -- Play/Pause
-- Take screenshot
, ((0,0xff61), spawn "flameshot gui")
-- Lock screen
, ((mod4Mask, xK_l), spawn "betterlockscreen --lock")
, ((mod4Mask, xK_F5), spawn "/home/$USER/.config/script/refreshXmonad.sh")
, ((mod4Mask, xK_F6), spawn "/home/$USER/.config/script/toggelTuchpad.sh")
, ((mod4Mask, xK_F7), spawn "/home/$USER/.config/script/ariplaneMode.sh")
, ((mod4Mask, xK_F10), spawn "arandr")
-- launch a terminal
, ((modm, xK_Return), spawn $ XMonad.terminal conf)
, ((modm, xK_backslash), scratchpadSpawnActionTerminal "kitty --class=scratchpad")
-- launch rofi
, ((modm, xK_d ), spawn "rofi -no-lazy-greb -show drun -icon-theme 'Papirus' -show-icons")
-- launch a scrachpad
, ((modm .|. shiftMask, xK_s ), spawn "kitty --class=scratchpad")
-- close focused window
, ((modm, xK_q ), kill)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((mod4Mask, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm .|. shiftMask, xK_m ), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm .|. controlMask, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm .|. controlMask, xK_l ), sendMessage Expand)
-- toggle between full screen and tieling
, ((modm, xK_t ), toggleFull)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modm .|. shiftMask, xK_r ), spawn "xmonad --recompile; xmonad --restart")
]
++
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_l, xK_h] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
]
myLayout = mySpacing $ avoidStruts ( tiled ||| Mirror tiled ||| noBorders Full ||| spiral (6/7) ||| ThreeCol 1 (3/100) (1/2))
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
mySpacing = spacingRaw False -- Only for >1 window
-- The bottom edge seems to look narrower than it is
(Border 30 3 3 3) -- Size of screen edge gaps
True -- Enable screen edge gaps
(Border 3 3 3 3) -- Size of window gaps
True -- Enable window gaps
myManageHook = composeAll
[className =? "Gimp" --> doFloat
, className =? "Qalculate-gtk" --> doFloat
, className =? "Pavucontrol" --> doFloat
, className =? "Minecraft Launcher" --> doShift "8"
, className =? "Microsoft Teams - Preview" --> doShift "7"
, className =? "YouTube Music" --> doShift "9"
, className =? "Thunar" --> viewShift "5"
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore
]
where viewShift = doF . liftM2 (.) W.greedyView W.shift
myEventHook = swallowEventHook (className =? "kitty" <||> className =? "Termite") (return True)
myLogHook = do
winset <- gets windowset
title <- maybe (return "") (fmap show . getName) . W.peek $ winset
let currWs = W.currentTag winset
let wss = map W.tag $ W.workspaces winset
let wsStr = join $ map (fmt currWs) $ sort' wss
io $ appendFile "/tmp/.xmonad-title-log" (title ++ "\n")
io $ appendFile "/tmp/.xmonad-workspace-log" (wsStr ++ "\n")
where fmt currWs ws
| currWs == ws = "[" ++ ws ++ "]"
| otherwise = " " ++ ws ++ " "
sort' = sortBy (compare `on` (!! 0))
myHandleEventHook = swallowEventHook (className =? "kitty" <||> className =? "Termite") (return True)
myStartupHook = do
spawnOnce "dunst &"
spawnOnce "pipewire & /usr/bin/pipewire-pulse & /usr/bin/pipewire-media-session &"
spawnOnce "/home/$USER/.config/script/redshift.sh &"
spawnOnce "xss-lock /home/$USER/.config/script/betterlockscreen.sh &"
spawnOnce "nextcloud --background &"
spawnOnce "fcitx -d &"
spawnOnce "copyq --start-server"
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
spawnOnce "nm-applet &"
spawnOnce "picom --backend glx &"
spawnOnce "nitrogen --restore &"
myPP = def {ppCurrent = xmobarColor "black" "whight"}
mainBar = statusBarPropTo "_XMONAD_LOG_1" "polybar MainWithTray" (pure myPP)
secondBar = statusBarPropTo "_XMONAD_LOG_2" "polybar SeconderyWitNoTray" (pure myPP)
barSpawner :: ScreenId -> IO StatusBarConfig
barSpawner 0 = pure $ mainBar
barSpawner 1 = pure $ secondBar
barSpawner _ = mempty
main = do
xmonad $ docks $ ewmhFullscreen $ ewmh $ dynamicSBs barSpawner def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings ,
-- hooks, layouts
layoutHook = smartBorders $ myLayout,
manageHook = myManageHook <+> scratchpadManageHook (W.RationalRect 0.4 0.3 0.6 0.5),
handleEventHook = myEventHook,
logHook = myLogHook >> updatePointer (0.5, 0.5) (0, 0),
startupHook = myStartupHook -- dynStatusBarStartup barInScreen (return ())
}
forM_ [".xmonad-workspace-log", ".xmonad-title-log"] $ \file -> do
safeSpawn "mkfifo" ["/tmp/" ++ file]

View File

@@ -1,518 +0,0 @@
--imports
import XMonad
import Data.Monoid
import Data.List (sortBy)
import Data.Function (on)
--import XMonad.Hooks.StatusBar ( dynStatusBarStartup, dynStatusBarEventHook, multiPP )
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
import XMonad.Hooks.WindowSwallowing
import Control.Monad (forM_, join)
import Control.Monad (liftM2)
import System.Exit
import System.IO
import XMonad.Util.SpawnOnce
import XMonad.Util.Scratchpad
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Util.NamedWindows (getName)
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Util.EZConfig
import XMonad.Layout.Spacing
import XMonad.Actions.UpdatePointer
import XMonad.Actions.SwapWorkspaces
import qualified XMonad.StackSet as W
import qualified Data.Map as M
-- import qualified XMonad.Layout.IndependentScreens as XLI
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
--
myTerminal = "alacritty"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
-- Whether clicking on a window to focus also passes the click to the window
myClickJustFocuses :: Bool
myClickJustFocuses = False
-- Width of the window border in pixels.
--
myBorderWidth = 3
-- modMask lets you specify which modkey you want to use. The default
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
-- ("right alt"), which does not conflict with emacs keybindings. The
-- "windows key" is usually mod4Mask.
--
myModMask = mod1Mask
-- The default number of workspaces (virtual screens) and their names.
-- By default we use numeric strings, but any string may be used as a
-- workspace name. The number of workspaces is determined by the length
-- of this list.
--
-- A tagging example:
--
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
myWorkspaces = ["1:MAIN","2:DEV","3:WWW","4:TERM","5:TEXT","6:FOLDER","7:SCHOOL","8:GAMES","9:MUSIC"]
-- Border colors for unfocused and focused windows, respectively.
--
myNormalBorderColor = "#1A1A1A"
myFocusedBorderColor = "#8218c4"
-- Looks to see if focused window is floating and if it is the places it in the stack
-- else it makes it floating but as full screen
toggleFull = withFocused (\windowId -> do
{ floats <- gets (W.floating . windowset);
if windowId `M.member` floats
then withFocused $ windows . W.sink
else withFocused $ windows . (flip W.float $ W.RationalRect 0 0 1 1) })
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here.
--
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- open configs
[ --((modm, xK_x ), spawn "alacritty -e nvim /home/$USER/.xmonad/xmonad.hs ; alacritty -e nvim /home/$USER/.config/polybar/config")
--toggle avoid struts
-- open browser
((modm, xK_b ), spawn "qutebrowser")
-- open messinging app (ferdi)
,((modm, xK_c ), spawn "qalculate-gtk")
-- open PcmanFM
, ((modm, xK_f ), spawn "pcmanfm")
-- open mailspring
, ((modm, xK_e ), spawn "mailspring")
-- open kde colour picker
, ((modm, xK_p ), spawn "kcolorchooser")
-- Open youtube music
,((modm, xK_m ), spawn "youtube-music")
-- Volume control
, ((0,0x1008ff11), spawn "pamixer --allow-boost -d 5") --Folume down
, ((0,0x1008ff13), spawn "pamixer --allow-boost -i 5") --Folume up
, ((0,0x1008ff12), spawn "pamixer -t") --Mute Toggle
, ((0,0x1008ffb2), spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle") --Mic Toggle
--Brightness control
, ((0,0x1008ff02), spawn "light -A 10") --Brightness Up
, ((0,0x1008ff03), spawn "light -U 10") --Brightness Up
--Media Control
, ((0,0x1008ff14), spawn "playerctl play-pause") -- Play/Pause
, ((0,0x1008ff16), spawn "playerctl previous") -- Play/Pause
, ((0,0x1008ff17), spawn "playerctl next") -- Play/Pause
-- Take screenshot
, ((0,0xff61), spawn "flameshot gui")
-- Lock screen
, ((mod4Mask, xK_l), spawn "betterlockscreen --lock")
, ((mod4Mask, xK_F5), spawn "/home/$USER/.config/script/refreshXmonad.sh")
, ((mod4Mask, xK_F6), spawn "/home/$USER/.config/script/toggelTuchpad.sh")
, ((mod4Mask, xK_F7), spawn "/home/$USER/.config/script/ariplaneMode.sh")
, ((mod4Mask, xK_F10), spawn "arandr")
-- launch a terminal
, ((modm, xK_Return), spawn $ XMonad.terminal conf)
, ((modm, xK_backslash), scratchpadSpawnActionTerminal "alacritty -class scratchpad")
-- launch rofi
, ((modm, xK_d ), spawn "rofi -no-lazy-greb -show drun -icon-theme 'Papirus' -show-icons")
-- launch a scrachpad
, ((modm .|. shiftMask, xK_s ), spawn "alacritty --class scratchpad")
-- close focused window
, ((modm, xK_q ), kill)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((mod4Mask, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm .|. shiftMask, xK_m ), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm .|. controlMask, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm .|. controlMask, xK_l ), sendMessage Expand)
-- toggle between full screen and tieling
, ((modm, xK_t ), toggleFull)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
-- , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modm .|. shiftMask, xK_r ), spawn "xmonad --recompile; xmonad --restart")
-- Run xmessage with a summary of the default keybindings (useful for beginners)
, ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -"))
]
++
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_l, xK_h] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
-- swap workspaces between desktosa
-- ++
-- [((modm .|. controlMask, k), windows $ swapWithCurrent i)
-- | (i, k) <- zip workspaces [xK_1 ..]]
------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events
--
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
------------------------------------------------------------------------
-- Layouts:
-- You can specify and transform your layouts by modifying these values.
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
--
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
--
mySpacing = spacingRaw False -- Only for >1 window
-- The bottom edge seems to look narrower than it is
(Border 30 3 3 3) -- Size of screen edge gaps
True -- Enable screen edge gaps
(Border 3 3 3 3) -- Size of window gaps
True -- Enable window gaps
myLayout = mySpacing $ avoidStruts ( tiled ||| Mirror tiled ||| noBorders Full ||| spiral (6/7) ||| ThreeCol 1 (3/100) (1/2))
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
------------------------------------------------------------------------
-- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, className =? "Qalculate-gtk" --> doFloat
, className =? "Nextcloud" --> doFloat
, className =? "Pavucontrol" --> doFloat
, className =? "Nm-connection-editor" --> doFloat
, className =? "vlc" --> doFloat
, className =? "Alert" --> doFloat
, className =? "jetbrains-clion"--> doFloat
, className =? "yakuake" --> doFloat
, className =? "Imager" --> doFloat
-- , className =? "krunner" --> doFloat
, className =? "jetbrains-clion"--> doShift "2:DEV"
, className =? "Code" --> doShift "2:DEV"
, className =? "Oni2_editor" --> viewShift "2:DEV"
, className =? "Brave-browser" --> doShift "3:WWW"
, className =? "firefox" --> viewShift "3:WWW"
, className =? "okular" --> viewShift "5:TEXT"
-- ,className =? "okular" --> viewShift "5:TEXT"
, className =? "Minecraft Launcher" --> doShift "8:GAMES"
, className =? "Microsoft Teams - Preview" --> doShift "7:SCHOOL"
, className =? "YouTube Music" --> doShift "9:MUSIC"
, className =? "Pcmanfm" --> doShift "6:FOLDER"
, className =? "dolphin" --> viewShift "6:FOLDER"
-- , className =? "Thunar" --> viewShift "5:TEXT"
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore
]
where viewShift = doF . liftM2 (.) W.greedyView W.shift
------------------------------------------------------------------------
-- Event handling
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
--
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
myEventHook = swallowEventHook (className =? "Alacritty" <||> className =? "Termite") (return True)
-- ewmhFullscreen
-- dynStatusBarEventHook barInScreen (spawn "killall polybar; killall polybar")
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
myLogHook = do
winset <- gets windowset
title <- maybe (return "") (fmap show . getName) . W.peek $ winset
let currWs = W.currentTag winset
let wss = map W.tag $ W.workspaces winset
let wsStr = join $ map (fmt currWs) $ sort' wss
io $ appendFile "/tmp/.xmonad-title-log" (title ++ "\n")
io $ appendFile "/tmp/.xmonad-workspace-log" (wsStr ++ "\n")
where fmt currWs ws
| currWs == ws = "[" ++ ws ++ "]"
| otherwise = " " ++ ws ++ " "
sort' = sortBy (compare `on` (!! 0))
barInScreen :: ScreenId -> IO Handle
barInScreen (S 0) = do
spawn "sleep 2; polybar MainWithTray"
spawn "killall picom"
spawn "sleep 1; picom --backend glx &"
spawnPipe "cat >> /tmp/.xmonad-workspace-log"
barInScreen (S 1) = do
spawn "sleep 3; polybar SeconderyWitNoTray"
spawn "killall picom"
spawn "sleep 1 ; picom --backend glx &"
spawnPipe "cat >> /tmp/.xmonad-workspace-hdmi-log"
------------------------------------------------------------------------
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
myHandleEventHook = swallowEventHook (className =? "Alacritty" <||> className =? "Termite") (return True)
myStartupHook = do
spawnOnce "dunst &"
spawnOnce "/home/$USER/.config/script/redshift.sh &"
-- spawnOnce "/homme/$USER/.config/scripr/docked.sh &"
spawnOnce "xss-lock /home/$USER/.config/script/betterlockscreen.sh &"
spawnOnce "nextcloud --background &"
spawnOnce "fcitx -d &"
spawnOnce "copyq --start-server"
--spawnOnce "mailspring -b &"
-- spawnOnce "/home/$USER/.config/script/audio.sh &"
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
--"/home/$USER/.config/script/plkit.sh &"
-- spawnOnce "powerkit &"
-- spawnOnce "birdtray &"
spawnOnce "nm-applet &"
-- spawnOnce "connman-ui-gtk &"
-- spawnOnce "yakuake &"
-- spawnOnce "sh /home/$USER/.config/script/polybar-open.sh"
------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this.
--
--
myPP = def {ppCurrent = xmobarColor "black" "whight"}
mainBar = statusBarPropTo "_XMONAD_LOG_1" "polybar MainWithTray" (pure myPP)
secondBar = statusBarPropTo "_XMONAD_LOG_2" "polybar SeconderyWitNoTray" (pure myPP)
barSpawner :: ScreenId -> IO StatusBarConfig
barSpawner 0 = pure $ mainBar
barSpawner 1 = pure $ secondBar
barSpawner _ = mempty
main = do
spawn "picom --backend glx &"
spawn "nitrogen --restore &"
-- xmproc <- spawnPipe "polybar barbase" --"xmobar -x 0 /home/$USER/.config/xmobar/xmobar.config"
-- xmproc <- spawnPipe "polybar barbase2"
-- xmproc <- spawnPipe "xmobar -x 1 /home/$USER/.config/xmobar/xmobar.config"
xmonad $ docks $ ewmhFullscreen $ ewmh $ dynamicSBs barSpawner def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings ,
-- hooks, layouts
layoutHook = smartBorders $ myLayout,
manageHook = myManageHook <+> scratchpadManageHook (W.RationalRect 0.4 0.3 0.6 0.5),
handleEventHook = myEventHook,
logHook = myLogHook >> updatePointer (0.5, 0.5) (0, 0),
startupHook = myStartupHook -- dynStatusBarStartup barInScreen (return ())
}
forM_ [".xmonad-workspace-log", ".xmonad-title-log"] $ \file -> do
safeSpawn "mkfifo" ["/tmp/" ++ file]
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
-- | Finally, a copy of the default bindings in simple textual tabular format.
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"",
"-- launching and killing programs",
"mod-Shift-Enter Launch xterminal",
"mod-p Launch dmenu",
"mod-Shift-p Launch gmrun",
"mod-Shift-c Close/kill the focused window",
"mod-Space Rotate through the available layout algorithms",
"mod-Shift-Space Reset the layouts on the current workSpace to default",
"mod-n Resize/refresh viewed windows to the correct size",
"",
"-- move focus up or down the window stack",
"mod-Tab Move focus to the next window",
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window",
"mod-k Move focus to the previous window",
"mod-m Move focus to the master window",
"",
"-- modifying the window order",
"mod-Return Swap the focused window and the master window",
"mod-Shift-j Swap the focused window with the next window",
"mod-Shift-k Swap the focused window with the previous window",
"",
"-- resizing the master/slave ratio",
"mod-h Shrink the master area",
"mod-l Expand the master area",
"",
"-- floating layer support",
"mod-t Push window back into tiling; unfloat and re-tile it",
"",
"-- increase or decrease number of windows in the master area",
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area",
"",
"-- quit, or restart",
"mod-Shift-q Quit xmonad",
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N",
"",
"-- Workspaces & screens",
"mod-Shift-[1..9] Move client to workspace N",
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
"",
"-- Mouse bindings: default actions bound to mouse events",
"mod-button1 Set the window to floating mode and move by dragging",
"mod-button2 Raise the window to the top of the stack",
"mod-button3 Set the window to floating mode and resize by dragging"]

Binary file not shown.

View File

@@ -1 +0,0 @@
$ ghc --make xmonad.hs -i -ilib -fforce-recomp -main-is main -v0 -outputdir /home/mrfluffy/.xmonad/build-x86_64-linux -o /home/mrfluffy/.xmonad/xmonad-x86_64-linux

Binary file not shown.

View File

@@ -1,501 +0,0 @@
--imports
import XMonad
import Data.Monoid
import Data.List (sortBy)
import Data.Function (on)
import XMonad.Hooks.DynamicBars ( dynStatusBarStartup, dynStatusBarEventHook, multiPP )
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.DynamicBars
import Control.Monad (forM_, join)
import Control.Monad (liftM2)
import System.Exit
import System.IO
import XMonad.Util.SpawnOnce
import XMonad.Util.Scratchpad
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Util.NamedWindows (getName)
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Util.EZConfig
import XMonad.Layout.Spacing
import XMonad.Actions.UpdatePointer
import XMonad.Actions.SwapWorkspaces
import qualified XMonad.StackSet as W
import qualified Data.Map as M
-- import qualified XMonad.Layout.IndependentScreens as XLI
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
--
myTerminal = "alacritty"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
-- Whether clicking on a window to focus also passes the click to the window
myClickJustFocuses :: Bool
myClickJustFocuses = False
-- Width of the window border in pixels.
--
myBorderWidth = 3
-- modMask lets you specify which modkey you want to use. The default
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
-- ("right alt"), which does not conflict with emacs keybindings. The
-- "windows key" is usually mod4Mask.
--
myModMask = mod1Mask
-- The default number of workspaces (virtual screens) and their names.
-- By default we use numeric strings, but any string may be used as a
-- workspace name. The number of workspaces is determined by the length
-- of this list.
--
-- A tagging example:
--
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
myWorkspaces = ["1:MAIN","2:DEV","3:WWW","4:TERM","5:TEXT","6:FOLDER","7:SCHOOL","8:GAMES","9:MUSIC"]
-- Border colors for unfocused and focused windows, respectively.
--
myNormalBorderColor = "#1A1A1A"
myFocusedBorderColor = "#8218c4"
-- Looks to see if focused window is floating and if it is the places it in the stack
-- else it makes it floating but as full screen
toggleFull = withFocused (\windowId -> do
{ floats <- gets (W.floating . windowset);
if windowId `M.member` floats
then withFocused $ windows . W.sink
else withFocused $ windows . (flip W.float $ W.RationalRect 0 0 1 1) })
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here.
--
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- open configs
[ --((modm, xK_x ), spawn "alacritty -e nvim /home/$USER/.xmonad/xmonad.hs ; alacritty -e nvim /home/$USER/.config/polybar/config")
-- open browser
((modm, xK_b ), spawn "qutebrowser")
-- open messinging app (ferdi)
,((modm, xK_c ), spawn "qalculate-gtk")
-- open PcmanFM
, ((modm, xK_f ), spawn "pcmanfm")
-- open mailspring
, ((modm, xK_e ), spawn "mailspring")
-- open kde colour picker
, ((modm, xK_p ), spawn "kcolorchooser")
-- Open youtube music
,((modm, xK_m ), spawn "youtube-music")
-- Volume control
, ((0,0x1008ff11), spawn "pamixer --allow-boost -d 5") --Folume down
, ((0,0x1008ff13), spawn "pamixer --allow-boost -i 5") --Folume up
, ((0,0x1008ff12), spawn "pamixer -t") --Mute Toggle
, ((0,0x1008ffb2), spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle") --Mic Toggle
--Brightness control
, ((0,0x1008ff02), spawn "light -A 10") --Brightness Up
, ((0,0x1008ff03), spawn "light -U 10") --Brightness Up
--Media Control
, ((0,0x1008ff14), spawn "playerctl play-pause") -- Play/Pause
, ((0,0x1008ff16), spawn "playerctl previous") -- Play/Pause
, ((0,0x1008ff17), spawn "playerctl next") -- Play/Pause
-- Take screenshot
, ((0,0xff61), spawn "flameshot gui")
-- Lock screen
, ((mod4Mask, xK_l), spawn "betterlockscreen --lock")
, ((mod4Mask, xK_F5), spawn "/home/$USER/.config/script/refreshXmonad.sh")
, ((mod4Mask, xK_F6), spawn "/home/$USER/.config/script/toggelTuchpad.sh")
, ((mod4Mask, xK_F7), spawn "/home/$USER/.config/script/ariplaneMode.sh")
, ((mod4Mask, xK_F10), spawn "arandr")
-- launch a terminal
, ((modm, xK_Return), spawn $ XMonad.terminal conf)
, ((modm, xK_backslash), scratchpadSpawnActionTerminal "alacritty -class scratchpad")
-- launch rofi
, ((modm, xK_d ), spawn "rofi -no-lazy-greb -show drun -icon-theme 'Papirus' -show-icons")
-- launch a scrachpad
, ((modm .|. shiftMask, xK_s ), spawn "alacritty --class scratchpad")
-- close focused window
, ((modm, xK_q ), kill)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((mod4Mask, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm .|. shiftMask, xK_m ), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm .|. controlMask, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm .|. controlMask, xK_l ), sendMessage Expand)
-- toggle between full screen and tieling
, ((modm, xK_t ), toggleFull)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
-- , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modm .|. shiftMask, xK_r ), spawn "killall polybar; killall polybar; killall picom; xmonad --recompile; xmonad --restart")
-- Run xmessage with a summary of the default keybindings (useful for beginners)
, ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -"))
]
++
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_l, xK_h] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
-- swap workspaces between desktosa
-- ++
-- [((modm .|. controlMask, k), windows $ swapWithCurrent i)
-- | (i, k) <- zip workspaces [xK_1 ..]]
------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events
--
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
------------------------------------------------------------------------
-- Layouts:
-- You can specify and transform your layouts by modifying these values.
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
--
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
--
mySpacing = spacingRaw False -- Only for >1 window
-- The bottom edge seems to look narrower than it is
(Border 30 3 3 3) -- Size of screen edge gaps
True -- Enable screen edge gaps
(Border 3 3 3 3) -- Size of window gaps
True -- Enable window gaps
myLayout = mySpacing $ avoidStruts ( tiled ||| Mirror tiled ||| noBorders Full ||| spiral (6/7) ||| ThreeCol 1 (3/100) (1/2))
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
------------------------------------------------------------------------
-- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, className =? "Qalculate-gtk" --> doFloat
, className =? "Nextcloud" --> doFloat
, className =? "Pavucontrol" --> doFloat
, className =? "Nm-connection-editor" --> doFloat
, className =? "vlc" --> doFloat
, className =? "Alert" --> doFloat
, className =? "jetbrains-clion"--> doFloat
, className =? "yakuake" --> doFloat
, className =? "Imager" --> doFloat
-- , className =? "krunner" --> doFloat
, className =? "jetbrains-clion"--> doShift "2:DEV"
, className =? "Code" --> doShift "2:DEV"
, className =? "Oni2_editor" --> viewShift "2:DEV"
, className =? "Brave-browser" --> doShift "3:WWW"
, className =? "firefox" --> viewShift "3:WWW"
, className =? "okular" --> viewShift "5:TEXT"
-- ,className =? "okular" --> viewShift "5:TEXT"
, className =? "Minecraft Launcher" --> doShift "8:GAMES"
, className =? "Microsoft Teams - Preview" --> doShift "7:SCHOOL"
, className =? "YouTube Music" --> doShift "9:MUSIC"
, className =? "Pcmanfm" --> doShift "6:FOLDER"
, className =? "dolphin" --> viewShift "6:FOLDER"
-- , className =? "Thunar" --> viewShift "5:TEXT"
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore
]
where viewShift = doF . liftM2 (.) W.greedyView W.shift
------------------------------------------------------------------------
-- Event handling
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
--
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
myEventHook = handleEventHook def <+> fullscreenEventHook <+> dynStatusBarEventHook barInScreen (spawn "killall polybar; killall polybar")
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
myLogHook = do
winset <- gets windowset
title <- maybe (return "") (fmap show . getName) . W.peek $ winset
let currWs = W.currentTag winset
let wss = map W.tag $ W.workspaces winset
let wsStr = join $ map (fmt currWs) $ sort' wss
io $ appendFile "/tmp/.xmonad-title-log" (title ++ "\n")
io $ appendFile "/tmp/.xmonad-workspace-log" (wsStr ++ "\n")
where fmt currWs ws
| currWs == ws = "[" ++ ws ++ "]"
| otherwise = " " ++ ws ++ " "
sort' = sortBy (compare `on` (!! 0))
barInScreen :: ScreenId -> IO Handle
barInScreen (S 0) = do
spawn "sleep 2; polybar MainWithTray"
spawn "killall picom"
spawn "sleep 1; picom --backend glx &"
spawnPipe "cat >> /tmp/.xmonad-workspace-log"
barInScreen (S 1) = do
spawn "sleep 3; polybar SeconderyWitNoTray"
spawn "killall picom"
spawn "sleep 1 ; picom --backend glx &"
spawnPipe "cat >> /tmp/.xmonad-workspace-hdmi-log"
------------------------------------------------------------------------
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
myStartupHook = do
spawnOnce "/home/$USER/.config/script/redshift.sh &"
-- spawnOnce "/homme/$USER/.config/scripr/docked.sh &"
spawnOnce "xss-lock /home/$USER/.config/script/betterlockscreen.sh &"
spawnOnce "nextcloud --background &"
spawnOnce "fcitx5 -d &"
spawnOnce "copyq --start-server"
--spawnOnce "mailspring -b &"
-- spawnOnce "/home/$USER/.config/script/audio.sh &"
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
--"/home/$USER/.config/script/plkit.sh &"
-- spawnOnce "powerkit &"
-- spawnOnce "birdtray &"
spawnOnce "nm-applet &"
-- spawnOnce "connman-ui-gtk &"
-- spawnOnce "yakuake &"
-- spawnOnce "sh /home/$USER/.config/script/polybar-open.sh"
------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this.
--
main = do
spawn "picom --backend glx &"
spawn "nitrogen --restore &"
-- xmproc <- spawnPipe "polybar barbase" --"xmobar -x 0 /home/$USER/.config/xmobar/xmobar.config"
-- xmproc <- spawnPipe "polybar barbase2"
-- xmproc <- spawnPipe "xmobar -x 1 /home/$USER/.config/xmobar/xmobar.config"
xmonad $ docks $ ewmh def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings ,
-- hooks, layouts
layoutHook = smartBorders $ myLayout,
manageHook = myManageHook <+> scratchpadManageHook (W.RationalRect 0.4 0.3 0.6 0.5),
handleEventHook = myEventHook,
logHook = myLogHook >> updatePointer (0.5, 0.5) (0, 0),
startupHook = myStartupHook <+> dynStatusBarStartup barInScreen (return ())
}
forM_ [".xmonad-workspace-log", ".xmonad-title-log"] $ \file -> do
safeSpawn "mkfifo" ["/tmp/" ++ file]
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
-- | Finally, a copy of the default bindings in simple textual tabular format.
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"",
"-- launching and killing programs",
"mod-Shift-Enter Launch xterminal",
"mod-p Launch dmenu",
"mod-Shift-p Launch gmrun",
"mod-Shift-c Close/kill the focused window",
"mod-Space Rotate through the available layout algorithms",
"mod-Shift-Space Reset the layouts on the current workSpace to default",
"mod-n Resize/refresh viewed windows to the correct size",
"",
"-- move focus up or down the window stack",
"mod-Tab Move focus to the next window",
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window",
"mod-k Move focus to the previous window",
"mod-m Move focus to the master window",
"",
"-- modifying the window order",
"mod-Return Swap the focused window and the master window",
"mod-Shift-j Swap the focused window with the next window",
"mod-Shift-k Swap the focused window with the previous window",
"",
"-- resizing the master/slave ratio",
"mod-h Shrink the master area",
"mod-l Expand the master area",
"",
"-- floating layer support",
"mod-t Push window back into tiling; unfloat and re-tile it",
"",
"-- increase or decrease number of windows in the master area",
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area",
"",
"-- quit, or restart",
"mod-Shift-q Quit xmonad",
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N",
"",
"-- Workspaces & screens",
"mod-Shift-[1..9] Move client to workspace N",
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
"",
"-- Mouse bindings: default actions bound to mouse events",
"mod-button1 Set the window to floating mode and move by dragging",
"mod-button2 Raise the window to the top of the stack",
"mod-button3 Set the window to floating mode and resize by dragging"]

View File

@@ -1,443 +0,0 @@
--imports
import XMonad
import Data.Monoid
import Data.List (sortBy)
import Data.Function (on)
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.DynamicBars
import Control.Monad (forM_, join)
import System.Exit
import System.IO
import XMonad.Util.SpawnOnce
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageDocks
import XMonad.Util.NamedWindows (getName)
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.ThreeColumns
import XMonad.Util.EZConfig
import XMonad.Layout.Spacing
import XMonad.Actions.UpdatePointer
import XMonad.Actions.SwapWorkspaces
import qualified XMonad.StackSet as W
import qualified Data.Map as M
-- import qualified XMonad.Layout.IndependentScreens as XLI
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
--
myTerminal = "termite"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
-- Whether clicking on a window to focus also passes the click to the window
myClickJustFocuses :: Bool
myClickJustFocuses = False
-- Width of the window border in pixels.
--
myBorderWidth = 3
-- modMask lets you specify which modkey you want to use. The default
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
-- ("right alt"), which does not conflict with emacs keybindings. The
-- "windows key" is usually mod4Mask.
--
myModMask = mod1Mask
-- The default number of workspaces (virtual screens) and their names.
-- By default we use numeric strings, but any string may be used as a
-- workspace name. The number of workspaces is determined by the length
-- of this list.
--
-- A tagging example:
--
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
myWorkspaces = ["1:MAIN","2:DEV","3:WWW","4:TERM","5:TEXT","6:FOLDER","7:SCHOOL","8:GAMES","9:MUSIC"]
-- Border colors for unfocused and focused windows, respectively.
--
myNormalBorderColor = "#1A1A1A"
myFocusedBorderColor = "#8218c4"
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here.
--
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- open configs
[ ((modm, xK_c ), spawn "code /home/mrfluffy/.xmonad/xmonad.hs; code /home/mrfluffy/.config/polybar/config")
-- open browser
, ((modm, xK_b ), spawn "brave")
-- open PcmanFM
, ((modm, xK_f ), spawn "pcmanfm")
-- open mailspring
, ((modm, xK_e ), spawn "gmail-desktop")
-- open kde colour picker
, ((modm, xK_p ), spawn "kcolorchooser")
-- Open youtube music
,((modm, xK_m ), spawn "youtube-music-bin")
-- Volume control
, ((0,0x1008ff11), spawn "pamixer --allow-boost -d 5") --Folume down
, ((0,0x1008ff13), spawn "pamixer --allow-boost -i 5") --Folume up
, ((0,0x1008ff12), spawn "amixer set Master toggle") --Mute Toggle
, ((0,0x1008ffb2), spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle") --Mic Toggle
--Brightness control
, ((0,0x1008ff02), spawn "light -A 10") --Brightness Up
, ((0,0x1008ff03), spawn "light -U 10") --Brightness Up
--Media Control
, ((0,0x1008ff14), spawn "playerctl play-pause") -- Play/Pause
, ((0,0x1008ff16), spawn "playerctl previous") -- Play/Pause
, ((0,0x1008ff17), spawn "playerctl next") -- Play/Pause
-- Take screenshot
, ((0,0xff61), spawn "flameshot gui")
-- Lock screen
, ((mod4Mask, xK_l), spawn "/home/mrfluffy/.config/script/lock.sh")
-- launch a terminal
, ((modm, xK_Return), spawn $ XMonad.terminal conf)
-- launch rofi
, ((modm, xK_d ), spawn "rofi -no-lazy-greb -show drun -theme /home/mrfluffy/.config/rofi-menus/themes/appsmenu.rasi")
-- launch gmrun
, ((modm .|. shiftMask, xK_p ), spawn "gmrun")
-- close focused window
, ((modm, xK_q ), kill)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((mod4Mask, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm .|. shiftMask, xK_m ), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm .|. controlMask, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm .|. controlMask, xK_l ), sendMessage Expand)
-- Push window back into tiling
, ((modm, xK_t ), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
-- , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modm .|. shiftMask, xK_r ), spawn "killall polybar; killall picom; xmonad --recompile; xmonad --restart")
-- Run xmessage with a summary of the default keybindings (useful for beginners)
, ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -"))
]
++
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_l, xK_h] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
-- swap workspaces between desktosa
-- ++
-- [((modm .|. controlMask, k), windows $ swapWithCurrent i)
-- | (i, k) <- zip workspaces [xK_1 ..]]
------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events
--
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
------------------------------------------------------------------------
-- Layouts:
-- You can specify and transform your layouts by modifying these values.
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
--
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
--
myLayout = avoidStruts (tiled ||| Mirror tiled ||| Full ||| spiral (6/7) ||| ThreeCol 1 (3/100) (1/2))
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
------------------------------------------------------------------------
-- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, className =? "Qalculate-gtk" --> doFloat
, className =? "Nextcloud" --> doFloat
, className =? "Pavucontrol" --> doFloat
, className =? "Nm-connection-editor" --> doFloat
, className =? "vlc" --> doFloat
, className =? "Alert" --> doFloat
, className =? "jetbrains-clion"--> doFloat
, className =? "yakuake" --> doFloat
, className =? "jetbrains-clion"--> doShift "2:DEV"
, className =? "Code" --> doShift "2:DEV"
, className =? "Brave-browser" --> doShift "3:WWW"
, className =? "Minecraft Launcher" --> doShift "8:GAMES"
, className =? "Microsoft Teams - Preview" --> doShift "7:SCHOOL"
, className =? "YouTube Music" --> doShift "9:MUSIC"
, className =? "Pcmanfm" --> doShift "6:FOLDER"
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
------------------------------------------------------------------------
-- Event handling
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
--
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
myEventHook = handleEventHook def <+> fullscreenEventHook
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
myLogHook = do
winset <- gets windowset
title <- maybe (return "") (fmap show . getName) . W.peek $ winset
let currWs = W.currentTag winset
let wss = map W.tag $ W.workspaces winset
let wsStr = join $ map (fmt currWs) $ sort' wss
io $ appendFile "/tmp/.xmonad-title-log" (title ++ "\n")
io $ appendFile "/tmp/.xmonad-workspace-log" (wsStr ++ "\n")
where fmt currWs ws
| currWs == ws = "[" ++ ws ++ "]"
| otherwise = " " ++ ws ++ " "
sort' = sortBy (compare `on` (!! 0))
------------------------------------------------------------------------
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
myStartupHook = do
spawnOnce "xss-lock /home/mrfluffy/.config/script/lock.sh &"
spawnOnce "nextcloud --background &"
spawnOnce "fcitx -d &"
-- spawnOnce "birdtray &"
spawnOnce "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &"
-- spawnOnce "birdtray &"
spawnOnce "nm-applet &"
-- spawnOnce "yakuake &"
-- spawnOnce "sh /home/mrfluffy/.config/script/polybar-open.sh"
-- barInScreen :: ScreenId -> IO Handle
-- barInScreen (S 0) = do
-- spawn "sleep 1; polybar barbase"
-- spawn "sleep 3; tint2 -c /home/augusto/.config/tint2/leftbar.tint2rc"
-- spawnPipe "cat >> /tmp/.xmonad-workspace-log"
-- barInScreen (S 1) = do
-- spawn "sleep 1; polybar barbase"
-- spawnPipe "cat >> /tmp/.xmonad-workspace-HDMI-log"
------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this.
--
main = do
spawn "picom --experimental-backend &"
spawn "nitrogen --restore &"
xmproc <- spawnPipe "polybar barbase" --"xmobar -x 0 /home/mrfluffy/.config/xmobar/xmobar.config"
-- xmproc <- spawnPipe "xmobar -x 1 /home/mrfluffy/.config/xmobar/xmobar.config"
xmonad $ docks $ ewmh def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = spacing 5 $ smartSpacing 2 $ smartBorders myLayout,
manageHook = myManageHook,
handleEventHook = myEventHook,
logHook = myLogHook >> updatePointer (0.5, 0.5) (0, 0),
startupHook = myStartupHook
}
forM_ [".xmonad-workspace-log", ".xmonad-title-log"] $ \file -> do
safeSpawn "mkfifo" ["/tmp/" ++ file]
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
-- | Finally, a copy of the default bindings in simple textual tabular format.
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"",
"-- launching and killing programs",
"mod-Shift-Enter Launch xterminal",
"mod-p Launch dmenu",
"mod-Shift-p Launch gmrun",
"mod-Shift-c Close/kill the focused window",
"mod-Space Rotate through the available layout algorithms",
"mod-Shift-Space Reset the layouts on the current workSpace to default",
"mod-n Resize/refresh viewed windows to the correct size",
"",
"-- move focus up or down the window stack",
"mod-Tab Move focus to the next window",
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window",
"mod-k Move focus to the previous window",
"mod-m Move focus to the master window",
"",
"-- modifying the window order",
"mod-Return Swap the focused window and the master window",
"mod-Shift-j Swap the focused window with the next window",
"mod-Shift-k Swap the focused window with the previous window",
"",
"-- resizing the master/slave ratio",
"mod-h Shrink the master area",
"mod-l Expand the master area",
"",
"-- floating layer support",
"mod-t Push window back into tiling; unfloat and re-tile it",
"",
"-- increase or decrease number of windows in the master area",
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area",
"",
"-- quit, or restart",
"mod-Shift-q Quit xmonad",
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N",
"",
"-- Workspaces & screens",
"mod-Shift-[1..9] Move client to workspace N",
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
"",
"-- Mouse bindings: default actions bound to mouse events",
"mod-button1 Set the window to floating mode and move by dragging",
"mod-button2 Raise the window to the top of the stack",
"mod-button3 Set the window to floating mode and resize by dragging"]

Binary file not shown.

View File

@@ -38,7 +38,7 @@ export SSH_AUTH_SOCK
anamnesis --start anamnesis --start
numlockx on numlockx on
xsetroot -cursor_name left_ptr xsetroot -cursor_name left_ptr
alacritty --class scratchpad & kitty --class=scratchpad &
xrandr --output eDP --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal xrandr --output eDP --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-A-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal
xrandr --output HDMI-A-0 --set TearFree on & xrandr --output HDMI-A-0 --set TearFree on &
xrandr --output eDP --set TearFree on & xrandr --output eDP --set TearFree on &

View File

@@ -1,112 +1,23 @@
# If you come from bash you might have to change your $PATH. # Lines configured by zsh-newuser-install
export PATH=$HOME/bin:/usr/local/bin:$HOME/.emacs.d/bin:$HOME/.local/bin:$HOME/.local/bin:$PATH HISTFILE=~/.histfile
HISTSIZE=3000
SAVEHIST=3000
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
bindkey -v
autoload -U promptinit; promptinit
prompt spaceship
export PATH=$HOME/bin:/usr/local/bin:$HOME/.emacs.d/bin:$HOME/.local/bin:$HOME/.cargo/bin:$PATH
export XDG_CONFIG_HOME="$HOME/.config" export XDG_CONFIG_HOME="$HOME/.config"
# Path to your oh-my-zsh installation. export FZF_DEFAULT_COMMAND="rg ~ --files --hidden"
export ZSH="/home/mrfluffy/.oh-my-zsh" export FZF_DEFAULT_OPTS='--height 30% --reverse'
export XDG_CURRENT_DESKTOP="river" export FZF_CTRL_R_OPTS='--sort'
#(cat ~/.cache/wal/sequences &)
#source ~/.cache/wal/colors-tty.sh
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="agnoster"
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias ls="exa -lag --icons" alias ls="exa -lag --icons"
alias vim="nvim" alias vim="nvim"
alias cat="bat" alias cat="bat"
alias anime="~/repos/ani-cli/ani-cli -q '720'" alias anime="~/repos/ani-cli/ani-cli -q '720'"
alias manga="manga-cli"
alias mv="mvg -g" alias mv="mvg -g"
alias cp="cpg -g" alias cp="cpg -g"
neofetch neofetch
[ -f ~/.zsh/.fzf.zsh ] && source ~/.zsh/.fzf.zsh
export PATH=$PATH:/home/mrfluffy/.spicetify