I3+XFCE When closing lid go sleep instead of lock screen

,

I added to the i3-config:

exec --no-startup-id killall xfce-power-manager
exec_always --no-startup-id killall /usr/lib/x86_64-linux-gnu/xfce4/panel/wrapper-1.0
exec_always --no-startup-id killall xfsettingsd

And the in the xfce power manager gui, i set (ony battery):
image

Why is this thing isn’t working? Do i need to remove or add something to my i3 config?


i3 config
[i3hunor@HunorT480 ~]$ cat .config/i3/config 
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!

set $mod Mod1

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 10

# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3

# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.

# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork

# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet

# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
bindsym $mod+Return exec i3-sensible-terminal

# kill focused window
bindsym $mod+Shift+q kill

# start dmenu (a program launcher)
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop



# 	//Window manager\\

# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+eacute 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+eacute 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
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
#bindsym $mod+d focus child

#	//Worspaces\\

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"

# switch to workspace
bindsym $mod+1 workspace number $ws1 
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+odiaeresis workspace number $ws10

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+odiaeresis move container to workspace number $ws10



# 	//Manage i3\\

# 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'"



#	//resize\\

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 eacute 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"
}

bindsym $mod+r mode "resize"



######################################### Saját


##		 COLOR

client.focused              #FF7800        #FF7800         #FF7800



##		 GAPS

for_window [class="^.*"] border pixel 2 
gaps inner 10 
gaps outer 10



##		EXEC SZOLG

exec --no-startup-id killall xfce-power-manager
exec_always --no-startup-id killall /usr/lib/x86_64-linux-gnu/xfce4/panel/wrapper-1.0
exec_always --no-startup-id killall xfsettingsd


##		APPLICATIONS

bindsym $mod+Shift+w exec firefox

bindsym $mod+Shift+f exec --no-startup-id thunar

bindsym $mod+Shift+d exec --no-startup-id rofi -show drun


inxi --full --verbosity=7 --filter --no-host
[i3hunor@HunorT480 ~]$ inxi --full --verbosity=7 --filter --no-host
System:
  Kernel: 5.15.19-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    Desktop: Xfce 4.16.0 tk: Gtk 3.24.29 info: xfce4-panel wm: i3 4.20.1 vt: 7
    dm: LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20L6S1LV2F v: ThinkPad T480
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20L6S1LV2F v: SDK0J40697 WIN
    serial: <superuser required> UEFI: LENOVO v: N24ET67W (1.42 )
    date: 11/17/2021
Battery:
  ID-1: BAT0 charge: 14.4 Wh (77.4%) condition: 18.6/23.9 Wh (77.6%)
    volts: 11.9 min: 11.4 model: LGC 01AV489 type: Li-poly serial: <filter>
    status: Not charging cycles: 75
  ID-2: BAT1 charge: 19.0 Wh (84.4%) condition: 22.5/24.0 Wh (93.9%)
    volts: 12.4 min: 11.5 model: SMP 01AV452 type: Li-poly serial: <filter>
    status: Not charging cycles: 186
Memory:
  RAM: total: 7.51 GiB used: 2.92 GiB (38.9%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: quad core model: Intel Core i5-8350U bits: 64 type: MT MCP
    smt: enabled arch: Coffee Lake rev: A cache: L1: 256 KiB L2: 1024 KiB
    L3: 6 MiB
  Speed (MHz): avg: 1686 high: 1700 min/max: 400/3600 cores: 1: 1700
    2: 1693 3: 1700 4: 1696 5: 1700 6: 1613 7: 1692 8: 1700 bogomips: 30409
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu
    fsgsbase fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ida
    intel_pt invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor
    movbe mpx msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm
    pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts rdrand rdseed rdtscp
    rep_good sdbg sep sgx smap smep smx ss ssbd sse sse2 sse4_1 sse4_2 ssse3
    stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx
    vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel
    bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300
  Device-2: Chicony Integrated Camera (1280x720@30) type: USB
    driver: uvcvideo bus-ID: 1-8:3 chip-ID: 04f2:b604 class-ID: 0e02
    serial: <filter>
  Display: x11 server: X.Org 1.21.1.3 driver: loaded: modesetting
    alternate: fbdev,vesa resolution: 1920x1080~60Hz s-dpi: 96
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo ThinkPad T480
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:9d71
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.19-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.45 running: no
Network:
  Device-1: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15d7 class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
  Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel
    bus-ID: 03:00.0 chip-ID: 8086:24fd class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 1-7:2 chip-ID: 8087:0a2b class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 4 state: down bt-service: disabled
    rfk-block: hardware: no software: no address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 238.47 GiB used: 75.45 GiB (31.6%)
  ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKKF256G8L size: 238.47 GiB
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: L15P temp: 31.9 C
    scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / size: 116.5 GiB used: 75.42 GiB (64.7%) fs: ext4
    dev: /dev/nvme0n1p5 label: N/A uuid: cc7be21e-d9d4-4881-841a-b047d2a1253a
  ID-2: /boot/efi size: 96 MiB used: 25.3 MiB (26.3%) fs: vfat
    dev: /dev/nvme0n1p1 label: N/A uuid: 2EAD-1B08
Swap:
  ID-1: swap-1 type: file size: 8 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Unmounted:
  ID-1: /dev/nvme0n1p2 size: 16 MiB fs: <superuser required> label: N/A
    uuid: N/A
  ID-2: /dev/nvme0n1p3 size: 118.93 GiB fs: ntfs label: N/A
    uuid: 3648B0CC48B08C5D
  ID-3: /dev/nvme0n1p4 size: 509 MiB fs: ntfs label: N/A
    uuid: 1804C52004C5022C
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-7:2 info: Intel Bluetooth wireless interface type: Bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 8087:0a2b class-ID: e001
  Device-2: 1-8:3 info: Chicony Integrated Camera (1280x720@30) type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 04f2:b604 class-ID: 0e02 serial: <filter>
  Device-3: 1-9:6 info: Synaptics Metallica MIS Touch Fingerprint Reader
    type: <vendor specific> driver: N/A interfaces: 1 rev: 2.0 speed: 12 Mb/s
    power: 100mA chip-ID: 06cb:009a class-ID: ff00 serial: <filter>
  Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 48.0 C pch: 43.5 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 261 Uptime: 6h 14m wakeups: 112 Init: systemd v: 250 Compilers:
  gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1185 Shell: Bash v: 5.1.16
  running-in: xfce4-terminal inxi: 3.3.12

Comment out this line and restart i3.

1 Like

Love you. Thanks

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.