Browse Source

Use sway instead of i3; new rofi file format

* i3 -> sway
* redshift -> gammastep
* i3status -> waybar
* changed rofi file format
* [new] kanshi
main
Leo Maroni 1 year ago
parent
commit
13b021e448
Signed by: em0lar GPG Key ID: B1ADA545CD2CBACD
  1. 28
      .config/gammastep/config.ini
  2. 64
      .config/i3status/config
  3. 8
      .config/kanshi/config
  4. 5
      .config/rofi/config.rasi
  5. 144
      .config/sway/config
  6. 45
      .config/waybar/config
  7. 60
      .config/waybar/style.css
  8. 3
      .zlogin

28
.config/redshift/redshift.conf → .config/gammastep/config.ini

@ -1,8 +1,8 @@
; Global settings for redshift
[redshift]
; Global settings
[general]
; Set the day and night screen temperatures
temp-day=6500
temp-night=3850
temp-night=4000
; Disable the smooth fade between temperatures when Redshift starts and stops.
; 0 will cause an immediate change between screen temperatures.
@ -25,7 +25,7 @@ fade=1
;dusk-time=18:35-20:15
; Set the screen brightness. Default is 1.0.
brightness=1
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
;brightness-day=0.7
@ -39,21 +39,19 @@ brightness=1
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6
; Set the location-provider: 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; Set the location-provider: 'geoclue2', 'manual'.
; The location provider settings are in a different section.
location-provider=manual
; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values.
; 'randr' is the preferred method, 'vidmode' is an older API.
; but works in some cases when 'randr' does not.
; Set the adjustment-method: 'randr', 'vidmode', 'drm', 'wayland'.
; 'randr' is the preferred X11 method, 'vidmode' is an older API
; that works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr
adjustment-method=wayland
; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; type 'gammastep -l PROVIDER:help' to see the settings.
; ex: 'gammastep -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
@ -61,8 +59,8 @@ lat=50.8
lon=7.2
; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; type 'gammastep -m METHOD:help' to see the settings.
; ex: 'gammastep -m randr:help'
; In this example, randr is configured to adjust only screen 0.
; Note that the numbering starts from 0, so this is actually the first screen.
; If this option is not specified, Redshift will try to adjust _all_ screens.

64
.config/i3status/config

@ -1,64 +0,0 @@
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
interval = 1
}
order += "ipv6"
order += "wireless _first_"
order += "ethernet _first_"
order += "battery all"
order += "volume master"
order += "memory"
order += "cpu_usage"
order += "cpu_temperature all"
order += "time"
wireless _first_ {
format_up = "W: (%quality at %essid) %ip"
format_down = "W: down"
}
ethernet _first_ {
format_up = "E: %ip (%speed)"
format_down = "E: down"
}
battery all {
format = "%status %percentage (%remaining)"
integer_battery_capacity = true
last_full_capacity = true
low_threshold = 15
threshold_type = "percentage"
}
volume master {
format = "AUD %volume"
format_muted = "AUD muted (%volume)"
device = "pulse"
}
memory {
format = "MEM %used"
threshold_degraded = "10%"
format_degraded = "MEM LOW %used"
threshold_critical = "5%"
}
cpu_usage {
format = "CPU %usage"
}
cpu_temperature all {
format = "CPU_T %degrees°C"
max_threshold = "65"
}
time {
format = "%Y-%m-%d %H:%M:%S"
}

8
.config/kanshi/config

@ -0,0 +1,8 @@
profile home {
output eDP-1 mode 1920x1080 position 960,1200
output DP-2 mode 3840x1200 position 0,0
exec swaymsg '[workspace="2"]', move workspace to output DP-2
}
profile default {
output eDP-1 mode 1920x1080 position 0,0
}

5
.config/rofi/config.rasi

@ -0,0 +1,5 @@
configuration {
terminal: "/usr/bin/env dbus-launch gnome-terminal";
ssh-command: "{terminal} -- ssh {host} [-p {port}]";
theme: "/usr/share/rofi/themes/Pop-Dark.rasi";
}

144
.config/i3/config → .config/sway/config

@ -1,47 +1,73 @@
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# sway config file
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# compose key
input * xkb_options compose:prsc
# Window title font
font pango:"Jetbrains Mono" 8
# Set background image
exec feh --bg-fill feh --bg-fill NAS/00\ Leo\ PRIVAT/10\ Bilder/Hintergrundbilder/pan_sky__by_torcallta_dbltdsg.png
# Redshift
exec redshift
output "*" bg ~/NAS/00\ Leo\ PRIVAT/10\ Bilder/Hintergrundbilder/river.png fill
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
bar {
swaybar_command waybar
}
# start a terminal
bindsym $mod+Return exec dbus-launch gnome-terminal
###### rofi
# start rofi
bindsym $mod+d exec "rofi -combi-modi window,ssh,drun -show combi -modi combi"
# start rofi-pass
bindsym $mod+p exec rofi-pass
# start rofi-calc
bindsym $mod+c exec rofi -show calc -modi calc -no-show-match -no-sort
# start teiler (screenshot tool)
bindsym $mod+shift+d exec "teiler --screenshot"
###### suspend and lock
set $lock_background /opt/laptop-out-of-oder_broken.png
bindsym $mod+End exec swaylock -i $lock_background
bindsym $mod+Shift+End exec systemctl suspend
exec swayidle -w \
timeout 300 'swaylock -f -i $lock_background' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -i $lock_background'
###### brightness and volume
# display brightness
bindsym XF86MonBrightnessDown exec light -U 10
bindsym XF86MonBrightnessUp exec light -A 10
# volume (pulseaudio)
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
###### default keybindings
# kill focused window
bindsym $mod+Shift+q kill
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
@ -112,64 +138,36 @@ bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
bar {
status_command i3status
}
# start rofi
bindsym $mod+d exec "rofi -combi-modi window,ssh,drun -show combi -modi combi"
###### Start services
# Night Light
exec gammastep-indicator
# start rofi-pass
bindsym $mod+p exec rofi-pass
# strat rofi-calc
bindsym $mod+c exec rofi -show calc -modi calc -no-show-match -no-sort
# Notification daemon
exec mako
# start teiler (screenshot tool)
bindsym $mod+shift+d exec "teiler --screenshot"
# suspend and lock
bindsym $mod+shift+s exec systemctl suspend
bindsym $mod+shift+a exec "/usr/bin/i3lock -i /opt/laptop-out-of-oder_broken.png"
# display brightness
bindsym XF86MonBrightnessDown exec light -U 10
bindsym XF86MonBrightnessUp exec light -A 10
# volume (pulseaudio)
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
# display configuration
exec kanshi

45
.config/waybar/config

@ -0,0 +1,45 @@
{
"layer": "top",
"position": "bottom",
"modules-left": ["sway/workspaces", "sway/mode", "tray"],
"modules-right": ["network", "pulseaudio", "temperature", "cpu", "memory", "battery", "clock"],
"cpu": {
"format": " {usage}%"
},
"memory": {
"format": " {percentage}%",
"states": {
"warning": 15,
"critical": 75
},
},
"battery": {
"format": "{icon} {capacity}%",
"format-icons": ["", "", "", "", ""],
"states": {
"critical": 10,
"warning": 25
}
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-icons": [ "", "" ],
"format-muted": " muted"
},
"clock": {
"format": "{:%a %Y-%m-%d %H:%M:%S}",
"interval": 1
},
"network": {
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": " connected",
"format-disconnected": "no network", //An empty format will hide the module.
"tooltip-format": "IPv4: {ipaddr}/{cidr}",
"max-length": 50
},
"temperature": {
"critical-threshold": 70,
"format": " {temperatureC}°C",
"interval": 1
}
}

60
.config/waybar/style.css

@ -0,0 +1,60 @@
/* inspired by petabyteboy (petabyte.dev) */
* {
border: none;
border-radius: 0;
font-family: "JetBrains Mono", sans-serif;
font-size: 12px;
}
window {
background: linear-gradient(rgba(0, 0, 0, .4), rgba(0, 0, 0, 0));
color: #fff;
}
#workspaces {
padding-right: 15px;
}
#workspaces button {
transition: none;
padding: 0 5px;
background: rgba(255, 255, 255, .2);
color: #fff;
}
#workspaces button.icon label {
font-size: 10px;
}
#workspaces button.focused {
color: #333;
background: #fff;
}
window>*>*>*>label {
margin: 0 7px;
padding: 5px;
background-color: rgba(255, 255, 255, .2);
}
#tray {
margin-left: 10px;
}
#pulseaudio.muted {
color: #ffbb00
}
#network.disconnected,
#battery:not(.charging).warning,
#temperature.critical {
background: #ffbb00;
color: black;
}
#battery:not(.charging).critical {
background: #c50014;
color: white;
}
#battery.charging {
background: #2a7230;
}

3
.zlogin

@ -0,0 +1,3 @@
export MOZ_ENABLE_WAYLAND=1
export MOZ_USE_XINPUT2=1
export _JAVA_AWT_WM_NONREPARENTING=1